|
ReportMill 12 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 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).
| Nested Class Summary | |
|---|---|
static interface |
RMDataSource.EntityResolver
|
| Constructor Summary | |
|---|---|
RMDataSource()
Creates a plain datasource. |
|
| Method Summary | |
|---|---|
void |
create()
Creates the data source remote site (database, directory file, etc.). |
RMEntity |
createEntity(RMEntity anEntity)
Creates an entity in data source for given entity. |
java.lang.Object |
createObject(RMEntity anEntity)
Creates and returns a new object for a given entity. |
void |
delete()
Deletes this data source, assuming it corresponds to something that can be deleted, like a database. |
void |
deleteEntity(RMEntity anEntity)
Deletes an entity in data source for given entity. |
void |
deleteFile(RMFile aFile)
Deletes a file. |
void |
deleteRow(RMRow aRow)
Registers row to be deleted. |
boolean |
equals(java.lang.Object anObj)
Standard equals implementation. |
RMDataSource |
fromXML(com.reportmill.archiver.RXArchiver anArchiver,
com.reportmill.archiver.RXElement anElement,
java.lang.Object anOwner)
XML unarchival. |
java.util.List<RMRow> |
getAllRows(RMEntity anEntity)
Returns all the rows for an entity. |
java.util.Map |
getDataset()
Returns a sample dataset of objects associated with the datasource. |
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.Class<? extends RMRow> |
getEntityClass(RMEntity anEntity)
Returns the class for a given entity. |
RMDataSource.EntityResolver |
getEntityResolver()
Returns the custom entity resolver. |
RMFile |
getFile(java.lang.String aPath)
Returns the individual file with the given path. |
RMFile |
getFile(java.lang.String aPath,
boolean doCreate)
Returns the individual file with the given path, with an option to create it, if missing. |
RMFile |
getFile(java.lang.String aPath,
boolean doCreate,
boolean isDirectory)
Returns the individual file with the given path, with an option to create it, if missing. |
java.util.List<? extends RMFile> |
getFilesImpl(java.lang.String aPath)
Returns files at path. |
java.lang.String |
getName()
Returns the name for the datasource. |
RMFile |
getRootDirectory()
Returns the root directory. |
RMRow |
getRow(RMEntity anEntity,
RMCondition aCondition)
Returns a cached row for a entity and condition. |
RMRow |
getRow(java.lang.String anEntityName,
RMCondition aCondition)
Returns a cached row for an entity name and condition. |
java.util.List<RMRow> |
getRows(java.util.List<? extends RMProperty> theProperties,
RMCondition aCondition)
Returns a set of rows for the given properties and condition. |
RMSchema |
getSchema()
Returns the schema of represented datasource as a hierarchy of RMEntity and RMProperty objects. |
RMSchema |
getSchemaVisible()
Returns the schema that should be visible to users. |
java.lang.String |
getTypeString()
Returns the type string. |
RMRow |
getUniqueRow(RMRow aRow)
Returns any previously loaded incarnation of given row, based on its primary key, otherwise it returns the given row (after adding it to allRows for row entity). |
void |
insertRow(RMRow aRow)
Registers row to be inserted. |
void |
propertyChange(java.beans.PropertyChangeEvent anEvent)
Overridden to track property changes. |
void |
readFile(RMFile aFile)
Reads a file (bytes really). |
void |
refresh()
Clears all cached data in the data source, forcing everything to reload. |
void |
saveRows()
Save row changes. |
void |
saveRowsImmediately()
Save row changes immediately. |
void |
setEntityResolver(RMDataSource.EntityResolver anEntityResolver)
Sets the custom entity resolver. |
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. |
void |
updateRow(RMRow aRow)
Registers row to be updated. |
void |
writeFile(RMFile aFile)
Writes a file (bytes really). |
| 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 java.lang.String getTypeString()
public RMSchema getSchema()
public RMSchema getSchemaVisible()
public java.util.Map getDataset()
public java.util.List getDataset(java.lang.String aKey)
public java.lang.Object createObject(RMEntity anEntity)
public RMEntity getEntity(java.lang.String aKeyPath)
public RMRow getRow(java.lang.String anEntityName,
RMCondition aCondition)
public RMRow getRow(RMEntity anEntity,
RMCondition aCondition)
public java.util.List<RMRow> getRows(java.util.List<? extends RMProperty> theProperties,
RMCondition aCondition)
public java.util.List<RMRow> getAllRows(RMEntity anEntity)
public RMRow getUniqueRow(RMRow aRow)
public void insertRow(RMRow aRow)
public void updateRow(RMRow aRow)
public void deleteRow(RMRow aRow)
public java.lang.Class<? extends RMRow> getEntityClass(RMEntity anEntity)
public RMDataSource.EntityResolver getEntityResolver()
public void setEntityResolver(RMDataSource.EntityResolver anEntityResolver)
public void propertyChange(java.beans.PropertyChangeEvent anEvent)
propertyChange in interface java.beans.PropertyChangeListenerpublic void saveRows()
public void saveRowsImmediately()
public RMFile getRootDirectory()
public RMFile getFile(java.lang.String aPath)
public RMFile getFile(java.lang.String aPath,
boolean doCreate)
public RMFile getFile(java.lang.String aPath,
boolean doCreate,
boolean isDirectory)
public java.util.List<? extends RMFile> getFilesImpl(java.lang.String aPath)
public void readFile(RMFile aFile)
public void writeFile(RMFile aFile)
public void deleteFile(RMFile aFile)
public RMEntity createEntity(RMEntity anEntity)
public void deleteEntity(RMEntity anEntity)
public void create()
public void delete()
public void refresh()
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 RMDataSource fromXML(com.reportmill.archiver.RXArchiver anArchiver,
com.reportmill.archiver.RXElement anElement,
java.lang.Object anOwner)
public java.lang.String toString()
toString in class com.reportmill.base.RMObject
|
ReportMill 12 API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||