|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openmdx.base.accessor.generic.spi.AbstractObject_1
public class AbstractObject_1
Abstract Object_1_0 implementation
| Field Summary | |
|---|---|
protected Set |
dirty
|
protected Path |
identity
|
protected String |
objectClass
|
protected short |
state
|
| Constructor Summary | |
|---|---|
protected |
AbstractObject_1(Path identity,
String objectClass)
|
| Method Summary | |
|---|---|
protected static Object |
defaultFetchGroupToString(Object_1_0 source)
|
protected BasicException.Parameter[] |
getExceptionParameters()
|
protected BasicException.Parameter[] |
getExceptionParameters(BasicException.Parameter[] extension)
|
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. |
protected void |
objFireInstanceCallbackEvent(short type)
Fire an instance callback |
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. |
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 access path. |
Object |
objGetResourceIdentifier()
Returns the object's access path. |
Set |
objGetSet(String feature)
Get a Set attribute. |
SortedMap |
objGetSparseArray(String feature)
Get a SparseArray attribute. |
Object |
objGetValue(String feature)
Get a single-valued attribute. |
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. use addEventListener(String,EventListener) instead |
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 |
objSetValue(String feature,
Object to)
Set an attribute's value. |
void |
propertyChange(PropertyChangeEvent event)
|
protected void |
setValue(String feature,
Object to)
|
protected static String |
stateToString(Object_1_0 source)
|
String |
toString()
|
static String |
toString(Object_1_0 source,
String objectClass,
String description)
Create a String representation of an Object_1_0 instance |
void |
vetoableChange(PropertyChangeEvent event)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected short state
protected Path identity
protected String objectClass
protected final Set dirty
| Constructor Detail |
|---|
protected AbstractObject_1(Path identity,
String objectClass)
| Method Detail |
|---|
public Path objGetPath()
Object_1_0
objGetPath in interface Object_1_0
While in general an Object implementing Object_1_0 is allowed to throw
a ServiceException for status requests, the AbstractObject_1 does
not include them in its statsu method declarations.
public Object objGetResourceIdentifier()
objGetResourceIdentifier in interface Object_1_0
public Set objDefaultFetchGroup()
throws ServiceException
Object_1_0The 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 unavailablepublic String objGetClass()
Object_1_0
objGetClass in interface Object_1_0
public void objAddToUnitOfWork()
throws ServiceException
Object_1_0This method is idempotent.
objAddToUnitOfWork in interface Object_1_0ServiceException - ILLEGAL_STATE
if the object is locked
public void objRemoveFromUnitOfWork()
throws ServiceException
Object_1_0This method is idempotent.
objRemoveFromUnitOfWork in interface Object_1_0ServiceException - ILLEGAL_STATE
if the object is dirty.public boolean objIsDirty()
Object_1_0Transient instances return false.
objIsDirty in interface Object_1_0public boolean objIsPersistent()
Object_1_0
objIsPersistent in interface Object_1_0public boolean objIsNew()
Object_1_0Transient instances return false.
objIsNew in interface Object_1_0public boolean objIsDeleted()
Object_1_0
objIsDeleted in interface Object_1_0public boolean objIsInUnitOfWork()
objIsInUnitOfWork in interface Object_1_0While in general an Object implementing Object_1_0 is allowed to throw a ServiceException for status requests, the AbstractObject_1 does not include them in its statsu method declarations.
protected BasicException.Parameter[] getExceptionParameters()
protected BasicException.Parameter[] getExceptionParameters(BasicException.Parameter[] extension)
public void objRefresh()
throws ServiceException
Object_1_0
objRefresh in interface Object_1_0ServiceException - if the object can't be synchronized
public boolean objFlush()
throws ServiceException
Object_1_0
objFlush in interface Object_1_0ServiceException - NOT_SUPPORTED
if the unit of work is optimistic
public void objMakeVolatile()
throws ServiceException
Object_1_0
objMakeVolatile in interface Object_1_0ServiceException - if the object can't be made volatile.
public Object_1_0 objCopy(FilterableMap there,
String criteria)
throws ServiceException
Object_1_0
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
Object_1_0
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.
public void objRemove()
throws ServiceException
Object_1_0
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.
protected void setValue(String feature,
Object to)
throws ServiceException
ServiceException
public void objSetValue(String feature,
Object to)
throws ServiceException
Object_1_0
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
public Object objGetValue(String feature)
throws ServiceException
Object_1_0
This method returns a BAD_PARAMETER exception unless the
feature is single valued or a stream.
objGetValue in interface Object_1_0feature - the feature's name
ServiceException - BAD_MEMBER_NAME
if the object has no such feature
public List objGetList(String feature)
throws ServiceException
Object_1_0
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
public Set objGetSet(String feature)
throws ServiceException
Object_1_0
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
public SortedMap objGetSparseArray(String feature)
throws ServiceException
Object_1_0
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
public LargeObject_1_0 objGetLargeObject(String feature)
throws ServiceException
Object_1_0This method returns a new LargeObject.
objGetLargeObject in interface Object_1_0feature - The feature's name.
ServiceException - ILLEGAL_STATE
if the object is deleted
public FilterableMap objGetContainer(String feature)
throws ServiceException
Object_1_0
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
public Structure_1_0 objInvokeOperation(String operation,
Structure_1_0 arguments)
throws ServiceException
Object_1_0Only query operations can be invoked synchronously unless the unit of work is non-optimistic or committing. Such queries use the object states at the beginning of the unit of work!
objInvokeOperation in interface Object_1_0operation - The operation namearguments - The operation's arguments
ServiceException - ILLEGAL_STATE
if a non-query operation is called in an inappropriate
state of the unit of work.
public Structure_1_0 objInvokeOperationInUnitOfWork(String operation,
Structure_1_0 arguments)
throws ServiceException
Object_1_0Such asynchronous operations will be invoked at the very end of an optimistic unit of work, i.e. after all modifications at object and attribute level.
objInvokeOperationInUnitOfWork in interface Object_1_0operation - The operation namearguments - The operation's arguments
ServiceException - ILLEGAL_STATE
if no unit of work is in progress
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
protected void objFireInstanceCallbackEvent(short type)
throws ServiceException
type -
ServiceException
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 void propertyChange(PropertyChangeEvent event)
public void vetoableChange(PropertyChangeEvent event)
throws PropertyVetoException
PropertyVetoExceptionprotected static String stateToString(Object_1_0 source)
protected static Object defaultFetchGroupToString(Object_1_0 source)
public static String toString(Object_1_0 source,
String objectClass,
String description)
source - objectClass - description -
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||