|
JADE Java Persistence API 1.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.jadeworld.jade.rootschema.Object
public class Object
The base class for all JADE-derived classes.
| Field Summary | |
|---|---|
long |
oid
Holds the encoded JADE oid (object identifier). |
| Constructor Summary | |
|---|---|
Object()
|
|
| Method Summary | |
|---|---|
boolean |
changeObjectVolatility(Object object,
int volatility,
boolean conditional)
Changes the volatility state of the persistent object specified in the object parameter. |
java.util.Calendar |
creationTime()
Returns the date and time at which the receiver was created as a date/time. |
int |
edition(Object entity)
Returns the JADE object edition value. |
boolean |
equals(java.lang.Object obj)
Equality test. |
void |
exclusiveLock(Object entity)
Attempts to acquire an exclusive lock on the object specified in the entity parameter. |
int |
getClassNumberForObject(Object obj)
Returns the number of the class specified in the obj parameter, even if this object is no longer valid. |
java.math.BigDecimal |
getInstanceIdForObject(Object obj)
Returns the instance identifier of the object specified in the obj parameter, even if this object is no longer valid. |
void |
getLockStatus(Object target,
int lockType,
int lockDuration,
Process lockedBy)
Returns the lock type and the lock duration of the current JADE process locks for the object specified in the target parameter. |
java.lang.String |
getName()
Returns a string containing the class of the receiver. |
java.lang.String |
getObjectStringForObject(Object object)
Returns a string representing the object specified in the obj parameter. |
int |
getObjectVolatility(Object object)
Returns the volatility state of the persistent object specified in the object parameter. |
java.lang.String |
getOidString()
Returns the object identifier (oid) of the receiver in a string format, even if this object is no longer valid. |
java.lang.String |
getOidStringForObject(Object obj)
Returns a string format of the object identifier (oid) specified in the obj parameter. |
java.lang.Object |
getPropertyValue(java.lang.String name)
Returns the value of the property specified in the name parameter. |
int |
hashCode()
Hash code calculation. |
boolean |
hasMembers(Collection coll)
Returns true if the collection specified in the coll parameter has any members or it returns false if the collection is empty. |
boolean |
isImportedObject(Object object)
Returns true if the object specified in the obj parameter is an instance of an imported class or it returns false if it is not an instance of an imported class. |
boolean |
isKindOf(java.lang.Class classObject)
Returns true if the receiver is an instance of the class specified in the classObject parameter. |
boolean |
isLockedByMe(Object target)
Returns true if the current process has the parameter object locked. |
boolean |
isObjectFrozen(Object object)
Returns true if the volatility state of the object specified in the object parameter is frozen (that is, cannot be updated). |
boolean |
isObjectNonSharedTransient(Object obj)
Returns true if the object specified in the obj parameter is a non-shared transient instance or it returns false if it is not, even if this object is no longer valid. |
boolean |
isObjectPersistent(Object obj)
Returns true if the object specified in the obj parameter is a persistent instance or it returns false if it is not. |
boolean |
isObjectSharedTransient(Object obj)
Returns true if the object specified in the obj parameter is a shared transient instance or it returns false if it is not. |
boolean |
isObjectStable(Object object)
Returns true if the volatility state of the object specified in the object parameter is stable (that is, it is not updated frequently). |
boolean |
isObjectTransient(Object obj)
Returns true if the object specified in the obj parameter is a shared or a non-shared transient instance, or it returns false if it is not. |
boolean |
isObjectVolatile(Object object)
Returns true if the volatility state of the object specified in the object parameter is volatile (that is, it is often updated, and is locked and unlocked in the usual way). |
boolean |
isSharedTransient()
Returns true if the receiver is a shared transient object. |
boolean |
isSystemObject()
Returns true if the receiver is an instance of a Jade system class. |
boolean |
isTransient()
Returns true if the receiver is a transient object. |
int |
latestEdition()
Returns the most-recently committed edition of the receiver as an integer value. |
void |
lock(Object entity,
int lockType,
int lockDuration,
int timeout)
Acquires the type of lock specified in the lockType parameter for the object specified in the entity parameter. |
void |
makeObjectFrozen(Object object)
Conditionally changes the volatility state of the persistent object specified in the object parameter to frozen. |
void |
makeObjectStable(Object object)
The makeObjectStable method of the Object class changes the volatility state of the persistent object specified in the object parameter to stable. |
void |
makeObjectVolatile(Object object)
The makeObjectVolatile method of the Object class changes the volatility state of the persistent object specified in the object parameter to volatile. |
void |
reserveLock(Object entity)
Attempts to acquire a reserve lock on the object specified in the lockTarget parameter. |
void |
sdeCauseEvent(int eventType,
boolean immediate,
java.lang.String userInfo)
|
void |
sdsCauseEvent(int eventType,
boolean immediate,
java.lang.String userInfo)
|
void |
setPropertyValue(java.lang.String name,
java.lang.String value)
Sets the property of the receiver specified in the name parameter to the value specified in the value parameter. |
void |
sharedLock(Object entity)
Attempts to acquire a shared lock on the object specified in the lockTarget parameter. |
java.lang.String |
toString()
Returns the value when an object instance is displayed. |
boolean |
tryLock(Object entity,
int lockType,
int lockDuration,
int timeout)
Attempts to acquire a lock of the specified type and duration, waiting up to the timeout period (in milliseconds) to obtain the lock on the object specified in the entity parameter. |
void |
unlock(Object entity)
Removes the current lock from the object specified in the entity parameter. |
void |
updateObjectEdition(Object object)
Update the object edition somehow. |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public long oid
| Constructor Detail |
|---|
public Object()
| Method Detail |
|---|
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
public boolean changeObjectVolatility(Object object,
int volatility,
boolean conditional)
Use the volatility parameter to specify the volatility state that you require, represented by one of the following global constants in the ObjectVolatility category.
Global Constant Integer Value DescriptionAs object volatility state is conditional by default, a frozen object can be updated only by first changing its volatility to Volatility_Stable or Volatility_Volatile.
Volatility_Frozen #04 Object is frozen (that is, it is not updated)
Volatility_Stable #08 Object is stable (that is, it is updated infrequently)
Volatility_Volatile #00 Object is volatile (that is, it is updated often)
Use the conditional parameter to specify whether the change is conditional or unconditional. Set the value of this parameter to false if the change is unconditional; that is, the change takes place even if an attempt is made to change the volatility of a frozen object that is being used by any other process.
object - The object whose state is to be changedvolatility - Option as aboveconditional - See abovepublic java.util.Calendar creationTime()
public int edition(Object entity)
entity - The JADE object to return the edition value for.
public void exclusiveLock(Object entity)
entity - The JADE entity to apply the exclusive lock to.public int getClassNumberForObject(Object obj)
obj - The object to get the class number for.
public java.math.BigDecimal getInstanceIdForObject(Object obj)
obj - The object to get the instance id of
public void getLockStatus(Object target,
int lockType,
int lockDuration,
Process lockedBy)
target - The object to check for lock status.lockType - Returns the lock type (see JadeConstants).lockDuration - Returns the lock duration (see JadeConstants).lockedBy - The JADE process instance.public java.lang.String getName()
public java.lang.String getObjectStringForObject(Object object)
object - The object to return the string for.public int getObjectVolatility(Object object)
Use the getObjectVolatility method to determine the volatility state of a persistent object. (All transient objects are considered volatile.) This method returns the volatility state of the object, represented by one of the following global constants in the ObjectVolatility category.
Global Constant Integer Value DescriptionVolatility_Frozen #04 Object is frozen (that is, it is not updated)
Volatility_Stable #08 Object is stable (that is, it is updated infrequently)
Volatility_Volatile #00 Object is volatile (that is, it is updated often)
object - The object to return the volatility state for.public java.lang.String getOidString()
The formats of the object id for shared and exclusive references are listed in the following table.
Type of Reference Format Example Shared class-id.instance-id "305.1208" Exclusive class-id.instance-id.parent-class-id.sublevel.sub-id "66.101.305.2.1"
Tip When you already have the object, calling self.getOidStringForObject(self) is significantly faster than calling the getOidString method.
public java.lang.String getOidStringForObject(Object obj)
The formats of the object id for shared and exclusive references are listed in the following table.
Type of Reference Format Example Shared class-id.instance-id "305.1208" Exclusive class-id.instance-id.parent-class-id.sublevel.sub-id "66.101.305.2.1"Caution For instances of classes with large class numbers, the class identifier and parent class identifier parts of the string are not the same as the class number returned by the Object class
getObjectStringForObject(com.jadeworld.jade.rootschema.Object) method.
For details about returning a string of a specified object as an oid-like string based on class
numbers and a following optional lifetime indication, see the Object class
getObjectStringForObject(com.jadeworld.jade.rootschema.Object) method.
obj - The object to return the oid string for.
public java.lang.Object getPropertyValue(java.lang.String name)
name - The JADE name of the property.
public boolean hasMembers(Collection coll)
The specified collection must be a persistent instance of an exclusive collection for which the Delete when emptied check box is checked on the Tuning sheet of the Define Class dialog. (For details, see "Tuning Collection Classes" under "Defining Your Own Classes", in Chapter 3 of your JADE Users Guide.)
If you call this method in a condition used as a constraint, the value of the coll parameter must be an unqualified reference of the receiver (that is, an exclusive collection defined on the receiver).
An exception is raised if you call this method for a transient collection instance or for a class that does not have the Delete when emptied check box on the Tuning sheet of the Define Class dialog checked.
coll - The collection to be checked.
public boolean isImportedObject(Object object)
object - The object to be checked.
public boolean isKindOf(java.lang.Class classObject)
This method returns false if the receiver is not an instance of the specified class. (Use the hasInstance method of the Class class to check if an instance of a class exists or it has been an instance of the class, without causing an exception if the reference is invalid.)
public boolean isLockedByMe(Object target)
target - The JADE entity to do the lock check on.
public boolean isObjectFrozen(Object object)
object - The object to be checked.
public boolean isObjectNonSharedTransient(Object obj)
obj - The object to be checked.
public boolean isObjectPersistent(Object obj)
obj - The object to be checked.
public boolean isObjectSharedTransient(Object obj)
obj - The object to be checked.
public boolean isObjectStable(Object object)
object - The object to be checked.
public boolean isObjectTransient(Object obj)
obj - The object to be checked.
public boolean isObjectVolatile(Object object)
object - The object to be checked.
public boolean isSharedTransient()
public boolean isSystemObject()
public boolean isTransient()
public int latestEdition()
If the receiver of the latestEdition method is being updated by the same process, the updated edition is returned. Other processes will instead have the most-recently committed edition returned.
public void lock(Object entity,
int lockType,
int lockDuration,
int timeout)
entity - The JADE object to be locked.lockType - The type of lock.lockDuration - The duration of the lock.timeout - The number of milliseconds for the timeout.public void makeObjectFrozen(Object object)
changeObjectVolatility(com.jadeworld.jade.rootschema.Object, int, boolean) method to change the volatility state of an object.)For details, see "Cache Concurrency", in Chapter 9 of your JADE Developer's Reference.
A frozen object can be updated only by first changing its volatility to stable or to volatile (that is, by calling the makeObjectStable or makeObjectVolatile method).
object - The object to change the volatility state to frozen.public void makeObjectStable(Object object)
For details, see "Cache Concurrency", in Chapter 9 of your JADE Developer's Reference.
When attempting to change the volatility of a frozen object, an exception is raised if the specified object is being used by any process other than the process invoking the method.
A frozen object can be updated only by first changing its volatility to stable or to volatile (that is, by calling the makeObjectStable or makeObjectVolatile method).
object - The object to change the volatility state to stable.public void makeObjectVolatile(Object object)
For details, see "Cache Concurrency", in Chapter 9 of your JADE Developer's Reference.
When attempting to change the volatility of a frozen object, an exception is raised if the specified object is being used by any process other than the process invoking the method.
object - The object to change the volatility state to volatile.public void reserveLock(Object entity)
entity - The JADE object to be locked.
public void sdeCauseEvent(int eventType,
boolean immediate,
java.lang.String userInfo)
public void sdsCauseEvent(int eventType,
boolean immediate,
java.lang.String userInfo)
public void setPropertyValue(java.lang.String name,
java.lang.String value)
Note You should not use the setPropertyValue method as a replacement for direct assignment to
a property when the property name is known at compile time, as it incurs additional overhead and
prevents the compiler from checking the type compatibility of the value being assigned.
You should use it only in special cases when property names are determined at run time.
name - The JADE name of the object property.value - The value to which this property is to be set.public void sharedLock(Object entity)
entity - The object to be locked.
public boolean tryLock(Object entity,
int lockType,
int lockDuration,
int timeout)
entity - The JADE object to be locked.lockType - The type of lock.lockDuration - The duration of the lock.timeout - The number of milliseconds for the timeout.
public void unlock(Object entity)
entity - The JADE object to be unlocked.public void updateObjectEdition(Object object)
object - The object to be updated.
|
JADE Java Persistence API 1.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||