Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.modama.framework.entities
Class AbstractEntity  view AbstractEntity download AbstractEntity.java

java.lang.Object
  extended byorg.modama.ModelStates
      extended byorg.modama.Model
          extended byorg.modama.framework.AbstractFrameworkModel
              extended byorg.modama.framework.entities.AbstractEntity
Direct Known Subclasses:
AbstractEntityList, ImageEntity, NumberEntity

public abstract class AbstractEntity
extends org.modama.framework.AbstractFrameworkModel

The base class for all entities.
A entity a piece of data, wrapped so it can be loaded, saved,...
An entity has a name to display, a fullname if additional naming is required (i.e. filename) and some data and a unique ID


Field Summary
protected  java.lang.String fullName
          the full name
protected  java.lang.Long ID
          a unique id
protected static long IDcnt
          counter to create uniqe ids
static java.lang.String PROP_DATA
           
static java.lang.String PROP_FULLNAME
           
 
Fields inherited from class org.modama.framework.AbstractFrameworkModel
name, PROP_NAME
 
Fields inherited from class org.modama.Model
changeAgent, EVENT_FIRED, state
 
Fields inherited from class org.modama.ModelStates
CREATED, DELETED, MODIFIED, SAVED
 
Constructor Summary
AbstractEntity()
          create an empty entity
AbstractEntity(java.lang.String name)
          make entity with given name
 
Method Summary
protected  void create()
          put the entity to the world
 void delete()
          delete the entity from the world
abstract  java.lang.Object getData()
          getter for data
 java.lang.String getFullName()
          getter for full name
 java.lang.Object getID()
           
abstract  boolean isEmpty()
          should return true if their is no data, this is used by the operations to know wether they can execute
abstract  void setData(java.lang.Object data)
          setter for data, cause fire
 void setFullName(java.lang.String fullName)
          setter for fullname, causes fire
 
Methods inherited from class org.modama.framework.AbstractFrameworkModel
getName, load, save, setName
 
Methods inherited from class org.modama.Model
addPropertyChangeListener, addPropertyChangeListener, fire, fire, fire, getState, removePropertyChangeListener, removePropertyChangeListener, setState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_FULLNAME

public static final java.lang.String PROP_FULLNAME
See Also:
Constant Field Values

PROP_DATA

public static final java.lang.String PROP_DATA
See Also:
Constant Field Values

fullName

protected java.lang.String fullName
the full name


ID

protected java.lang.Long ID
a unique id


IDcnt

protected static long IDcnt
counter to create uniqe ids

Constructor Detail

AbstractEntity

public AbstractEntity()
create an empty entity


AbstractEntity

public AbstractEntity(java.lang.String name)
make entity with given name

Method Detail

create

protected void create()
put the entity to the world


delete

public void delete()
            throws org.modama.framework.exceptions.DeleteCancelledException
delete the entity from the world


getFullName

public java.lang.String getFullName()
getter for full name


setFullName

public void setFullName(java.lang.String fullName)
setter for fullname, causes fire


isEmpty

public abstract boolean isEmpty()
should return true if their is no data, this is used by the operations to know wether they can execute


getData

public abstract java.lang.Object getData()
getter for data


setData

public abstract void setData(java.lang.Object data)
setter for data, cause fire


getID

public java.lang.Object getID()