|
ReportMill 10 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.reportmill.datasource.RMDataSource
public class RMDataSource
This class is used as a proxy for objects passed to document's generateReport() method. It provides schema information of the object graph (in the form of RMEntity and RMProperty objects) and it provides sample data (probably in the form of Java Collections and core types: List, Map, String, Number, Date).
Constructor Summary | |
---|---|
RMDataSource()
Creates a plain datasource. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Standard clone implementation. |
RMDatum |
createDatum(RMEntity anEntity)
Creates and returns a new datum for a given entity. |
RMResource |
createResource(java.lang.String aName,
java.lang.Object theBytes)
Creates a new resource for given name and bytes. |
void |
dataAdd(RMDatum aData)
Notifies datasource that a datum will be added. |
void |
dataChange(RMDatum aData)
Notifies datasource that a datum will change. |
void |
dataRemove(RMDatum aData)
Notifies datasource that a datum will be removed. |
boolean |
equals(java.lang.Object anObj)
Standard equals implementation. |
java.lang.Object |
fromXML(com.reportmill.archiver.RXArchiver anArchiver,
com.reportmill.archiver.RXElement anElement)
XML unarchival. |
RMDatum |
getData()
Returns the datasource default dataset as a datum. |
java.util.Map |
getDataset()
Returns a sample dataset of objects associated with the datasource. |
RMDataSet |
getDataSet(RMFetch aFetch)
Gets the dataset for an entity. |
RMDataSet |
getDataSet(java.lang.String aKey)
Returns the named dataset from this datasource. |
RMEntity |
getEntity(java.lang.String aKeyPath)
Returns the entity at the given key path. |
java.lang.String |
getError()
Returns the last error encountered when loading a datasource. |
java.lang.String |
getName()
Returns the name for the datasource. |
RMProperty |
getRelation(java.lang.String aKeyPath)
Returns the relation at the given key path. |
RMResource |
getResource(java.lang.String aName)
Returns the resource for a given name. |
java.lang.String[] |
getResourceNames(java.lang.String aType)
Returns the resource names for a given type (extension). |
RMSchema |
getSchema()
Returns the schema of represented datasource as a heirarchy of RMEntity and RMProperty objects. |
boolean |
hasChanges()
Returns whether or not there are any changes to be saved. |
void |
initFromDataSource(RMDataSource aDataSource)
Initializes this datasource from given datasource. |
boolean |
isReadOnly()
Returns whether datasource is read-only. |
void |
refresh()
Invalidates any cached data. |
void |
saveChanges()
Tells the datasource to save changes. |
void |
setName(java.lang.String aName)
Sets the name for the datasource. |
void |
setSchema(RMSchema aSchema)
Sets the schema of represented datasource as a heirarchy of RMEntity and RMProperty objects. |
java.lang.String |
toString()
Returns a string representation of the datasource (just its name). |
com.reportmill.archiver.RXElement |
toXML(com.reportmill.archiver.RXArchiver anArchiver)
XML archival. |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RMDataSource()
Method Detail |
---|
public java.lang.String getName()
public void setName(java.lang.String aName)
public RMSchema getSchema()
public void setSchema(RMSchema aSchema)
public java.util.Map getDataset()
public RMDatum getData()
public RMDataSet getDataSet(java.lang.String aKey)
getDataSet
in interface RMBindSource
public RMDataSet getDataSet(RMFetch aFetch)
getDataSet
in interface RMBindSource
public void dataChange(RMDatum aData)
public void dataAdd(RMDatum aData)
public void dataRemove(RMDatum aData)
public void saveChanges()
public boolean hasChanges()
public RMDatum createDatum(RMEntity anEntity)
public void refresh()
public java.lang.String getError()
public RMEntity getEntity(java.lang.String aKeyPath)
public RMProperty getRelation(java.lang.String aKeyPath)
public java.lang.String[] getResourceNames(java.lang.String aType)
public RMResource createResource(java.lang.String aName, java.lang.Object theBytes)
public RMResource getResource(java.lang.String aName)
public boolean isReadOnly()
public void initFromDataSource(RMDataSource aDataSource)
public boolean equals(java.lang.Object anObj)
equals
in class java.lang.Object
public java.lang.Object clone()
clone
in class java.lang.Object
public com.reportmill.archiver.RXElement toXML(com.reportmill.archiver.RXArchiver anArchiver)
public java.lang.Object fromXML(com.reportmill.archiver.RXArchiver anArchiver, com.reportmill.archiver.RXElement anElement)
public java.lang.String toString()
toString
in class java.lang.Object
|
ReportMill 10 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |