org.meta2project.storage
Class DBEntity

java.lang.Object
  extended by org.meta2project.storage.DBEntity
All Implemented Interfaces:
AnnotatedEntity, NamedEntity
Direct Known Subclasses:
DBOntClass, DBOntObjectBase, DBOProperty, DBTProperty, DBType

public abstract class DBEntity
extends java.lang.Object
implements AnnotatedEntity, NamedEntity

Author:
Anton Malykh

Field Summary
 
Fields inherited from interface org.meta2project.model.AnnotatedEntity
CASCADE, CASCADE_DELETE_VALUE, COMMENT, MAX_CARD, MIN_CARD, MODEL_URI, TITLE
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getAnnotation(java.lang.String name)
          Get annotation value by this name.
 java.util.List<java.lang.String> getAnnotationNames()
          Get annotation names for this entity.
protected abstract  EntityCache getEntityCache()
           
 java.lang.String getFullName()
          Get the full name of the entity.
 long getId()
           
 java.lang.String getName()
          Get the short name of the entity
 Ontology getOntology()
          Get the entity's ontology
 int hashCode()
           
 void putAnnotation(java.lang.String name, java.lang.String value)
          Put annotation value.
 void setName(java.lang.String name)
          Set short name
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.meta2project.model.NamedEntity
delete
 

Method Detail

getId

public long getId()

getOntology

public Ontology getOntology()
Description copied from interface: NamedEntity
Get the entity's ontology

Specified by:
getOntology in interface NamedEntity
Returns:
ontology

getName

public java.lang.String getName()
Description copied from interface: NamedEntity
Get the short name of the entity

Specified by:
getName in interface NamedEntity
Returns:
short name

getEntityCache

protected abstract EntityCache getEntityCache()

setName

public void setName(java.lang.String name)
Description copied from interface: NamedEntity
Set short name

Specified by:
setName in interface NamedEntity
Parameters:
name - new short name

getFullName

public java.lang.String getFullName()
Description copied from interface: NamedEntity
Get the full name of the entity.

Specified by:
getFullName in interface NamedEntity
Returns:
имя

getAnnotationNames

public java.util.List<java.lang.String> getAnnotationNames()
Description copied from interface: AnnotatedEntity
Get annotation names for this entity.

Specified by:
getAnnotationNames in interface AnnotatedEntity
Returns:
name list (in ascending order)

getAnnotation

public java.lang.String getAnnotation(java.lang.String name)
Description copied from interface: AnnotatedEntity
Get annotation value by this name.

Specified by:
getAnnotation in interface AnnotatedEntity
Parameters:
name - annotation name
Returns:
annotation value; null if there is no value for this name

putAnnotation

public void putAnnotation(java.lang.String name,
                          java.lang.String value)
Description copied from interface: AnnotatedEntity
Put annotation value.

Specified by:
putAnnotation in interface AnnotatedEntity
Parameters:
name - annotation name
value - annotation value; value will be removed if null

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object