|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sybase.persistence.EntityClass
public class EntityClass
An utility to invoke Entity methods
Field Summary | |
---|---|
protected EntityMetaData |
__md
|
protected ReflectionManager |
__rm
|
Constructor Summary | |
---|---|
EntityClass()
Creates a instance of EntityClass |
Method Summary | |
---|---|
void |
cancelPending(java.lang.Object entity)
Calls the entity's cancelPending method |
void |
cancelPendingOperations()
Calls the entity class' cancelPendingOperations method |
void |
create(java.lang.Object entity)
Calls the entity's create method |
void |
delete(java.lang.Object entity)
Calls the entity's delete method |
ObjectList |
findWithQuery(Query query)
Calls the entity's findWithQuery method |
EntityClass |
finishInit()
Sybase internal use only. |
static EntityClass |
getInstance(EntityMetaData md,
ReflectionManager rm)
Creates an instance of EntityClass using given Entity MetaData and Object Manager |
EntityMetaData |
getMd()
Gets entity metadata |
ReflectionManager |
getRm()
Sets object manager |
java.lang.Object |
getValue(java.lang.Object entity,
AttributeMetaData attribute)
Gets a value of the attribute of the Entity |
java.lang.Object |
invoke(java.lang.Object entity,
OperationMetaData operation,
ObjectList parameters)
Invokes the operation of the entity using given parameters |
boolean |
isCreated(java.lang.Object entity)
Returns true if the entity has been created in database. |
boolean |
isDeleted(java.lang.Object entity)
Returns true if the entity has been marked as deleted locally. |
boolean |
isDirty(java.lang.Object entity)
Returns true if the entity is updated in memory. |
boolean |
isNew(java.lang.Object entity)
Returns true if the entity is created in memory. |
boolean |
isPending(java.lang.Object entity)
Returns true if the entity has pending operations. |
boolean |
isUpdated(java.lang.Object entity)
Returns true if the entity has been updated in database. |
java.lang.Object |
newObject()
Creates an instance of the Entity |
void |
refresh(java.lang.Object entity)
Calls the entity's refresh method |
void |
save(java.lang.Object entity)
Calls the entity's save method |
void |
setMd(EntityMetaData _md)
Sets entity metadata |
void |
setRm(ReflectionManager _rm)
Creates an instance of EntityClass using given Entity MetaData and Object Manager |
void |
setValue(java.lang.Object entity,
AttributeMetaData attribute,
java.lang.Object value)
Sets a value of the attribute of the Entity |
void |
submitPending(java.lang.Object entity)
Calls the entity's submitPending method |
void |
submitPendingOperations()
Calls the entity class' submitPendingOperations method |
void |
update(java.lang.Object entity)
Calls the entity's update method |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected EntityMetaData __md
protected ReflectionManager __rm
Constructor Detail |
---|
public EntityClass()
Method Detail |
---|
public EntityMetaData getMd()
public void setMd(EntityMetaData _md)
public ReflectionManager getRm()
public void setRm(ReflectionManager _rm)
md
- The entity meta data.rm
- The object manager.public static EntityClass getInstance(EntityMetaData md, ReflectionManager rm)
md
- The entity meta data.rm
- The object manager.public java.lang.Object newObject()
public java.lang.Object getValue(java.lang.Object entity, AttributeMetaData attribute)
attribute
- The attribute meta datapublic void setValue(java.lang.Object entity, AttributeMetaData attribute, java.lang.Object value)
attribute
- The attribute meta datavalue
- The value to be setpublic java.lang.Object invoke(java.lang.Object entity, OperationMetaData operation, ObjectList parameters)
entity
- The entityoperation
- The operation meta dataparameters
- The parameters to be used when invoke the operationpublic boolean isNew(java.lang.Object entity)
entity
- The entity to checkpublic boolean isDirty(java.lang.Object entity)
entity
- The entity to checkpublic boolean isPending(java.lang.Object entity)
entity
- The entity to checkpublic boolean isCreated(java.lang.Object entity)
entity
- The entity to checkpublic boolean isUpdated(java.lang.Object entity)
entity
- The entity to checkpublic boolean isDeleted(java.lang.Object entity)
entity
- The entity to checkpublic ObjectList findWithQuery(Query query)
query
- The Query objectpublic void save(java.lang.Object entity)
entity
- The entity objectpublic void create(java.lang.Object entity)
entity
- The entity objectpublic void update(java.lang.Object entity)
entity
- The entity objectpublic void delete(java.lang.Object entity)
entity
- The entity objectpublic void refresh(java.lang.Object entity)
entity
- The entity objectpublic void cancelPending(java.lang.Object entity)
entity
- The entity objectpublic void submitPending(java.lang.Object entity)
entity
- The entity objectpublic void cancelPendingOperations()
public void submitPendingOperations()
public EntityClass finishInit()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |