|
ReportMill 11 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.reportmill.base.RMObject
com.reportmill.datasource.RMDataSource
public abstract 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 | |
---|---|
void |
close()
Tells the datasource to close. |
java.lang.Object |
createObject(RMEntity anEntity)
Creates and returns a new object for a given entity. |
boolean |
equals(java.lang.Object anObj)
Standard equals implementation. |
java.lang.Object |
fromXML(com.reportmill.archiver.RXArchiver anArchiver,
com.reportmill.archiver.RXElement anElement,
java.lang.Object anOwner)
XML unarchival. |
abstract java.util.Map |
getDataset()
Returns a sample dataset of objects associated with the datasource. |
java.util.List |
getDataset(RMFetch aFetch)
Gets the dataset for an entity. |
java.util.List |
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. |
abstract RMSchema |
getSchema()
Returns the schema of represented datasource as a hierarchy of RMEntity and RMProperty objects. |
boolean |
hasChanges()
Returns whether or not there are any changes to be saved. |
boolean |
isReadOnly()
Returns whether datasource is read-only. |
void |
refresh()
Invalidates any cached data. |
void |
setName(java.lang.String aName)
Sets the name for the datasource. |
java.lang.String |
toString()
Returns a string representation of the datasource (just its name). |
com.reportmill.archiver.RXElement |
toXML(com.reportmill.archiver.RXArchiver anArchiver,
java.lang.Object anOwner)
XML archival. |
Methods inherited from class com.reportmill.base.RMObject |
---|
addListener, addPropertyChangeListener, animUpdate, clone, firePropertyChange, firePropertyChange, getListener, getListenerCount, getListeners, isFirePropertyChangeEnabled, isUndoing, removeListener, removePropertyChangeListener, setFirePropertyChangeEnabled, setUndoing |
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 abstract RMSchema getSchema()
public abstract java.util.Map getDataset()
public java.util.List getDataset(java.lang.String aKey)
public java.util.List getDataset(RMFetch aFetch)
public java.lang.Object createObject(RMEntity anEntity)
public void refresh()
public boolean hasChanges()
public void close()
public java.lang.String getError()
public RMEntity getEntity(java.lang.String aKeyPath)
public boolean isReadOnly()
public boolean equals(java.lang.Object anObj)
equals
in class java.lang.Object
public com.reportmill.archiver.RXElement toXML(com.reportmill.archiver.RXArchiver anArchiver, java.lang.Object anOwner)
public java.lang.Object fromXML(com.reportmill.archiver.RXArchiver anArchiver, com.reportmill.archiver.RXElement anElement, java.lang.Object anOwner)
public java.lang.String toString()
toString
in class java.lang.Object
|
ReportMill 11 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |