ReportMill 12 API

com.reportmill.datasource
Class RMRow

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<java.lang.String,java.lang.Object>
          extended by com.reportmill.datasource.RMRow
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,java.lang.Object>

public class RMRow
extends java.util.HashMap<java.lang.String,java.lang.Object>

Represents a data bearing object from a datasource.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
 
Constructor Summary
RMRow()
          Creates a new row.
RMRow(RMEntity anEntity)
          Creates a new row for given entity.
 
Method Summary
 void add(java.lang.String aName, RMRow aRow)
          Adds a row for a given property.
 void add(java.lang.String aName, RMRow aRow, int anIndex)
          Adds a row for a given property.
 void addListener(java.util.EventListener aListener)
          Add listener.
 void clearChanges()
          Clears changes.
 RMRow create(java.lang.Object aName)
          Creates a new row for given property.
 boolean equals(java.lang.Object anObj)
          Override to just check identity, since rows are unique (and comparisons can cause unnecessary faulting).
 void firePropertyChange(java.beans.PropertyChangeEvent anEvent)
          Fires a property change.
 void firePropertyChange(java.lang.String aProperty, java.lang.Object oldValue, java.lang.Object newValue, int anIndex)
          Fires an indexed property change.
 java.lang.Object get(java.lang.Object aName)
          Override to do faulting.
 RMDataSource getDataSource()
          Returns the datasource that created this row.
 RMEntity getEntity()
          Returns the entity.
 java.util.List<RMProperty> getInsertProperties()
          Returns the insert properties (properties that aren't auto-generated and non-null).
<T extends java.util.EventListener>
T
getListener(java.lang.Class<T> aClass, int anIndex)
          Returns the individual listener of a given class at given index (from all listeners of given class).
 int getListenerCount(java.lang.Class aClass)
          Returns the number of listeners of a given class.
<T extends java.util.EventListener>
T[]
getListeners(java.lang.Class<T> aClass)
          Returns the array of listeners of a given class (from all listeners of given class).
 RMCondition getOptimisticCondition()
          Returns the optimistic condition that identifies this row.
 RMRow getOriginalRow()
          Returns a RMRow that represents the original version of this row.
 java.lang.Object getPrimaryValue(java.lang.String aName)
          Returns the value for key, converting relation values to their remote property value.
 java.util.List<? extends RMProperty> getProperties()
          Returns the properties for this row.
 RMProperty getProperty(java.lang.String aName)
          Returns the named property.
 java.util.List<RMProperty> getUpdateProperties()
          Returns the update properties (properties that have changed).
 boolean isFirePropertyChangeEnabled()
          Returns whether fire property change is enabled.
 java.lang.Object put(java.lang.String aName, java.lang.Object aValue)
          Override put to do conversion.
 RMRow remove(java.lang.String aName, int anIndex)
          Removes row at given index of property list for given property.
 int remove(java.lang.String aName, RMRow aRow)
          Removes a row for a given property.
 void removeListener(java.util.EventListener aListener)
          Remove listener.
 void setDataSource(RMDataSource aDataSource)
          Sets the datasource that created this row.
 void setEntity(RMEntity anEntity)
          Sets the entity.
 boolean setFirePropertyChangeEnabled(boolean aValue)
          Sets whether fire property change is enabled.
 java.lang.String toString()
          Returns a string rep.
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, isEmpty, keySet, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
hashCode
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
hashCode
 

Constructor Detail

RMRow

public RMRow()
Creates a new row.


RMRow

public RMRow(RMEntity anEntity)
Creates a new row for given entity.

Method Detail

getEntity

public RMEntity getEntity()
Returns the entity.


setEntity

public void setEntity(RMEntity anEntity)
Sets the entity.


getDataSource

public RMDataSource getDataSource()
Returns the datasource that created this row.


setDataSource

public void setDataSource(RMDataSource aDataSource)
Sets the datasource that created this row.


getProperties

public java.util.List<? extends RMProperty> getProperties()
Returns the properties for this row.


getProperty

public RMProperty getProperty(java.lang.String aName)
Returns the named property.


get

public java.lang.Object get(java.lang.Object aName)
Override to do faulting.

Specified by:
get in interface java.util.Map<java.lang.String,java.lang.Object>
Overrides:
get in class java.util.HashMap<java.lang.String,java.lang.Object>

getPrimaryValue

public java.lang.Object getPrimaryValue(java.lang.String aName)
Returns the value for key, converting relation values to their remote property value.


put

public java.lang.Object put(java.lang.String aName,
                            java.lang.Object aValue)
Override put to do conversion.

Specified by:
put in interface java.util.Map<java.lang.String,java.lang.Object>
Overrides:
put in class java.util.HashMap<java.lang.String,java.lang.Object>

add

public void add(java.lang.String aName,
                RMRow aRow)
Adds a row for a given property.


add

public void add(java.lang.String aName,
                RMRow aRow,
                int anIndex)
Adds a row for a given property.


remove

public RMRow remove(java.lang.String aName,
                    int anIndex)
Removes row at given index of property list for given property.


remove

public int remove(java.lang.String aName,
                  RMRow aRow)
Removes a row for a given property.


create

public RMRow create(java.lang.Object aName)
Creates a new row for given property.


getOriginalRow

public RMRow getOriginalRow()
Returns a RMRow that represents the original version of this row.


getInsertProperties

public java.util.List<RMProperty> getInsertProperties()
Returns the insert properties (properties that aren't auto-generated and non-null).


getUpdateProperties

public java.util.List<RMProperty> getUpdateProperties()
Returns the update properties (properties that have changed).


getOptimisticCondition

public RMCondition getOptimisticCondition()
Returns the optimistic condition that identifies this row.


clearChanges

public void clearChanges()
Clears changes.


getListenerCount

public int getListenerCount(java.lang.Class aClass)
Returns the number of listeners of a given class.


getListener

public <T extends java.util.EventListener> T getListener(java.lang.Class<T> aClass,
                                                         int anIndex)
Returns the individual listener of a given class at given index (from all listeners of given class).


getListeners

public <T extends java.util.EventListener> T[] getListeners(java.lang.Class<T> aClass)
Returns the array of listeners of a given class (from all listeners of given class).


addListener

public void addListener(java.util.EventListener aListener)
Add listener.


removeListener

public void removeListener(java.util.EventListener aListener)
Remove listener.


firePropertyChange

public void firePropertyChange(java.lang.String aProperty,
                               java.lang.Object oldValue,
                               java.lang.Object newValue,
                               int anIndex)
Fires an indexed property change.


firePropertyChange

public void firePropertyChange(java.beans.PropertyChangeEvent anEvent)
Fires a property change.


isFirePropertyChangeEnabled

public boolean isFirePropertyChangeEnabled()
Returns whether fire property change is enabled.


setFirePropertyChangeEnabled

public boolean setFirePropertyChangeEnabled(boolean aValue)
Sets whether fire property change is enabled.


equals

public boolean equals(java.lang.Object anObj)
Override to just check identity, since rows are unique (and comparisons can cause unnecessary faulting).

Specified by:
equals in interface java.util.Map<java.lang.String,java.lang.Object>
Overrides:
equals in class java.util.AbstractMap<java.lang.String,java.lang.Object>

toString

public java.lang.String toString()
Returns a string rep.

Overrides:
toString in class java.util.AbstractMap<java.lang.String,java.lang.Object>

ReportMill 12 API