|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openmdx.base.accessor.jmi.spi.RefObject_1
public abstract class RefObject_1
Implementation of RefObject_1_0.
This implementation supports leightweight serialization. The only member is a handle to the class object.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface javax.jdo.spi.PersistenceCapable |
|---|
PersistenceCapable.ObjectIdFieldConsumer, PersistenceCapable.ObjectIdFieldManager, PersistenceCapable.ObjectIdFieldSupplier |
| Field Summary |
|---|
| Fields inherited from interface javax.jdo.spi.PersistenceCapable |
|---|
CHECK_READ, CHECK_WRITE, LOAD_REQUIRED, MEDIATE_READ, MEDIATE_WRITE, READ_OK, READ_WRITE_OK, SERIALIZABLE |
| Constructor Summary | |
|---|---|
RefObject_1(Object_1_0 object,
RefClass refClass)
|
|
RefObject_1(RefClass refClass)
|
|
| Method Summary | |
|---|---|
boolean |
equals(Object that)
|
void |
jdoCopyFields(Object other,
int[] fieldNumbers)
Copy field values from another instance of the same class to this instance. |
void |
jdoCopyKeyFieldsFromObjectId(PersistenceCapable.ObjectIdFieldConsumer fm,
Object oid)
Copy fields to an outside consumer from the key fields in the ObjectId. |
void |
jdoCopyKeyFieldsToObjectId(Object oid)
Copy fields from this PersistenceCapable instance to the Object Id instance. |
void |
jdoCopyKeyFieldsToObjectId(PersistenceCapable.ObjectIdFieldSupplier fm,
Object oid)
Copy fields from an outside source to the key fields in the ObjectId. |
Object |
jdoGetObjectId()
Return a copy of the JDO identity associated with this instance. |
PersistenceManager |
jdoGetPersistenceManager()
Return the associated PersistenceManager if there is one. |
Object |
jdoGetTransactionalObjectId()
Return a copy of the JDO identity associated with this instance. |
Object |
jdoGetVersion()
Return the version of this instance. |
boolean |
jdoIsDeleted()
Tests whether this object has been deleted. |
boolean |
jdoIsDetached()
Tests whether this object has been detached. |
boolean |
jdoIsDirty()
Tests whether this object is dirty. |
boolean |
jdoIsNew()
Tests whether this object has been newly made persistent. |
boolean |
jdoIsPersistent()
Tests whether this object is persistent. |
boolean |
jdoIsTransactional()
Tests whether this object is transactional. |
void |
jdoMakeDirty(String fieldName)
Explicitly mark this instance and this field dirty. |
PersistenceCapable |
jdoNewInstance(StateManager sm)
Return a new instance of this class, with the jdoStateManager set to the parameter, and jdoFlags set to LOAD_REQUIRED. |
PersistenceCapable |
jdoNewInstance(StateManager sm,
Object oid)
Return a new instance of this class, with the jdoStateManager set to the parameter, key fields initialized to the values in the oid, and jdoFlags set to LOAD_REQUIRED. |
Object |
jdoNewObjectIdInstance()
Create a new instance of the ObjectId class for this PersistenceCapable class and initialize the key fields from the instance on which this method is called. |
Object |
jdoNewObjectIdInstance(Object o)
Create a new instance of the class used for JDO identity, using the key constructor of the object id class. |
void |
jdoProvideField(int fieldNumber)
The owning StateManager uses this method to ask the instance to provide the value of the single field identified by fieldNumber. |
void |
jdoProvideFields(int[] fieldNumbers)
The owning StateManager uses this method to ask the instance to provide the values of the multiple fields identified by fieldNumbers. |
void |
jdoReplaceField(int fieldNumber)
The owning StateManager uses this method to ask the instance to replace the value of the single field identified by number. |
void |
jdoReplaceFields(int[] fieldNumbers)
The owning StateManager uses this method to ask the instance to replace the values of the multiple fields identified by number. |
void |
jdoReplaceFlags()
The owning StateManager uses this method to ask the instance to replace the value of the flags by calling back the StateManager replacingFlags method. |
void |
jdoReplaceStateManager(StateManager sm)
This method sets the StateManager instance that manages the state of this instance. |
void |
refAddEventListener(String feature,
EventListener listener)
Add an event listener. |
void |
refAddToUnitOfWork()
After this call the object observes unit of work boundaries. |
protected void |
refAddValue(String featureName,
int index,
Object value)
|
protected void |
refAddValue(String featureName,
Object value)
|
void |
refAddValue(String featureName,
Object qualifier,
Object value)
Adds the value to the feature with the specified qualifier. |
RefClass |
refClass()
|
Object |
refContext()
Returns application-defined context. |
Set |
refDefaultFetchGroup()
Returns the refDelegate().objDefaultFetchGroup() plus the set of all non-derived attributes of the object. |
Object_1_0 |
refDelegate()
Return the object which RefObject_1_0 delegates to. |
void |
refDelete()
|
void |
refFlush()
Flush the state of the instance to its provider. |
EventListener[] |
refGetEventListeners(String feature,
Class listenerType)
Get event listeners. |
Path |
refGetPath()
Returns the object's access path. |
Object |
refGetValue(RefObject feature)
|
Object |
refGetValue(RefObject feature,
int index)
|
Object |
refGetValue(RefObject feature,
Object qualifier,
boolean marshal)
Returns the value of feature identified by qualifier. |
Object |
refGetValue(String featureName)
|
protected Object |
refGetValue(String featureName,
int index)
feature must be attribute or reference stored as attribute |
protected Object |
refGetValue(String featureName,
Object qualifier)
|
long |
refGetValue(String featureName,
Object value,
long position)
Returns the value of feature. |
protected Object |
refGetValue(String featureName,
String qualifier)
Feature must be attribute or reference stored as attribute |
RefFeatured |
refImmediateComposite()
|
RefPackage |
refImmediatePackage()
|
void |
refInitialize(boolean setRequiredToNull,
boolean setOptionalToNull)
Initializes the object as follows: collections are cleared. primitive required attributes are set to default values: string = ""; number = 0; date = min date. |
void |
refInitialize(RefObject source)
Initializes the object based on the source object. |
Object |
refInvokeOperation(RefObject requestedOperation,
List args)
|
Object |
refInvokeOperation(String operationName,
List args)
|
boolean |
refIsDeleted()
Tests whether this object has been deleted. |
boolean |
refIsDirty()
Tests whether this object is dirty. |
boolean |
refIsInstanceOf(RefObject objType,
boolean considerSubtypes)
|
boolean |
refIsNew()
Tests whether this object has been newly made persistent. |
boolean |
refIsPersistent()
Tests whether this object is persistent. |
boolean |
refIsWriteProtected()
Tells whether this object is in read-only mode. |
RefObject |
refMetaObject()
|
String |
refMofId()
|
RefFeatured |
refOutermostComposite()
|
RefPackage |
refOutermostPackage()
|
void |
refRefresh()
Refresh the state of the instance from its provider. |
void |
refRefreshAsynchronously()
Refresh the state of the instance from its provider asynchrounously. |
void |
refRemoveEventListener(String feature,
EventListener listener)
Remove an event listener. |
void |
refRemoveFromUnitOfWork()
After this call the object ignores unit of work boundaries. |
protected void |
refRemoveValue(String featureName)
|
protected void |
refRemoveValue(String featureName,
int index)
|
void |
refRemoveValue(String featureName,
Object qualifier)
Removes qualified value from feature. |
void |
refRemoveValue(String featureName,
RefObject value)
Removes value from feature. |
void |
refSetValue(RefObject feature,
Object value)
|
protected void |
refSetValue(String featureName,
int index,
Object value)
|
void |
refSetValue(String featureName,
Object value)
|
void |
refSetValue(String featureName,
Object newValue,
long length)
Sets the value of feature. |
Collection |
refVerifyConstraints(boolean deepVerify)
|
void |
refWriteProtect()
Puts an object in read-only mode. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.jmi.reflect.RefBaseObject |
|---|
hashCode |
| Constructor Detail |
|---|
public RefObject_1(Object_1_0 object,
RefClass refClass)
public RefObject_1(RefClass refClass)
| Method Detail |
|---|
public final Object refGetValue(RefObject feature,
int index)
protected final Object refGetValue(String featureName,
int index)
protected final Object refGetValue(String featureName,
String qualifier)
protected final Object refGetValue(String featureName,
Object qualifier)
public final long refGetValue(String featureName,
Object value,
long position)
RefObject_1_0
refGetValue in interface RefObject_1_0featureName - feature to be retrieved.value - binary or character output stream.position - stream is returned starting from position.
protected final void refSetValue(String featureName,
int index,
Object value)
public final void refSetValue(String featureName,
Object newValue,
long length)
RefObject_1_0
refSetValue in interface RefObject_1_0featureName - feature to be retrieved.newValue - binary or character input stream.length - length of the stream.
protected final void refAddValue(String featureName,
int index,
Object value)
protected final void refAddValue(String featureName,
Object value)
protected final void refRemoveValue(String featureName,
int index)
protected final void refRemoveValue(String featureName)
public final boolean refIsInstanceOf(RefObject objType,
boolean considerSubtypes)
refIsInstanceOf in interface RefObjectpublic final RefClass refClass()
refClass in interface RefObjectpublic final RefFeatured refImmediateComposite()
refImmediateComposite in interface RefObjectpublic final RefFeatured refOutermostComposite()
refOutermostComposite in interface RefObjectpublic final void refDelete()
refDelete in interface RefObjectpublic final Object refGetValue(RefObject feature)
refGetValue in interface RefFeaturedpublic final Object refGetValue(String featureName)
refGetValue in interface RefFeatured
public final void refSetValue(RefObject feature,
Object value)
refSetValue in interface RefFeatured
public final void refSetValue(String featureName,
Object value)
refSetValue in interface RefFeatured
public final Object refInvokeOperation(RefObject requestedOperation,
List args)
refInvokeOperation in interface RefFeatured
public final Object refInvokeOperation(String operationName,
List args)
throws RefException
refInvokeOperation in interface RefFeaturedRefExceptionpublic final RefObject refMetaObject()
refMetaObject in interface RefBaseObjectpublic final RefPackage refImmediatePackage()
refImmediatePackage in interface RefBaseObjectpublic final RefPackage refOutermostPackage()
refOutermostPackage in interface RefBaseObjectpublic final String refMofId()
refMofId in interface RefBaseObjectpublic boolean equals(Object that)
equals in interface RefBaseObjectequals in class Objectpublic final Collection refVerifyConstraints(boolean deepVerify)
refVerifyConstraints in interface RefBaseObjectpublic final Path refGetPath()
RefObject_1_0
refGetPath in interface RefObject_1_0public final void refWriteProtect()
RefObject_1_0This method is idempotent.
refWriteProtect in interface RefObject_1_0public final void refAddToUnitOfWork()
RefObject_1_0This method is idempotent.
refAddToUnitOfWork in interface RefObject_1_0public final void refRemoveFromUnitOfWork()
RefObject_1_0This method is idempotent.
refRemoveFromUnitOfWork in interface RefObject_1_0public final boolean refIsWriteProtected()
RefObject_1_0
refIsWriteProtected in interface RefObject_1_0public final boolean refIsDirty()
RefObject_1_0Transient instances return false.
refIsDirty in interface RefObject_1_0public final boolean refIsPersistent()
RefObject_1_0
refIsPersistent in interface RefObject_1_0public final boolean refIsNew()
RefObject_1_0Transient instances return false.
refIsNew in interface RefObject_1_0public final boolean refIsDeleted()
RefObject_1_0
refIsDeleted in interface RefObject_1_0public final void refRefresh()
RefObject_1_0
refRefresh in interface RefObject_1_0public final void refFlush()
RefObject_1_0
refFlush in interface RefObject_1_0public void refRefreshAsynchronously()
RefObject_1_0
refRefreshAsynchronously in interface RefObject_1_0public Set refDefaultFetchGroup()
RefObject_1_0
refDefaultFetchGroup in interface RefObject_1_0
public final Object refGetValue(RefObject feature,
Object qualifier,
boolean marshal)
RefObject_1_0
refGetValue in interface RefObject_1_0feature - feature to be retrieved.qualifier - identifies object to be retrieved.marshal - if true the returned value is marshalled.
public final void refInitialize(boolean setRequiredToNull,
boolean setOptionalToNull)
RefObject_1_0
refInitialize in interface RefObject_1_0setRequiredToNull - if true, required attributes are set to null. Otherwise
they are initialized with a default value.setOptionalToNull - if true, optional features are set to true, otherwise
they are left untouched.public final void refInitialize(RefObject source)
RefObject_1_0
refInitialize in interface RefObject_1_0
public final void refAddValue(String featureName,
Object qualifier,
Object value)
RefObject_1_0
refAddValue in interface RefObject_1_0featureName - feature to add value.qualifier - qualifier of value to add.value - value to add.
public final void refRemoveValue(String featureName,
Object qualifier)
RefObject_1_0
refRemoveValue in interface RefObject_1_0featureName - qualified value is removed from feature.qualifier - value qualifier.
public final void refRemoveValue(String featureName,
RefObject value)
RefObject_1_0
refRemoveValue in interface RefObject_1_0featureName - value is removed from feature.value - value to be removed.public final Object_1_0 refDelegate()
RefObject_1_0
refDelegate in interface RefObject_1_0public final Object refContext()
RefObject_1_0
refContext in interface RefObject_1_0
public final void refAddEventListener(String feature,
EventListener listener)
throws ServiceException
RefObject_1_0
refAddEventListener in interface RefObject_1_0feature - restrict the listener to this feature;
or null if the listener is interested in all featureslistener - the event listener to be added
It is implementation dependent whether the feature name is verified or not.
ServiceException - BAD_MEMBER_NAME
if the object has no such feature or if a non-null
feature name is specified for an instance level event
public final void refRemoveEventListener(String feature,
EventListener listener)
throws ServiceException
RefObject_1_0It is implementation dependent whether feature name and listener class are verified.
refRemoveEventListener in interface RefObject_1_0feature - the name of the feature that was listened on,
or null if the listener is interested in all featureslistener - the event listener to be removed
ServiceException - BAD_MEMBER_NAME
if the object has no such feature or if a non-null
feature name is specified for an instance level event
public final EventListener[] refGetEventListeners(String feature,
Class listenerType)
throws ServiceException
RefObject_1_0
The feature argument is ignored for listeners registered
with a null feature argument.
It is implementation dependent whether feature name and listener type are verified.
refGetEventListeners in interface RefObject_1_0feature - the name of the feature that was listened on,
or null for listeners interested in all featureslistenerType - the type of the event listeners to be returned
ServiceException - BAD_MEMBER_NAME
if the object has no such feature or if a non-null
feature name is specified for an instance level eventpublic String toString()
toString in class Object
public void jdoCopyFields(Object other,
int[] fieldNumbers)
PersistenceCapableThis method will throw an exception if the other instance is not managed by the same StateManager as this instance.
jdoCopyFields in interface PersistenceCapableother - the PC instance from which field values are to be copiedfieldNumbers - the field numbers to be copied into this instance