|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Entity
A representation of a named entity.
An Entity has an unique numeric id,
a short name (eg a user's login name),
a long name (eg a user's full name)
and an enclosing EntityTable which accesses other Entities of this type.
| Field Summary | |
|---|---|
static String |
DEFAULT_ID_ATTRIBUTENAME
The default attribute name for the identity field: ID. |
static long |
ID_NULL
A sentinel value indicating no id value: -1. |
| Method Summary | |
|---|---|
Object |
getAttribute(String name)
Return the named attribute value from this entity. |
Map |
getAttributes()
Return the named attributes and values of this Entity. |
long |
getDatedAttribute(String name)
Return the milliseconds value corresponding to the named attribute value from this entity. |
EntityTable |
getEntityTable()
Return this entity's enclosing EntityTable. |
long |
getID()
Return the unique id for this Entity. |
int |
getIndex()
Return the index of this Entity in the enclosing EntityTable. |
String |
getLongName()
Return the long (descriptive) name for this entity. |
long |
getNumericAttribute(String name)
Return the numeric value of the named attribute value from this entity, which must be a Number. |
String |
getShortName()
Return the short name for this entity. |
void |
setAttribute(String name,
Object value)
Set the named attribute value from this entity. |
void |
setLongName(String newname)
Set the Entity's long name. |
void |
setShortName(String newname)
Set the Entity's short name. |
| Methods inherited from interface javax.swing.tree.TreeNode |
|---|
children, getAllowsChildren, getChildAt, getChildCount, getIndex, getParent, isLeaf |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Field Detail |
|---|
static final long ID_NULL
static final String DEFAULT_ID_ATTRIBUTENAME
| Method Detail |
|---|
EntityTable getEntityTable()
EntityTable.
long getID()
getID in interface HasIDint getIndex()
EntityTable.
String getShortName()
void setShortName(String newname)
EntityTables this may be unimplemented.
newname - the new short nameString getLongName()
void setLongName(String newname)
newname - the new long nameMap getAttributes()
EntityTable.
Map
to track subsequent changes to the Entity.
getEntityTable()Object getAttribute(String name)
name - the attribute name
long getNumericAttribute(String name)
Number.
name - the attribute name
long getDatedAttribute(String name)
Number (if the date is stored as milliseconds)
or a Date.
name - the attribute name
void setAttribute(String name,
Object value)
name - the attribute namevalue - the new value
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||