|
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.RMEntity
public class RMEntity
This class represents an entity for a data source. It has a list of properties, some of which are simple attributes and some of which are relationships.
| Constructor Summary | |
|---|---|
RMEntity()
Creates an empty entity. |
|
RMEntity(java.lang.String name)
Creates an entity with the given name. |
|
| Method Summary | |
|---|---|
void |
addProperty(RMProperty aProperty)
Adds a given property. |
void |
addProperty(RMProperty aProperty,
int anIndex)
Adds a given property at given index. |
RMEntity |
clone()
Standard clone implementation. |
boolean |
equals(java.lang.Object anObj)
Standard equals method. |
RMEntity |
fromXML(com.reportmill.archiver.RXArchiver anArchiver,
com.reportmill.archiver.RXElement anElement,
java.lang.Object anOwner)
XML unarchival. |
RMProperty |
getAttribute(int anIndex)
Returns the attribute at the given index. |
RMProperty |
getAttribute(java.lang.String aName)
Returns the attribute with the given name. |
int |
getAttributeCount()
Returns the number of attributes. |
RMProperty |
getAttributeSorted(int anIndex)
Returns the attribute at the given index in a sorted attributes list. |
java.lang.String |
getDescriptorKey()
Returns the key/key-chain to the property(s) that returns best string description of an entity instance. |
java.lang.String |
getDescriptorKeyGuess()
Returns a guess of descriptor key (or the actual one, if set). |
java.lang.Class |
getEntityClass()
Returns the class that this entity represents. |
java.lang.String |
getName()
Returns the name of the entity. |
java.util.List<? extends RMProperty> |
getPrimaries()
Returns the list of primary attributes for this entity. |
java.util.List<? extends RMProperty> |
getProperties()
Returns the list of properties. |
RMProperty |
getProperty(int anIndex)
Returns the property at the given index. |
RMProperty |
getProperty(RMKeyChain aKeyChain)
Returns the property for the keychain evaluated from this entity. |
RMProperty |
getProperty(java.lang.String aName)
Returns the property with the given name. |
int |
getPropertyCount()
Returns the number of properties. |
RMProperty |
getRelation(int anIndex)
Returns the relation at the given index. |
RMProperty |
getRelation(java.lang.String aKeyPath)
Returns the relation for the given key path. |
int |
getRelationCount()
Returns the number of relations in the entity. |
RMEntity |
getRelationEntity(java.lang.String aKeyPath)
Returns the relation entity for the key path evaluated from this entity. |
java.util.List<RMProperty> |
getRelations()
Returns the list of relations in the entity. |
RMProperty |
getRelationSorted(int anIndex)
Returns the relation at the given index in the sorted list of relations. |
RMSchema |
getSchema()
Returns the schema that owns this entity. |
void |
mergeEntity(RMEntity anEntity,
boolean doCreateProperties)
Merges an entity with this entity. |
void |
propertyChange(java.beans.PropertyChangeEvent anEvent)
PropertyChangeListener implementation to forward property changes to entity property change listener. |
java.lang.Object |
removeProperty(int anIndex)
Removes a property at given index. |
int |
removeProperty(RMProperty aProperty)
Removes the given property. |
void |
setDescriptorKey(java.lang.String aValue)
Sets the key/key-chain to the property(s) that returns best string description of an entity instance. |
void |
setEntityClass(java.lang.Class aClass)
Sets the class that this entity represents. |
void |
setName(java.lang.String aName)
Sets the name of the entity. |
void |
setSchema(RMSchema aSchema)
Sets the schema that owns this entity. |
java.lang.String |
toString()
Returns a string representation of entity (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, 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 RMEntity()
public RMEntity(java.lang.String name)
| Method Detail |
|---|
public RMSchema getSchema()
public void setSchema(RMSchema aSchema)
public java.lang.String getName()
public void setName(java.lang.String aName)
public int getPropertyCount()
public RMProperty getProperty(int anIndex)
public java.util.List<? extends RMProperty> getProperties()
public void addProperty(RMProperty aProperty)
public void addProperty(RMProperty aProperty,
int anIndex)
public java.lang.Object removeProperty(int anIndex)
public int removeProperty(RMProperty aProperty)
public RMProperty getProperty(java.lang.String aName)
public RMProperty getProperty(RMKeyChain aKeyChain)
public int getAttributeCount()
public RMProperty getAttribute(int anIndex)
public RMProperty getAttribute(java.lang.String aName)
public int getRelationCount()
public RMProperty getRelation(int anIndex)
public java.util.List<RMProperty> getRelations()
public RMProperty getRelation(java.lang.String aKeyPath)
public RMEntity getRelationEntity(java.lang.String aKeyPath)
public RMProperty getAttributeSorted(int anIndex)
public RMProperty getRelationSorted(int anIndex)
public java.util.List<? extends RMProperty> getPrimaries()
public java.lang.Class getEntityClass()
public void setEntityClass(java.lang.Class aClass)
public java.lang.String getDescriptorKey()
public void setDescriptorKey(java.lang.String aValue)
public java.lang.String getDescriptorKeyGuess()
public void mergeEntity(RMEntity anEntity,
boolean doCreateProperties)
public void propertyChange(java.beans.PropertyChangeEvent anEvent)
propertyChange in interface java.beans.PropertyChangeListenerpublic boolean equals(java.lang.Object anObj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class com.reportmill.base.RMObjectpublic RMEntity clone()
clone in class com.reportmill.base.RMObject
public com.reportmill.archiver.RXElement toXML(com.reportmill.archiver.RXArchiver anArchiver,
java.lang.Object anOwner)
public RMEntity fromXML(com.reportmill.archiver.RXArchiver anArchiver,
com.reportmill.archiver.RXElement anElement,
java.lang.Object anOwner)
|
ReportMill 12 API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||