org.openmdx.base.accessor.jmi.cci
Interface RefObject_1_0

All Superinterfaces:
RefBaseObject, RefFeatured, RefObject
All Known Subinterfaces:
AliasType, Association, AssociationEnd, Attribute, Auditable, Authority, BasicObject, BasicState, BehaviouralFeature, BooleanProperty, BooleanProperty, Class, Classifier, CollectionType, Component, Configuration, Connection, Constant, Constraint, Context, ContextCapable, Database, DatabaseConnector, DatabaseResourceReference, Dataprovider, DataproviderBooleanProperty, DataproviderConnector, DataproviderIntegerProperty, DataproviderProperty, DataproviderResource, DataproviderResourceReference, DataproviderStringProperty, DataproviderType, DataproviderTypeBooleanProperty, DataproviderTypeIntegerProperty, DataproviderTypeProperty, DataproviderTypeStringProperty, Datastore, Datatype, DateState, DateStateExcludingEnd, DateTimeState, DecimalProperty, DecimalProperty, DeploymentUnit, Domain, Domain, Element, EnumerationType, Exception, ExtentCapable, Feature, Filter, GeneralizableElement, GenericResourceReference, HistoryState, HttpUrlConnector, Import, InboundCommunication, Index, Instance, IntegerProperty, IntegerProperty, Involved, Lock, Module, Namespace, Namespace, Operation, OptimisticLock, OutboundCommunication, Package, Parameter, Preferences, PrimitiveType, Property, Property, PropertySet, Provider, RefAuthority_1_0, Reference, ResourceAdapter, ResourceAdapterBooleanProperty, ResourceAdapterIntegerProperty, ResourceAdapterProperty, ResourceAdapterStringProperty, ResourceReference, Role, RoleCapable, RoleType, Segment, Segment, Segment, Segment, Segment, Segment, Sequence, State, StateCapable, StatefulConnection, StatelessConnection, StatelessResource, Statistics, StringProperty, StringProperty, StructuralFeature, StructureField, StructureType, Tag, Transient, TypedElement, UnitOfWork, UriProperty, UriProperty, ValidState, View, ViewCapable
All Known Implementing Classes:
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, ReferenceImpl, RefObject_1, 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 interface RefObject_1_0
extends RefObject

This interface extends the javax.jmi.reflect.RefObject interface by additional helpers and openMDX-specific methods. These methods must not be used by 100% JMI-compliant applications.


Method Summary
 void refAddEventListener(String feature, EventListener listener)
          Add an event listener.
 void refAddToUnitOfWork()
          After this call the object observes unit of work boundaries.
 void refAddValue(String featureName, Object qualifier, Object value)
          Adds the value to the feature with the specified qualifier.
 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 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 qualifier, boolean marshal)
          Returns the value of feature identified by qualifier.
 long refGetValue(String feature, Object value, long position)
          Returns the value of feature.
 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.
 boolean refIsDeleted()
          Tests whether this object has been deleted.
 boolean refIsDirty()
          Tests whether this object is dirty.
 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.
 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.
 void refRemoveValue(String featureName, Object qualifier)
          Removes qualified value from feature.
 void refRemoveValue(String featureName, RefObject value)
          Removes value from feature.
 void refSetValue(String feature, Object newValue, long length)
          Sets the value of feature.
 void refWriteProtect()
          Puts an object in read-only mode.
 
Methods inherited from interface javax.jmi.reflect.RefObject
refClass, refDelete, refImmediateComposite, refIsInstanceOf, refOutermostComposite
 
Methods inherited from interface javax.jmi.reflect.RefFeatured
refGetValue, refGetValue, refInvokeOperation, refInvokeOperation, refSetValue, refSetValue
 
Methods inherited from interface javax.jmi.reflect.RefBaseObject
equals, hashCode, refImmediatePackage, refMetaObject, refMofId, refOutermostPackage, refVerifyConstraints
 

Method Detail

refDelegate

Object_1_0 refDelegate()
Return the object which RefObject_1_0 delegates to. The returned object is managed by a basic accessor.

Returns:
Object_1_0 delegate object.

refGetPath

Path refGetPath()
Returns the object's access path.

Returns:
the object's access path; or null for transient objects

refWriteProtect

void refWriteProtect()
Puts an object in read-only mode.

This method is idempotent.

Throws:
JmiServiceException - ILLEGAL_STATE if the object is dirty

refAddToUnitOfWork

void refAddToUnitOfWork()
After this call the object observes unit of work boundaries.

This method is idempotent.

Throws:
JmiServiceException - ILLEGAL_STATE if the object is locked
JmiServiceException - if the object can't be added to the unit of work for another reason.

refRemoveFromUnitOfWork

void refRemoveFromUnitOfWork()
After this call the object ignores unit of work boundaries.

This method is idempotent.

Throws:
JmiServiceException - ILLEGAL_STATE if the object is dirty.
JmiServiceException - if the object can't be removed from its unit of work for another reason

refIsWriteProtected

boolean refIsWriteProtected()
Tells whether this object is in read-only mode.

Returns:
true if the object is write protected, false if the object is write enabled.

refIsDirty

boolean refIsDirty()
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.

Returns:
true if this instance has been modified in the current unit of work.

refIsPersistent

boolean refIsPersistent()
Tests whether this object is persistent. Instances that represent persistent objects in the data store return true.

Returns:
true if this instance is persistent.

refIsNew

boolean refIsNew()
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.

Returns:
true if this instance was made persistent in the current unit of work.

refIsDeleted

boolean refIsDeleted()
Tests whether this object has been deleted. Instances that have been deleted in the current unit of work return true. Transient instances return false.

Returns:
true if this instance was deleted in the current unit of work.

refRefresh

void refRefresh()
Refresh the state of the instance from its provider.

Throws:
JmiServiceException - if the object can't be synchronized

refFlush

void refFlush()
Flush the state of the instance to its provider.

Throws:
JmiServiceException - if the object can't be flushed.

refRefreshAsynchronously

void refRefreshAsynchronously()
Refresh the state of the instance from its provider asynchrounously.

Throws:
JmiServiceException - if the object can't be synchronized asynchronously

refDefaultFetchGroup

Set refDefaultFetchGroup()
Returns the refDelegate().objDefaultFetchGroup() plus the set of all non-derived attributes of the object.


refContext

Object refContext()
Returns application-defined context.

Returns:
Object application-defined context.

refInitialize

void refInitialize(RefObject source)
Initializes the object based on the source object. The source object must be of the same class or a subtype of the target.

Parameters:
existing - existing object.
Throws:
JmiServiceException - thrown if object can not be initialized.

refInitialize

void refInitialize(boolean setRequiredToNull,
                   boolean setOptionalToNull)
Initializes the object as follows:

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.
Throws:
JmiServiceException - thrown if object can not be initialized.

refGetValue

Object refGetValue(RefObject feature,
                   Object qualifier,
                   boolean marshal)
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.

Parameters:
feature - feature to be retrieved.
qualifier - identifies object to be retrieved.
marshal - if true the returned value is marshalled.
Throws:
JmiServiceException

refGetValue

long refGetValue(String feature,
                 Object value,
                 long position)
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.

Parameters:
feature - feature to be retrieved.
value - binary or character output stream.
position - stream is returned starting from position.
Returns:
length of the stream.
Throws:
JmiServiceException

refSetValue

void refSetValue(String feature,
                 Object newValue,
                 long length)
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.

Parameters:
feature - feature to be retrieved.
newValue - binary or character input stream.
length - length of the stream.
Throws:
JmiServiceException

refAddValue

void refAddValue(String featureName,
                 Object qualifier,
                 Object value)
Adds the value to the feature with the specified qualifier.

Parameters:
featureName - feature to add value.
qualifier - qualifier of value to add.
value - value to add.

refRemoveValue

void refRemoveValue(String featureName,
                    Object qualifier)
Removes qualified value from feature.

Parameters:
featureName - qualified value is removed from feature.
qualifier - value qualifier.

refRemoveValue

void refRemoveValue(String featureName,
                    RefObject value)
Removes value from feature.

Parameters:
featureName - value is removed from feature.
value - value to be removed.

refAddEventListener

void refAddEventListener(String feature,
                         EventListener listener)
                         throws ServiceException
Add an event listener.

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
ServiceException - NOT_SUPPORTED if the listener's class is not supported
ServiceException - TOO_MANY_EVENT_LISTENERS if an attempt is made to register more than one listener for a unicast event.
ServiceException - BAD_PARAMETER If the listener is null

refRemoveEventListener

void refRemoveEventListener(String feature,
                            EventListener listener)
                            throws ServiceException
Remove an event listener.

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

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
ServiceException - NOT_SUPPORTED if the listener's class is not supported
ServiceException - BAD_PARAMETER If the listener is null

refGetEventListeners

EventListener[] refGetEventListeners(String feature,
                                     Class listenerType)
                                     throws ServiceException
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.

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
ServiceException - BAD_PARAMETER If the listener's type is not a subtype of EventListener
ServiceException - NOT_SUPPORTED if the listener type is not supported


This software is published under the BSD license. Copyright © 2003-2007, OMEX AG, Switzerland, All rights reserved. Use is subject to license terms.