|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjcreek.representation.LocalEntityData
Implementation of EntityData that will store data locally in memory or by serialization.
Method Summary | |
void |
addConstraint(Constraint constraint)
Adds a constraint to the entity |
void |
addRelation(Relation relation)
Adds a relation to the list of relations from this entity. |
void |
addRelationInstance(Relation relation)
Registers a relation as beeing an instance of this entity (which then represents a relation type). |
long |
getCreationTime()
Returns the time of creation for this entity in the same format as System.getCurrentMillis(); |
java.lang.String |
getDescription()
Returns the description of this entity. |
java.io.Serializable |
getEntityObject()
Returns the current (if any) data object encapsulated by this entity. |
java.lang.Object |
getID()
Returns a unique ID for the entity this EntityData represents. |
Constraint[] |
getLocalConstraints()
Returns all the relations from this entity. |
Relation[] |
getLocalRelations()
Returns all the relations from this entity. |
Relation[] |
getLocalRelations(Entity[] relationTypes)
Returns the local relations from the entity represented by this object, where the type of each relation must be in the array of relation types supplied to this method. |
java.lang.String |
getName()
Gives the name of this entity. |
Relation[] |
getRelationInstances()
Returns the Relation objects that are of the relation type represented by this entity. |
void |
remove()
Permanently deletes the entity. |
void |
removeConstraint(Constraint c)
Removes a constraint from the entity |
void |
removeRelation(Relation relation)
Removes a relation to the list of relation from this entity. |
void |
removeRelationInstance(Relation relation)
Removes a relation as beeing an instance of this entity (which then represents a relation type). |
void |
setCreationTime(long time)
Sets the creation time. |
void |
setDescription(java.lang.String description)
Sets the description of this entity. |
void |
setEntityObject(java.io.Serializable object)
Sets data object encapsulated by this entity. |
void |
setName(java.lang.String name)
Sets the name of this entity. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public java.lang.Object getID()
getID
in interface EntityData
public void setName(java.lang.String name)
setName
in interface EntityData
name
- The new name of the entity.public java.lang.String getName()
getName
in interface EntityData
public void setDescription(java.lang.String description)
setDescription
in interface EntityData
description
- The description String.public java.lang.String getDescription()
getDescription
in interface EntityData
public Relation[] getRelationInstances()
getRelationInstances
in interface EntityData
public void addRelationInstance(Relation relation)
addRelationInstance
in interface EntityData
public void removeRelationInstance(Relation relation)
removeRelationInstance
in interface EntityData
relation
- The relation to remove.public void addRelation(Relation relation)
addRelation
in interface EntityData
relation
- The relation to add.public void removeRelation(Relation relation)
removeRelation
in interface EntityData
relation
- The relation to remove.public long getCreationTime()
getCreationTime
in interface EntityData
public void setCreationTime(long time)
setCreationTime
in interface EntityData
time
- The time in the format of System.getCurrentMillis() this entity was created.public Relation[] getLocalRelations(Entity[] relationTypes)
getLocalRelations
in interface EntityData
relationTypes
- An array of the relation types of relations to return.public Relation[] getLocalRelations()
getLocalRelations
in interface EntityData
public java.io.Serializable getEntityObject()
getEntityObject
in interface EntityData
public void setEntityObject(java.io.Serializable object)
setEntityObject
in interface EntityData
object
- Any Java object that implements the Serializable interface.public void remove()
remove
in interface EntityData
public void addConstraint(Constraint constraint)
addConstraint
in interface EntityData
constraint
- the constraint to be addedpublic Constraint[] getLocalConstraints()
getLocalConstraints
in interface EntityData
public void removeConstraint(Constraint c)
removeConstraint
in interface EntityData
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |