net.sf.jzeno.model
Interface Entity

All Known Subinterfaces:
MutableEntity
All Known Implementing Classes:
AbstractEntity, AbstractMutableEntity, PersistentEnum

public interface Entity

All model beans must implement this interface.


Method Summary
 java.lang.Object getChangedValue(java.lang.String propertyName)
           
 java.util.Map getChangedValues()
           
 java.lang.Long getId()
           Subclasses should implement the 'id' property and map it to the right DB column..
 java.lang.Object getOriginalValue(java.lang.String propertyName)
           
 java.util.Map getOriginalValues()
          Must return the *internal* hashmap that is used for storing original values This is important because Entity detection in the AutoSync mechanism excludes the original values maps when it traverses an object graph.
 boolean isChanged()
           Returns true if any property has changed since it was loaded from the database.
 boolean isChanged(java.lang.String propertyName)
           Returns true if the given property has changed since it was loaded from the database.
 java.lang.Boolean isUnsaved(Entity entity)
           
 void onDelete(Entity entity, java.io.Serializable id, java.lang.Object[] state, java.lang.String[] propertyNames, org.hibernate.type.Type[] types)
           
 boolean onFlushDirty(Entity entity, java.io.Serializable id, java.lang.Object[] currentState, java.lang.Object[] previousState, java.lang.String[] propertyNames, org.hibernate.type.Type[] types)
           
 boolean onLoad(Entity entity, java.io.Serializable id, java.lang.Object[] state, java.lang.String[] propertyNames, org.hibernate.type.Type[] types)
           
 boolean onSave(Entity entity, java.io.Serializable arg1, java.lang.Object[] state, java.lang.String[] propertyNames, org.hibernate.type.Type[] types)
           
 void postFlush()
           
 void preFlush()
           
 void setId(java.lang.Long id)
           
 void snapshot()
           Store the current content of this entity, for difference analysis later.
 

Method Detail

getId

java.lang.Long getId()

Subclasses should implement the 'id' property and map it to the right DB column..


setId

void setId(java.lang.Long id)

isUnsaved

java.lang.Boolean isUnsaved(Entity entity)

onDelete

void onDelete(Entity entity,
              java.io.Serializable id,
              java.lang.Object[] state,
              java.lang.String[] propertyNames,
              org.hibernate.type.Type[] types)
              throws org.hibernate.CallbackException
Throws:
org.hibernate.CallbackException

onFlushDirty

boolean onFlushDirty(Entity entity,
                     java.io.Serializable id,
                     java.lang.Object[] currentState,
                     java.lang.Object[] previousState,
                     java.lang.String[] propertyNames,
                     org.hibernate.type.Type[] types)
                     throws org.hibernate.CallbackException
Throws:
org.hibernate.CallbackException

onLoad

boolean onLoad(Entity entity,
               java.io.Serializable id,
               java.lang.Object[] state,
               java.lang.String[] propertyNames,
               org.hibernate.type.Type[] types)
               throws org.hibernate.CallbackException
Throws:
org.hibernate.CallbackException

onSave

boolean onSave(Entity entity,
               java.io.Serializable arg1,
               java.lang.Object[] state,
               java.lang.String[] propertyNames,
               org.hibernate.type.Type[] types)
               throws org.hibernate.CallbackException
Throws:
org.hibernate.CallbackException

postFlush

void postFlush()

preFlush

void preFlush()

snapshot

void snapshot()

Store the current content of this entity, for difference analysis later. This operation is called after calling a business facade on all loaded objects by default.


getOriginalValues

java.util.Map getOriginalValues()
Must return the *internal* hashmap that is used for storing original values This is important because Entity detection in the AutoSync mechanism excludes the original values maps when it traverses an object graph.


getOriginalValue

java.lang.Object getOriginalValue(java.lang.String propertyName)

getChangedValues

java.util.Map getChangedValues()

getChangedValue

java.lang.Object getChangedValue(java.lang.String propertyName)

isChanged

boolean isChanged(java.lang.String propertyName)

Returns true if the given property has changed since it was loaded from the database.


isChanged

boolean isChanged()

Returns true if any property has changed since it was loaded from the database.