Package com.ribs.datasource
Class RMEntity
- java.lang.Object
-
- com.ribs.datasource.RMEntity
-
public class RMEntity extends java.lang.Object
This class represents an entity for an RMDataSource. It has a list of RMProperties, some of which are simple attributes and some of which are relationships.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addProperty(RMProperty aProperty)
Adds a given property.boolean
equals(java.lang.Object obj)
Standard equals method.java.lang.Object
fromXML(RXArchiver anArchiver, RXElement anElement)
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.RMEntity
getEntity(java.lang.String aKeyPath)
Returns the child entity for the key path evaluated from this entity.java.lang.String
getName()
Returns the name of the entity.RMProperty
getPrimary(int anIndex)
Returns the primary attribute at the given index.int
getPrimaryCount()
Returns the number of primary attributes for this entity.RMProperty
getProperty(int anIndex)
Returns the property at the given index.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 enity.RMSchema
getSchema()
Returns the top level entity which is the schema.void
removeProperty(java.lang.String name)
Removes a given property.void
setName(java.lang.String aName)
Sets the name of the entity.java.lang.String
toString()
Returns a string representation of entity (its name).RXElement
toXML(RXArchiver anArchiver)
XML archival.
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns the name of the entity.
-
setName
public void setName(java.lang.String aName)
Sets the name of the entity.
-
getSchema
public RMSchema getSchema()
Returns the top level entity which is the schema.
-
getPropertyCount
public int getPropertyCount()
Returns the number of properties.
-
getProperty
public RMProperty getProperty(int anIndex)
Returns the property at the given index.
-
getProperty
public RMProperty getProperty(java.lang.String aName)
Returns the property with the given name.
-
addProperty
public void addProperty(RMProperty aProperty)
Adds a given property.
-
removeProperty
public void removeProperty(java.lang.String name)
Removes a given property.
-
getAttributeCount
public int getAttributeCount()
Returns the number of attributes.
-
getAttribute
public RMProperty getAttribute(int anIndex)
Returns the attribute at the given index.
-
getAttribute
public RMProperty getAttribute(java.lang.String aName)
Returns the attribute with the given name.
-
getRelationCount
public int getRelationCount()
Returns the number of relations in the enity.
-
getRelation
public RMProperty getRelation(int anIndex)
Returns the relation at the given index.
-
getRelation
public RMProperty getRelation(java.lang.String aKeyPath)
Returns the relation for the given key path.
-
getEntity
public RMEntity getEntity(java.lang.String aKeyPath)
Returns the child entity for the key path evaluated from this entity.
-
getPrimaryCount
public int getPrimaryCount()
Returns the number of primary attributes for this entity.
-
getPrimary
public RMProperty getPrimary(int anIndex)
Returns the primary attribute at the given index.
-
equals
public boolean equals(java.lang.Object obj)
Standard equals method.- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
Returns a string representation of entity (its name).- Overrides:
toString
in classjava.lang.Object
-
toXML
public RXElement toXML(RXArchiver anArchiver)
XML archival.
-
fromXML
public java.lang.Object fromXML(RXArchiver anArchiver, RXElement anElement)
XML unarchival.
-
-