Package com.ribs.datasource
Class RMEntity
java.lang.Object
com.ribs.datasource.RMEntity
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.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addProperty
(RMProperty aProperty) Adds a given property.boolean
Standard equals method.fromXML
(RXArchiver anArchiver, RXElement anElement) XML unarchival.getAttribute
(int anIndex) Returns the attribute at the given index.getAttribute
(String aName) Returns the attribute with the given name.int
Returns the number of attributes.Returns the child entity for the key path evaluated from this entity.getName()
Returns the name of the entity.getPrimary
(int anIndex) Returns the primary attribute at the given index.int
Returns the number of primary attributes for this entity.getProperty
(int anIndex) Returns the property at the given index.getProperty
(String aName) Returns the property with the given name.int
Returns the number of properties.getRelation
(int anIndex) Returns the relation at the given index.getRelation
(String aKeyPath) Returns the relation for the given key path.int
Returns the number of relations in the enity.Returns the top level entity which is the schema.void
removeProperty
(String name) Removes a given property.void
Sets the name of the entity.toString()
Returns a string representation of entity (its name).toXML
(RXArchiver anArchiver) XML archival.
-
Constructor Details
-
RMEntity
public RMEntity()Creates an empty entity. -
RMEntity
Creates an entity with the given name.
-
-
Method Details
-
getName
Returns the name of the entity. -
setName
Sets the name of the entity. -
getSchema
Returns the top level entity which is the schema. -
getPropertyCount
public int getPropertyCount()Returns the number of properties. -
getProperty
Returns the property at the given index. -
getProperty
Returns the property with the given name. -
addProperty
Adds a given property. -
removeProperty
Removes a given property. -
getAttributeCount
public int getAttributeCount()Returns the number of attributes. -
getAttribute
Returns the attribute at the given index. -
getAttribute
Returns the attribute with the given name. -
getRelationCount
public int getRelationCount()Returns the number of relations in the enity. -
getRelation
Returns the relation at the given index. -
getRelation
Returns the relation for the given key path. -
getEntity
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
Returns the primary attribute at the given index. -
equals
Standard equals method. -
toString
Returns a string representation of entity (its name). -
toXML
XML archival. -
fromXML
XML unarchival.
-