|
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
com.reportmill.datasource.RMXMLDataSource
public class RMXMLDataSource
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 | |
---|---|
RMXMLDataSource()
Creates a plain datasource. |
|
RMXMLDataSource(java.lang.Object aSource,
java.lang.String aName)
Creates a datasource from a given source with a given name (can be null). |
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 aDatum)
Notifies datasource that a datum will be added. |
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. |
boolean |
getCustomSchema()
Returns a schema that may differ from the one stored in an XML file. |
java.util.Map |
getDataset()
Returns a sample dataset of objects associated with the datasource. |
RMDataSet |
getDataSet(RMFetch aFetch)
Gets the dataset for an entity. |
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. |
RMProperty |
getRelation(java.lang.String aKeyPath)
Returns the relation at the given key path. |
RMResource |
getResource(int anIndex)
Returns the specific resource at the given index. |
RMResource |
getResource(java.lang.String aName)
Returns the resource for given name. |
int |
getResourceCount()
Returns the number of resources in this datasource. |
java.lang.String[] |
getResourceNames(java.lang.String aType)
Returns the resource names for a given type. |
RMSchema |
getSchema()
Returns the schema of represented datasource as a heirarchy of RMEntity and RMProperty objects. |
java.lang.Object |
getSource()
Returns the source for the datasource. |
boolean |
isReadOnly()
Returns whether datasource is read-only. |
void |
refresh()
Invalidates any cached data. |
void |
saveChanges()
Saves changes. |
void |
setCustomSchema(boolean customSchema)
Sets a schema that may differ from the one stored in an XML file. |
void |
setSchema(RMSchema aSchema)
Sets the schema. |
void |
setSource(java.lang.Object aSource)
Sets the source for the datasource. |
static void |
setSourceContext(java.lang.Object aSource)
Sets possible context for aSource. |
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 com.reportmill.datasource.RMDataSource |
---|
dataChange, dataRemove, getData, getDataSet, getName, hasChanges, initFromDataSource, setName |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RMXMLDataSource()
public RMXMLDataSource(java.lang.Object aSource, java.lang.String aName)
Method Detail |
---|
public java.lang.Object getSource()
public void setSource(java.lang.Object aSource)
public RMSchema getSchema()
getSchema
in class RMDataSource
public void setSchema(RMSchema aSchema)
setSchema
in class RMDataSource
public boolean getCustomSchema()
public void setCustomSchema(boolean customSchema)
public RMEntity getEntity(java.lang.String aKeyPath)
getEntity
in class RMDataSource
public RMProperty getRelation(java.lang.String aKeyPath)
getRelation
in class RMDataSource
public java.util.Map getDataset()
getDataset
in class RMDataSource
public RMDataSet getDataSet(RMFetch aFetch)
getDataSet
in interface RMBindSource
getDataSet
in class RMDataSource
public void dataAdd(RMDatum aDatum)
dataAdd
in class RMDataSource
public void saveChanges()
saveChanges
in class RMDataSource
public RMDatum createDatum(RMEntity anEntity)
createDatum
in class RMDataSource
public void refresh()
refresh
in class RMDataSource
public java.lang.String getError()
getError
in class RMDataSource
public static void setSourceContext(java.lang.Object aSource)
public int getResourceCount()
public RMResource getResource(int anIndex)
public java.lang.String[] getResourceNames(java.lang.String aType)
getResourceNames
in class RMDataSource
public RMResource createResource(java.lang.String aName, java.lang.Object theBytes)
createResource
in class RMDataSource
public RMResource getResource(java.lang.String aName)
getResource
in class RMDataSource
public boolean isReadOnly()
isReadOnly
in class RMDataSource
public boolean equals(java.lang.Object anObj)
equals
in class RMDataSource
public java.lang.Object clone()
clone
in class RMDataSource
public com.reportmill.archiver.RXElement toXML(com.reportmill.archiver.RXArchiver anArchiver)
toXML
in class RMDataSource
public java.lang.Object fromXML(com.reportmill.archiver.RXArchiver anArchiver, com.reportmill.archiver.RXElement anElement)
fromXML
in class RMDataSource
public java.lang.String toString()
toString
in class RMDataSource
|
ReportMill 10 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |