org.openmdx.base.accessor.generic.spi
Class MarshallingObject_1

java.lang.Object
  extended by org.openmdx.base.accessor.generic.spi.DelegatingObject_1
      extended by org.openmdx.base.accessor.generic.spi.MarshallingObject_1
All Implemented Interfaces:
Serializable, Object_1_0

public class MarshallingObject_1
extends DelegatingObject_1
implements Serializable

An abstract delegating object

See Also:
Serialized Form

Field Summary
protected  Marshaller marshaller
           
 
Fields inherited from class org.openmdx.base.accessor.generic.spi.DelegatingObject_1
object
 
Constructor Summary
protected MarshallingObject_1()
          Deserializer
  MarshallingObject_1(Object_1_0 object, Marshaller marshaller)
          Constructor
 
Method Summary
 void objAddEventListener(String feature, EventListener listener)
          Add an event listener.
 Object_1_0 objCopy(FilterableMap there, String criteria)
          The copy operation makes a copy of the object.
 FilterableMap objGetContainer(String feature)
          Get a reference feature.
 EventListener[] objGetEventListeners(String feature, Class listenerType)
          Add an event listener.
 List objGetList(String feature)
          Get a List attribute.
 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.
 void objMove(FilterableMap there, String criteria)
          The move operation moves the object to the scope of the container passed as the first parameter.
 void objRemoveEventListener(String feature, EventListener listener)
          Remove an event listener.
 void objSetValue(String feature, Object to)
          Set an attribute's value.
 
Methods inherited from class org.openmdx.base.accessor.generic.spi.DelegatingObject_1
equals, objAddToUnitOfWork, objDefaultFetchGroup, objFlush, objGetClass, objGetLargeObject, objGetPath, objGetResourceIdentifier, objIsDeleted, objIsDirty, objIsInUnitOfWork, objIsNew, objIsPersistent, objMakeVolatile, objRefresh, objRegisterSynchronization, objRemove, objRemoveFromUnitOfWork, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

marshaller

protected Marshaller marshaller
Constructor Detail

MarshallingObject_1

public MarshallingObject_1(Object_1_0 object,
                           Marshaller marshaller)
Constructor


MarshallingObject_1

protected MarshallingObject_1()
Deserializer

Method Detail

objSetValue

public void objSetValue(String feature,
                        Object to)
                 throws ServiceException
Set an attribute's value.

This method returns a BAD_PARAMETER exception unless the feature is single valued or a stream.

Specified by:
objSetValue in interface Object_1_0
Overrides:
objSetValue in class DelegatingObject_1
Parameters:
feature - the attribute's name
to - the object.
Throws:
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

objGetValue

public Object objGetValue(String feature)
                   throws ServiceException
Get a feature.

Specified by:
objGetValue in interface Object_1_0
Overrides:
objGetValue in class DelegatingObject_1
Parameters:
feature - the feature's name
Returns:
the object representing the feature; or null if the feature's value hasn't been set yet.
Throws:
ServiceException - NOT_SUPPORTED if the object has no such feature
ServiceException - if the object is not accessible

objGetList

public List objGetList(String feature)
                throws ServiceException
Get a List attribute.

This method never returns null as an instance of the requested class is created on demand if it hasn't been set yet.

Specified by:
objGetList in interface Object_1_0
Overrides:
objGetList in class DelegatingObject_1
Parameters:
feature - The feature's name.
Returns:
a collection which may be empty but never null.
Throws:
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

objGetSet

public Set objGetSet(String feature)
              throws ServiceException
Get a Set attribute.

This method never returns null as an instance of the requested class is created on demand if it hasn't been set yet.

Specified by:
objGetSet in interface Object_1_0
Overrides:
objGetSet in class DelegatingObject_1
Parameters:
feature - The feature's name.
Returns:
a collection which may be empty but never null.
Throws:
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

objGetSparseArray

public SortedMap objGetSparseArray(String feature)
                            throws ServiceException
Get a SparseArray attribute.

This method never returns null as an instance of the requested class is created on demand if it hasn't been set yet.

Specified by:
objGetSparseArray in interface Object_1_0
Overrides:
objGetSparseArray in class DelegatingObject_1
Parameters:
feature - The feature's name.
Returns:
a collection which may be empty but never null.
Throws:
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

objGetContainer

public FilterableMap objGetContainer(String feature)
                              throws ServiceException
Get a reference feature.

This method never returns null as an instance of the requested class is created on demand if it hasn't been set yet.

Specified by:
objGetContainer in interface Object_1_0
Overrides:
objGetContainer in class DelegatingObject_1
Parameters:
feature - The feature's name.
Returns:
a collection which may be empty but never null.
Throws:
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

objCopy

public Object_1_0 objCopy(FilterableMap there,
                          String criteria)
                   throws ServiceException
The copy operation makes a copy of the object. The copy is located in the scope of the container passed as the first parameter and includes the object's default fetch set.

Specified by:
objCopy in interface Object_1_0
Overrides:
objCopy in class DelegatingObject_1
Parameters:
there - 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.

objMove

public void objMove(FilterableMap there,
                    String criteria)
             throws ServiceException
The move operation moves the object to the scope of the container passed as the first parameter. The object remains valid after move has successfully executed.

Specified by:
objMove in interface Object_1_0
Overrides:
objMove in class DelegatingObject_1
Parameters:
there - 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.

objInvokeOperationInUnitOfWork

public Structure_1_0 objInvokeOperationInUnitOfWork(String operation,
                                                    Structure_1_0 arguments)
                                             throws ServiceException
Invokes an operation asynchronously.

Specified by:
objInvokeOperationInUnitOfWork in interface Object_1_0
Overrides:
objInvokeOperationInUnitOfWork in class DelegatingObject_1
Parameters:
operation - The operation name
arguments - The operation's arguments object.
Returns:
a structure with the result's values if the accessor is going to populate it after the unit of work has committed or null if the operation's return value(s) will never be available to the accessor.
Throws:
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

objInvokeOperation

public Structure_1_0 objInvokeOperation(String operation,
                                        Structure_1_0 arguments)
                                 throws ServiceException
Invokes an operation synchronously.

Only query operations can be invoked synchronously unless the unit of work is non-optimistic or committing.

Specified by:
objInvokeOperation in interface Object_1_0
Overrides:
objInvokeOperation in class DelegatingObject_1
Parameters:
operation - The operation name
arguments - The operation's arguments object.
Returns:
the operation's return object
Throws:
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.

objAddEventListener

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

Specified by:
objAddEventListener in interface Object_1_0
Overrides:
objAddEventListener in class DelegatingObject_1
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
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

objRemoveEventListener

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

Specified by:
objRemoveEventListener in interface Object_1_0
Overrides:
objRemoveEventListener in class DelegatingObject_1
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

objGetEventListeners

public EventListener[] objGetEventListeners(String feature,
                                            Class listenerType)
                                     throws ServiceException
Add an event listener.

Specified by:
objGetEventListeners in interface Object_1_0
Overrides:
objGetEventListeners in class DelegatingObject_1
Parameters:
feature - the name of the feature that was listened on, or null if the listener is 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


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