ReportMill 10 API

com.reportmill.datasource
Class RMDatum

java.lang.Object
  extended by com.reportmill.datasource.RMDatum
Direct Known Subclasses:
RMDataSet, RMJDBCDatum

public class RMDatum
extends java.lang.Object

This class is an abstract representation of a data bearing object, with the ability to get and set values by key. By using this class, you can make changes to an object such that the originating datasource knows about the changes and can save them back to a backing store. A subclass of this object might be RMDataSet that might represent a list of data.


Constructor Summary
RMDatum(java.lang.Object anObj, RMDataSource aDataSource, RMEntity anEntity, RMDatum aParent, java.lang.String aKey)
          Creates a new datum for given object.
 
Method Summary
 RMDataSet getDataSet(java.lang.String aKey)
          Returns a dataset for given key (or null if key doesn't evaluate to list).
 RMDataSource getDataSource()
          Returns the originating datasource for this datum.
 RMDatum getDatum(java.lang.String aKey)
          Returns a datum for this given key.
 RMEntity getEntity()
          Returns the entity class this datum represents.
 java.lang.String getKey()
          Returns the key this datum was derived with (from parent).
 java.lang.Object getObject()
          Returns the object that this datum represents.
 RMDatum getParent()
          Returns the parent this datum was derived from.
 RMProperty getProperty(java.lang.String aKey)
          Returns the property description for a key.
 java.lang.String getPropertyType(java.lang.String aKey)
          Returns the property type for a given key.
 java.lang.Object getValue(java.lang.String aKey)
          Returns a value for given key.
 void setValue(java.lang.String aKey, java.lang.Object aValue)
          Sets a value for given key.
 java.lang.Object valueForKey(java.lang.String aKey)
          Same as getValue()
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RMDatum

public RMDatum(java.lang.Object anObj,
               RMDataSource aDataSource,
               RMEntity anEntity,
               RMDatum aParent,
               java.lang.String aKey)
Creates a new datum for given object.

Method Detail

getObject

public java.lang.Object getObject()
Returns the object that this datum represents.


getDataSource

public RMDataSource getDataSource()
Returns the originating datasource for this datum.


getParent

public RMDatum getParent()
Returns the parent this datum was derived from.


getKey

public java.lang.String getKey()
Returns the key this datum was derived with (from parent).


getEntity

public RMEntity getEntity()
Returns the entity class this datum represents.


getDatum

public RMDatum getDatum(java.lang.String aKey)
Returns a datum for this given key.


getDataSet

public RMDataSet getDataSet(java.lang.String aKey)
Returns a dataset for given key (or null if key doesn't evaluate to list).


getValue

public java.lang.Object getValue(java.lang.String aKey)
Returns a value for given key.


valueForKey

public java.lang.Object valueForKey(java.lang.String aKey)
Same as getValue()


setValue

public void setValue(java.lang.String aKey,
                     java.lang.Object aValue)
Sets a value for given key.


getProperty

public RMProperty getProperty(java.lang.String aKey)
Returns the property description for a key.


getPropertyType

public java.lang.String getPropertyType(java.lang.String aKey)
Returns the property type for a given key.


ReportMill 10 API