Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

oracle.jbo.server
Interface Entity

All Superinterfaces:
AttributeList, Row, TransactionListener, TransactionPostListener, ValidationListener, ValidationManager
All Known Implementing Classes:
EntityImpl

public interface Entity
extends Row, ValidationListener, TransactionListener, ValidationManager, TransactionPostListener


Field Summary
static byte STATUS_DEAD
          Indicates that the Entity Object is a new row that has been discarded.
static byte STATUS_DELETED
          Indicates that the Entity Object's row has been deleted.
static byte STATUS_MODIFIED
          Indicates that the Entity Object's row is changed.
static byte STATUS_UNMODIFIED
          Indicates that the Entity Object's row is unchanged or has been updated.
 
Fields inherited from interface oracle.jbo.Row
CLASS_INSTANCE, EFFDT_DELETE_FUTURE_CHANGE_MODE, EFFDT_DELETE_MODE, EFFDT_DELETE_NEXT_CHANGE_MODE, EFFDT_DELETE_ZAP_MODE, EFFDT_EXPERT_MODE, EFFDT_NONE_MODE, EFFDT_UPDATE_CHANGE_INSERT_MODE, EFFDT_UPDATE_CORRECTION, EFFDT_UPDATE_MODE, EFFDT_UPDATE_OVERRIDE_MODE, REFRESH_CONTAINEES, REFRESH_FORGET_NEW_ROWS, REFRESH_REMOVE_NEW_ROWS, REFRESH_UNDO_CHANGES, REFRESH_WITH_DB_FORGET_CHANGES, REFRESH_WITH_DB_ONLY_IF_UNCHANGED, STATUS_INITIALIZED, STATUS_NEW
 
Method Summary
 void addTransactionPostListener(TransactionPostListener listener)
           
 void addTransactionPostListenerNoCheck(TransactionPostListener listener)
           
 byte getEntityState()
          Gets this Entity Object's current entity-state.
 byte getPostState()
          Gets this Entity Object's current post-state.
 Key getPrimaryKey()
          Returns the primay key for this Entity Object's row.
 boolean isValid()
          Returns the state of this Entity Object's validity flag.
 void removeTransactionPostListener(TransactionPostListener listener)
           
 void revert()
          Reverts this Entity Object's row to the database's values.
 
Methods inherited from interface oracle.jbo.Row
getEffectiveDateMode, getKey, getStructureDef, isAttributeUpdateable, isDead, lock, refresh, remove, removeAndRetain, removeFromCollection, setAttributeValues, setEffectiveDateMode, setNewRowState, validate
 
Methods inherited from interface oracle.jbo.AttributeList
getAttribute, getAttribute, getAttributeCount, getAttributeIndexOf, getAttributeNames, getAttributeValues, setAttribute, setAttribute
 
Methods inherited from interface oracle.jbo.server.ValidationListener
validate
 
Methods inherited from interface oracle.jbo.server.TransactionListener
afterCommit, afterRemove, afterRollback, beforeCommit, beforeRollback, isTransientTransactionListener
 
Methods inherited from interface oracle.jbo.server.ValidationManager
addToValidationListeners, validate
 
Methods inherited from interface oracle.jbo.server.TransactionPostListener
getTransPostHandle, isPostedToDB, isTransientTransactionPostListener, postChanges, setPostedToDB, setTransPostHandle
 

Field Detail

STATUS_UNMODIFIED

static final byte STATUS_UNMODIFIED
Indicates that the Entity Object's row is unchanged or has been updated.

See Also:
Constant Field Values

STATUS_MODIFIED

static final byte STATUS_MODIFIED
Indicates that the Entity Object's row is changed.

See Also:
Constant Field Values

STATUS_DELETED

static final byte STATUS_DELETED
Indicates that the Entity Object's row has been deleted.

See Also:
Constant Field Values

STATUS_DEAD

static final byte STATUS_DEAD
Indicates that the Entity Object is a new row that has been discarded.

See Also:
Constant Field Values
Method Detail

isValid

boolean isValid()
Returns the state of this Entity Object's validity flag. This predecate does not perform a validity test.

An Entity Object is marked valid if it has been validated and not subsequently modified or set invalid.

Specified by:
isValid in interface ValidationListener
Returns:
true if this Entity Object has been validated.

getPrimaryKey

Key getPrimaryKey()
Returns the primay key for this Entity Object's row. For example, if you are comparing two Entity Objects, you can compare the keys instead of comparing the Entities.

Typically, this method should not be overridden.

Returns:
the primary key.

getEntityState

byte getEntityState()
Gets this Entity Object's current entity-state. An Entity Object's state can be one of:

Returns:
one of STATUS_UNMODIFIED, STATUS_MODIFIED, STATUS_NEW, STATUS_DELETED, or STATUS_DEAD

getPostState

byte getPostState()
Gets this Entity Object's current post-state. The current post state can be one of:

Returns:
one of STATUS_UNMODIFIED, STATUS_MODIFIED, STATUS_NEW, STATUS_DELETED, or STATUS_DEAD

revert

void revert()
Reverts this Entity Object's row to the database's values.

Calling this method will either reset the attribute values to their database values or revert them to their default values. If the Entity Object is posted, all the attributes revert to the to unread state, so that a subsequent EntityImpl.getAttribute(int index) call will refresh all attributes from the database.

See Also:
EntityImpl.getAttribute(int index)

addTransactionPostListener

void addTransactionPostListener(TransactionPostListener listener)

addTransactionPostListenerNoCheck

void addTransactionPostListenerNoCheck(TransactionPostListener listener)

removeTransactionPostListener

void removeTransactionPostListener(TransactionPostListener listener)

Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

Copyright © 2011, Oracle and/or its affiliates. All rights reserved.