org.openmdx.base.accessor.jmi.spi
Class RefObject_1

java.lang.Object
  extended by org.openmdx.base.accessor.jmi.spi.RefObject_1
All Implemented Interfaces:
Serializable, PersistenceCapable, RefBaseObject, RefFeatured, RefObject, RefObject_1_0
Direct Known Subclasses:
AliasTypeImpl, AssociationEndImpl, AssociationImpl, AttributeImpl, AuditableImpl, AuthorityImpl, BasicObjectImpl, BasicStateImpl, BehaviouralFeatureImpl, BooleanPropertyImpl, BooleanPropertyImpl, ClassifierImpl, ClassImpl, CollectionTypeImpl, ComponentImpl, ConfigurationImpl, ConnectionImpl, ConstantImpl, ConstraintImpl, ContextCapableImpl, ContextImpl, DatabaseConnectorImpl, DatabaseImpl, DatabaseResourceReferenceImpl, DataproviderBooleanPropertyImpl, DataproviderConnectorImpl, DataproviderImpl, DataproviderIntegerPropertyImpl, DataproviderPropertyImpl, DataproviderResourceImpl, DataproviderResourceReferenceImpl, DataproviderStringPropertyImpl, DataproviderTypeBooleanPropertyImpl, DataproviderTypeImpl, DataproviderTypeIntegerPropertyImpl, DataproviderTypePropertyImpl, DataproviderTypeStringPropertyImpl, DatastoreImpl, DatatypeImpl, DateStateExcludingEndImpl, DateStateImpl, DateTimeStateImpl, DecimalPropertyImpl, DecimalPropertyImpl, DeploymentUnitImpl, DomainImpl, DomainImpl, ElementImpl, EnumerationTypeImpl, ExceptionImpl, ExtentCapableImpl, FeatureImpl, FilterImpl, GeneralizableElementImpl, GenericResourceReferenceImpl, HistoryStateImpl, HttpUrlConnectorImpl, ImportImpl, InboundCommunicationImpl, IndexImpl, InstanceImpl, IntegerPropertyImpl, IntegerPropertyImpl, InvolvedImpl, LockImpl, ModuleImpl, NamespaceImpl, NamespaceImpl, OperationImpl, OptimisticLockImpl, OutboundCommunicationImpl, PackageImpl, ParameterImpl, PreferencesImpl, PrimitiveTypeImpl, PropertyImpl, PropertyImpl, PropertySetImpl, ProviderImpl, QueryFilterImpl, ReferenceImpl, ResourceAdapterBooleanPropertyImpl, ResourceAdapterImpl, ResourceAdapterIntegerPropertyImpl, ResourceAdapterPropertyImpl, ResourceAdapterStringPropertyImpl, ResourceReferenceImpl, RoleCapableImpl, RoleImpl, RoleTypeImpl, SegmentImpl, SegmentImpl, SegmentImpl, SegmentImpl, SegmentImpl, SegmentImpl, SequenceImpl, StateCapableImpl, StatefulConnectionImpl, StateImpl, StatelessConnectionImpl, StatelessResourceImpl, StatisticsImpl, StringPropertyImpl, StringPropertyImpl, StructuralFeatureImpl, StructureFieldImpl, StructureTypeImpl, TagImpl, TransientImpl, TypedElementImpl, UnitOfWorkImpl, UriPropertyImpl, UriPropertyImpl, ValidStateImpl, ViewCapableImpl, ViewImpl

public abstract class RefObject_1
extends Object
implements RefObject_1_0, Serializable, PersistenceCapable

Implementation of RefObject_1_0.

This implementation supports leightweight serialization. The only member is a handle to the class object.

See Also:
Serialized Form

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

RefObject_1

public RefObject_1(Object_1_0 object,
                   RefClass refClass)

RefObject_1

public RefObject_1(RefClass refClass)
Method Detail

refGetValue

public final Object refGetValue(RefObject feature,
                                int index)

refGetValue

protected final Object refGetValue(String featureName,
                                   int index)
feature must be attribute or reference stored as attribute


refGetValue

protected final Object refGetValue(String featureName,
                                   String qualifier)
Feature must be attribute or reference stored as attribute


refGetValue

protected final Object refGetValue(String featureName,
                                   Object qualifier)

refGetValue

public final long refGetValue(String featureName,
                              Object value,
                              long position)
Description copied from interface: RefObject_1_0
Returns the value of feature. Instead of returning the value as return value it is streamed to value. The value must either be a binary or character output stream.

Specified by:
refGetValue in interface RefObject_1_0
Parameters:
featureName - feature to be retrieved.
value - binary or character output stream.
position - stream is returned starting from position.
Returns:
length of the stream.

refSetValue

protected final void refSetValue(String featureName,
                                 int index,
                                 Object value)

refSetValue

public final void refSetValue(String featureName,
                              Object newValue,
                              long length)
Description copied from interface: RefObject_1_0
Sets the value of feature. The value must be a binary or character input stream of the specified length. The parameter length results in better performance for stream handling.

Specified by:
refSetValue in interface RefObject_1_0
Parameters:
featureName - feature to be retrieved.
newValue - binary or character input stream.
length - length of the stream.

refAddValue

protected final void refAddValue(String featureName,
                                 int index,
                                 Object value)

refAddValue

protected final void refAddValue(String featureName,
                                 Object value)

refRemoveValue

protected final void refRemoveValue(String featureName,
                                    int index)

refRemoveValue

protected final void refRemoveValue(String featureName)

refIsInstanceOf

public final boolean refIsInstanceOf(RefObject objType,
                                     boolean considerSubtypes)
Specified by:
refIsInstanceOf in interface RefObject

refClass

public final RefClass refClass()
Specified by:
refClass in interface RefObject

refImmediateComposite

public final RefFeatured refImmediateComposite()
Specified by:
refImmediateComposite in interface RefObject

refOutermostComposite

public final RefFeatured refOutermostComposite()
Specified by:
refOutermostComposite in interface RefObject

refDelete

public final void refDelete()
Specified by:
refDelete in interface RefObject

refGetValue

public final Object refGetValue(RefObject feature)
Specified by:
refGetValue in interface RefFeatured

refGetValue

public final Object refGetValue(String featureName)
Specified by:
refGetValue in interface RefFeatured

refSetValue

public final void refSetValue(RefObject feature,
                              Object value)
Specified by:
refSetValue in interface RefFeatured

refSetValue

public final void refSetValue(String featureName,
                              Object value)
Specified by:
refSetValue in interface RefFeatured

refInvokeOperation

public final Object refInvokeOperation(RefObject requestedOperation,
                                       List args)
Specified by:
refInvokeOperation in interface RefFeatured

refInvokeOperation

public final Object refInvokeOperation(String operationName,
                                       List args)
                                throws RefException
Specified by:
refInvokeOperation in interface RefFeatured
Throws:
RefException

refMetaObject

public final RefObject refMetaObject()
Specified by:
refMetaObject in interface RefBaseObject

refImmediatePackage

public final RefPackage refImmediatePackage()
Specified by:
refImmediatePackage in interface RefBaseObject

refOutermostPackage

public final RefPackage refOutermostPackage()
Specified by:
refOutermostPackage in interface RefBaseObject

refMofId

public final String refMofId()
Specified by:
refMofId in interface RefBaseObject

equals

public boolean equals(Object that)
Specified by:
equals in interface RefBaseObject
Overrides:
equals in class Object

refVerifyConstraints

public final Collection refVerifyConstraints(boolean deepVerify)
Specified by:
refVerifyConstraints in interface RefBaseObject

refGetPath

public final Path refGetPath()
Description copied from interface: RefObject_1_0
Returns the object's access path.

Specified by:
refGetPath in interface RefObject_1_0
Returns:
the object's access path; or null for transient objects

refWriteProtect

public final void refWriteProtect()
Description copied from interface: RefObject_1_0
Puts an object in read-only mode.

This method is idempotent.

Specified by:
refWriteProtect in interface RefObject_1_0

refAddToUnitOfWork

public final void refAddToUnitOfWork()
Description copied from interface: RefObject_1_0
After this call the object observes unit of work boundaries.

This method is idempotent.

Specified by:
refAddToUnitOfWork in interface RefObject_1_0

refRemoveFromUnitOfWork

public final void refRemoveFromUnitOfWork()
Description copied from interface: RefObject_1_0
After this call the object ignores unit of work boundaries.

This method is idempotent.

Specified by:
refRemoveFromUnitOfWork in interface RefObject_1_0

refIsWriteProtected

public final boolean refIsWriteProtected()
Description copied from interface: RefObject_1_0
Tells whether this object is in read-only mode.

Specified by:
refIsWriteProtected in interface RefObject_1_0
Returns:
true if the object is write protected, false if the object is write enabled.

refIsDirty

public final boolean refIsDirty()
Description copied from interface: RefObject_1_0
Tests whether this object is dirty. Instances that have been modified, deleted, or newly made persistent in the current unit of work return true.

Transient instances return false.

Specified by:
refIsDirty in interface RefObject_1_0
Returns:
true if this instance has been modified in the current unit of work.

refIsPersistent

public final boolean refIsPersistent()
Description copied from interface: RefObject_1_0
Tests whether this object is persistent. Instances that represent persistent objects in the data store return true.

Specified by:
refIsPersistent in interface RefObject_1_0
Returns:
true if this instance is persistent.

refIsNew

public final boolean refIsNew()
Description copied from interface: RefObject_1_0
Tests whether this object has been newly made persistent. Instances that have been made persistent in the current unit of work return true.

Transient instances return false.

Specified by:
refIsNew in interface RefObject_1_0
Returns:
true if this instance was made persistent in the current unit of work.

refIsDeleted

public final boolean refIsDeleted()
Description copied from interface: RefObject_1_0
Tests whether this object has been deleted. Instances that have been deleted in the current unit of work return true. Transient instances return false.

Specified by:
refIsDeleted in interface RefObject_1_0
Returns:
true if this instance was deleted in the current unit of work.

refRefresh

public final void refRefresh()
Description copied from interface: RefObject_1_0
Refresh the state of the instance from its provider.

Specified by:
refRefresh in interface RefObject_1_0

refFlush

public final void refFlush()
Description copied from interface: RefObject_1_0
Flush the state of the instance to its provider.

Specified by:
refFlush in interface RefObject_1_0

refRefreshAsynchronously

public void refRefreshAsynchronously()
Description copied from interface: RefObject_1_0
Refresh the state of the instance from its provider asynchrounously.

Specified by:
refRefreshAsynchronously in interface RefObject_1_0

refDefaultFetchGroup

public Set refDefaultFetchGroup()
Description copied from interface: RefObject_1_0
Returns the refDelegate().objDefaultFetchGroup() plus the set of all non-derived attributes of the object.

Specified by:
refDefaultFetchGroup in interface RefObject_1_0

refGetValue

public final Object refGetValue(RefObject feature,
                                Object qualifier,
                                boolean marshal)
Description copied from interface: RefObject_1_0
Returns the value of feature identified by qualifier. marshal defines whether marshalling is applied to the returned object. If false a RefObject which is in fact of type 'org:openmdx:test:app1:Partner' is returned as type RefObject instead of org.openmdx.test.app1.Partner. This method method can improve performance in cases where no marshalled objects are required.

Specified by:
refGetValue in interface RefObject_1_0
Parameters:
feature - feature to be retrieved.
qualifier - identifies object to be retrieved.
marshal - if true the returned value is marshalled.

refInitialize

public final void refInitialize(boolean setRequiredToNull,
                                boolean setOptionalToNull)
Description copied from interface: RefObject_1_0
Initializes the object as follows:

Specified by:
refInitialize in interface RefObject_1_0
Parameters:
setRequiredToNull - 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.

refInitialize

public final void refInitialize(RefObject source)
Description copied from interface: RefObject_1_0
Initializes the object based on the source object. The source object must be of the same class or a subtype of the target.

Specified by:
refInitialize in interface RefObject_1_0

refAddValue

public final void refAddValue(String featureName,
                              Object qualifier,
                              Object value)
Description copied from interface: RefObject_1_0
Adds the value to the feature with the specified qualifier.

Specified by:
refAddValue in interface RefObject_1_0
Parameters:
featureName - feature to add value.
qualifier - qualifier of value to add.
value - value to add.

refRemoveValue

public final void refRemoveValue(String featureName,
                                 Object qualifier)
Description copied from interface: RefObject_1_0
Removes qualified value from feature.

Specified by:
refRemoveValue in interface RefObject_1_0
Parameters:
featureName - qualified value is removed from feature.
qualifier - value qualifier.

refRemoveValue

public final void refRemoveValue(String featureName,
                                 RefObject value)
Description copied from interface: RefObject_1_0
Removes value from feature.

Specified by:
refRemoveValue in interface RefObject_1_0
Parameters:
featureName - value is removed from feature.
value - value to be removed.

refDelegate

public final Object_1_0 refDelegate()
Description copied from interface: RefObject_1_0
Return the object which RefObject_1_0 delegates to. The returned object is managed by a basic accessor.

Specified by:
refDelegate in interface RefObject_1_0
Returns:
Object_1_0 delegate object.

refContext

public final Object refContext()
Description copied from interface: RefObject_1_0
Returns application-defined context.

Specified by:
refContext in interface RefObject_1_0
Returns:
Object application-defined context.

refAddEventListener

public final void refAddEventListener(String feature,
                                      EventListener listener)
                               throws ServiceException
Description copied from interface: RefObject_1_0
Add an event listener.

Specified by:
refAddEventListener in interface RefObject_1_0
Parameters:
feature - restrict the listener to this feature; or null if the listener is interested in all features
listener - the event listener to be added

It is implementation dependent whether the feature name is verified or not.

Throws:
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

refRemoveEventListener

public final void refRemoveEventListener(String feature,
                                         EventListener listener)
                                  throws ServiceException
Description copied from interface: RefObject_1_0
Remove an event listener.

It is implementation dependent whether feature name and listener class are verified.

Specified by:
refRemoveEventListener in interface RefObject_1_0
Parameters:
feature - the name of the feature that was listened on, or null if the listener is interested in all features
listener - the event listener to be removed
Throws:
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

refGetEventListeners

public final EventListener[] refGetEventListeners(String feature,
                                                  Class listenerType)
                                           throws ServiceException
Description copied from interface: RefObject_1_0
Get event listeners.

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.

Specified by:
refGetEventListeners in interface RefObject_1_0
Parameters:
feature - the name of the feature that was listened on, or null for listeners interested in all features
listenerType - the type of the event listeners to be returned
Returns:
an array of listenerType containing the matching event listeners
Throws:
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

toString

public String toString()
Overrides:
toString in class Object

jdoCopyFields

public void jdoCopyFields(Object other,
                          int[] fieldNumbers)
Description copied from interface: PersistenceCapable
Copy field values from another instance of the same class to this instance.

This method will throw an exception if the other instance is not managed by the same StateManager as this instance.

Specified by:
jdoCopyFields in interface PersistenceCapable
Parameters:
other - the PC instance from which field values are to be copied
fieldNumbers - the field numbers to be copied into this instance