|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openmdx.base.accessor.generic.spi.ViewObject_1
public class ViewObject_1
An abstract delegating object
| Constructor Summary | |
|---|---|
protected |
ViewObject_1(ViewConnection_1 factory,
Object_1_0 object)
|
protected |
ViewObject_1(ViewConnection_1 factory,
org.openmdx.base.accessor.generic.spi.SinkObject_1 sinkObject)
|
| Method Summary | |
|---|---|
Collection |
allStates(Boolean invalidated,
Boolean deleted)
Retrieve all states of an object |
void |
cloneSourceDelegate(XMLGregorianCalendar validFrom,
XMLGregorianCalendar validTo)
|
boolean |
equals(Object obj)
|
boolean |
exists()
Tells whether there exist underlying valid states |
List |
getSinkDelegates()
Retrieve the object's delegates |
Object_1_0 |
getSourceDelegate()
Retrieve the object's delegate |
InteractionSpec |
getViewContext()
|
int |
hashCode()
|
protected boolean |
isInstanceOfDateState()
|
boolean |
isReadable()
Tells whether one may read the object's features |
void |
objAddEventListener(String feature,
EventListener listener)
Add an event listener. |
void |
objAddToUnitOfWork()
After this call the object observes unit of work boundaries. |
Object_1_0 |
objCopy(FilterableMap there,
String criteria)
The copy operation makes a copy of the object. |
Set |
objDefaultFetchGroup()
Returns a new set containing the names of the features in the default fetch group. |
boolean |
objFlush()
Flush the state of the instance to its provider. |
String |
objGetClass()
Returns the object's model class. |
FilterableMap |
objGetContainer(String feature)
Get a reference feature. |
Object |
objGetDelegate()
|
EventListener[] |
objGetEventListeners(String feature,
Class listenerType)
Get event listeners. |
LargeObject_1_0 |
objGetLargeObject(String feature)
Get a large object feature |
List |
objGetList(String feature)
Get a List attribute. |
Path |
objGetPath()
Returns the object's identity. |
Object |
objGetResourceIdentifier()
Returns the object's resource identifier |
Set |
objGetSet(String feature)
Get a Set attribute. |
SortedMap |
objGetSparseArray(String feature)
Get a SparseArray attribute. |
Object |
objGetValue(String feature)
Get a feature. |
Structure_1_0 |
objInvokeOperation(String operation,
Structure_1_0 arguments)
Invokes an operation synchronously. |
Structure_1_0 |
objInvokeOperationInUnitOfWork(String operation,
Structure_1_0 arguments)
Invokes an operation asynchronously. |
boolean |
objIsDeleted()
Tests whether this object has been deleted. |
boolean |
objIsDirty()
Tests whether this object is dirty. |
boolean |
objIsInUnitOfWork()
Tests whether this object belongs to the current unit of work. |
boolean |
objIsNew()
Tests whether this object has been newly made persistent. |
boolean |
objIsPersistent()
Tests whether this object is persistent. |
void |
objMakeVolatile()
Mark an object as volatile, i.e POST_RELOAD InstanceCallbackEvents may be fired. |
void |
objMove(FilterableMap there,
String criteria)
The move operation moves the object to the scope of the container passed as the first parameter. |
void |
objRefresh()
Refresh the state of the instance from its provider. |
void |
objRegisterSynchronization(InstanceCallbacks_1_0 synchronization)
Deprecated. |
void |
objRemove()
Removes an object. |
void |
objRemoveEventListener(String feature,
EventListener listener)
Remove an event listener. |
void |
objRemoveFromUnitOfWork()
After this call the object ignores unit of work boundaries. |
void |
objSetClass(String objectClass)
Set the object's model class. |
void |
objSetValue(String feature,
Object to)
Set an attribute's value. |
String |
toString()
Returns a string representation of the object. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected ViewObject_1(ViewConnection_1 factory,
Object_1_0 object)
throws ServiceException
ServiceException
protected ViewObject_1(ViewConnection_1 factory,
org.openmdx.base.accessor.generic.spi.SinkObject_1 sinkObject)
throws ServiceException
ServiceException| Method Detail |
|---|
public Object_1_0 getSourceDelegate()
throws ServiceException
getSourceDelegate in interface ViewObject_1_0ServiceException
public List getSinkDelegates()
throws ServiceException
ServiceExceptionpublic InteractionSpec getViewContext()
getViewContext in interface ViewObject_1_0public String toString()
toString in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Object
public void objSetClass(String objectClass)
throws ServiceException
objSetClass in interface ViewObject_1_0objectCLass - the object's model class
ServiceException
public String objGetClass()
throws ServiceException
objGetClass in interface Object_1_0ServiceException
ServiceException - if the information is unavailable
protected boolean isInstanceOfDateState()
throws ServiceException
ServiceException
public Path objGetPath()
throws ServiceException
objGetPath in interface Object_1_0ServiceExceptionpublic Object objGetResourceIdentifier()
Object_1_0
objGetResourceIdentifier in interface Object_1_0
public Set objDefaultFetchGroup()
throws ServiceException
The returned set is a copy of the original set, i.e. interceptors are free to modify it before passing it on.
objDefaultFetchGroup in interface Object_1_0ServiceException - if the information is unavailable
public void objRefresh()
throws ServiceException
objRefresh in interface Object_1_0ServiceException - if the object can't be synchronized
public void objMakeVolatile()
throws ServiceException
objMakeVolatile in interface Object_1_0ServiceException - if the object can't be made volatile.
public boolean objFlush()
throws ServiceException
objFlush in interface Object_1_0ServiceException - NOT_SUPPORTED
if the unit of work is optimistic
ServiceException - ILLEGAL_STATE
if the object is not persistent
ServiceException - if the object can't be synchronized
public void objAddToUnitOfWork()
throws ServiceException
This method is idempotent.
objAddToUnitOfWork in interface Object_1_0ServiceException - ILLEGAL_STATE
if the object is locked
ServiceException - if the object can't be added to the unit of work for
another reason.
public void objRemoveFromUnitOfWork()
throws ServiceException
This method is idempotent.
objRemoveFromUnitOfWork in interface Object_1_0ServiceException - ILLEGAL_STATE
if the object is dirty.
ServiceException - if the object can't be removed from its unit of work for
another reason
public Object_1_0 objCopy(FilterableMap there,
String criteria)
throws ServiceException
objCopy in interface Object_1_0there - the new object's container or null, in which case
the object will not belong to any container until it is moved
to a container.criteria - The criteria is used to add the object to the container or
null, in which case it is up to the
implementation to define the criteria.
- Returns:
- an object initialized from the existing object.
- Throws:
ServiceException - if the copy operation fails.
public void objMove(FilterableMap there,
String criteria)
throws ServiceException
objMove in interface Object_1_0there - the object's new container.criteria - The criteria is used to move the object to the container or
null, in which case it is up to the
implementation to define the criteria.
- Throws:
ServiceException - ILLEGAL_STATE
if the object is persistent.
ServiceException - BAD_PARAMETER
if there is null.
ServiceException - if the move operation fails.
public void objRemove()
throws ServiceException
Neither getValue() nor setValue()
calls are allowed after an remove() invocation and
isDeleted() will return true unless the
object has been transient.
objRemove in interface Object_1_0ServiceException - NOT_SUPPORTED
If the object refuses to be removed.
ServiceException - if the object can't be removed
public boolean objIsDirty()
throws ServiceException
Transient instances return false.
objIsDirty in interface Object_1_0ServiceExceptionpublic boolean objIsPersistent()
objIsPersistent in interface Object_1_0
public boolean objIsNew()
throws ServiceException
Transient instances return false.
objIsNew in interface Object_1_0ServiceException
public boolean objIsDeleted()
throws ServiceException
objIsDeleted in interface Object_1_0ServiceException
public boolean objIsInUnitOfWork()
throws ServiceException
objIsInUnitOfWork in interface Object_1_0ServiceException
public void objSetValue(String feature,
Object to)
throws ServiceException
This method returns a BAD_PARAMETER exception unless the
feature is single valued or a stream.
objSetValue in interface Object_1_0feature - the attribute's nameto - the object.
ServiceException - ILLEGAL_STATE
if the object is write protected or the feature is a
stream modified in the current unit of work.
ServiceException - BAD_PARAMETER
if the feature is multi-valued
ServiceException - NOT_SUPPORTED
if the object has no such feature
ServiceException - if the object is not accessible
public Object objGetValue(String feature)
throws ServiceException
objGetValue in interface Object_1_0feature - the feature's name
ServiceException - NOT_SUPPORTED
if the object has no such feature
ServiceException - if the object is not accessible
public List objGetList(String feature)
throws ServiceException
This method never returns null as an instance of the
requested class is created on demand if it hasn't been set yet.
objGetList in interface Object_1_0feature - The feature's name.
ServiceException - ILLEGAL_STATE
if the object is deleted
ServiceException - NOT_SUPPORTED
if the object has no such feature
ClassCastException - if the feature's value is not a list
public Set objGetSet(String feature)
throws ServiceException
This method never returns null as an instance of the
requested class is created on demand if it hasn't been set yet.
objGetSet in interface Object_1_0feature - The feature's name.
ServiceException - ILLEGAL_STATE
if the object is deleted
ServiceException - NOT_SUPPORTED
if the object has no such feature
ClassCastException - if the feature's value is not a set
public SortedMap objGetSparseArray(String feature)
throws ServiceException
This method never returns null as an instance of the
requested class is created on demand if it hasn't been set yet.
objGetSparseArray in interface Object_1_0feature - The feature's name.
ServiceException - ILLEGAL_STATE
if the object is deleted
ClassCastException - if the feature's value is not a sparse array
ServiceException - NOT_SUPPORTED
if the object has no such feature
public LargeObject_1_0 objGetLargeObject(String feature)
throws ServiceException
This method returns a new LargeObject.
objGetLargeObject in interface Object_1_0feature - The feature's name.
ServiceException - ILLEGAL_STATE
if the object is deleted
ClassCastException - if the feature's value is not a large object
ServiceException - BAD_MEMBER_NAME
if the object has no such feature
public FilterableMap objGetContainer(String feature)
throws ServiceException
This method never returns null as an instance of the
requested class is created on demand if it hasn't been set yet.
objGetContainer in interface Object_1_0feature - The feature's name.
ServiceException - ILLEGAL_STATE
if the object is deleted
ClassCastException - if the feature is not a reference
ServiceException - NOT_SUPPORTED
if the object has no such feature
public Structure_1_0 objInvokeOperationInUnitOfWork(String operation,
Structure_1_0 arguments)
throws ServiceException
objInvokeOperationInUnitOfWork in interface Object_1_0operation - The operation namearguments - The operation's arguments object.
ServiceException - ILLEGAL_STATE
if no unit of work is in progress
ServiceException - NOT_SUPPORTED
if either asynchronous calls are not supported by the
manager or the requested operation is not supportd by the
object.
ServiceException - if the invocation fails for another reason
public Structure_1_0 objInvokeOperation(String operation,
Structure_1_0 arguments)
throws ServiceException
Only query operations can be invoked synchronously unless the unit of work is non-optimistic or committing.
objInvokeOperation in interface Object_1_0operation - The operation namearguments - The operation's arguments object.
ServiceException - ILLEGAL_STATE
if a non-query operation is called in an inappropriate
state of the unit of work.
ServiceException - NOT_SUPPORTED
if either synchronous calls are not supported by the
manager or the requested operation is not supportd by the
object.
ServiceException - if a checked exception is thrown by the implementation or
the invocation fails for another reason.
public void objAddEventListener(String feature,
EventListener listener)
throws ServiceException
Object_1_0
objAddEventListener in interface Object_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 void objRemoveEventListener(String feature,
EventListener listener)
throws ServiceException
Object_1_0It is implementation dependent whether feature name and listener class are verified.
objRemoveEventListener in interface Object_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 EventListener[] objGetEventListeners(String feature,
Class listenerType)
throws ServiceException
Object_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.
objGetEventListeners in interface Object_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 event
public void objRegisterSynchronization(InstanceCallbacks_1_0 synchronization)
throws ServiceException
objRegisterSynchronization in interface Object_1_0synchronization - The synchronization object to be registered
ServiceException - TOO_MANY_EVENT_LISTENERS
if an attempt is made to register more than one
synchronization object.public Object objGetDelegate()
objGetDelegate in interface Delegating_1_0
public Collection allStates(Boolean invalidated,
Boolean deleted)
throws ServiceException
allStates in interface ViewObject_1_0invalidated - tells whether one looks for valid or invalid statesdeleted - tells whether one non-deleted or deleted states
ServiceExceptionpublic boolean isReadable()
ViewObject_1_0
isReadable in interface ViewObject_1_0true if the object's features are readable
public void cloneSourceDelegate(XMLGregorianCalendar validFrom,
XMLGregorianCalendar validTo)
throws ServiceException
cloneSourceDelegate in interface ViewObject_1_0ServiceException
public boolean exists()
throws ServiceException
exists in interface ViewObject_1_0true if there exists at least one underlying valid state
ServiceException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||