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

java.lang.Object
  extended by org.openmdx.base.accessor.jmi.spi.RefPackage_1
All Implemented Interfaces:
Serializable, RefBaseObject, RefPackage, RefPackage_1_0, RefPackage_1_1
Direct Known Subclasses:
audit1PackageImpl, basePackageImpl, compatibilityPackageImpl, datastore1PackageImpl, datastore1PackageImpl, deployment1PackageImpl, document1PackageImpl, filter1PackageImpl, generic1PackageImpl, ietfPackageImpl, isoPackageImpl, lock1PackageImpl, model1PackageImpl, netPackageImpl, oasis_openPackageImpl, omgPackageImpl, openmdxPackageImpl, orgPackageImpl, preferences1PackageImpl, primitiveTypesPackageImpl, RefRootPackage_1, rfcPackageImpl, role1PackageImpl, runtime1PackageImpl, sequence1PackageImpl, state1PackageImpl, unPackageImpl, view1PackageImpl, w3cPackageImpl

public abstract class RefPackage_1
extends Object
implements RefPackage_1_1, Serializable

Implementation of RefPackage_1_0.

This implementation supports leightweight serialization. It contains only members to the immediate and outermost package. Other members are static.

See Also:
Serialized Form

Field Summary
protected  Map classes
          Map containing , entries, respectively.
protected  Map filterConstructors
           
protected  Map structConstructors
           
 
Constructor Summary
RefPackage_1(RefPackage outermostPackage, RefPackage immediatePackage)
           
 
Method Summary
 Collection refAllAssociations()
          This implementation does not support association classes.
 Collection refAllClasses()
           
 Collection refAllPackages()
           
 RefAssociation refAssociation(RefObject association)
          This implementation does not support association classes.
 RefAssociation refAssociation(String associationName)
          This implementation does not support association classes.
 void refBegin()
          Same as
 RefClass refClass(RefObject type)
           
 RefClass refClass(String qualifiedClassName)
           
 void refCommit()
          Same as
 RefFilter_1_0 refCreateFilter(String filterClassName, FilterProperty[] filterProperties, AttributeSpecifier[] attributeSpecifiers)
           
 RefFilter_1_0 refCreateFilter(String filterClassName, FilterProperty[] filterProperties, AttributeSpecifier[] attributeSpecifiers, RefFilter_1_0 delegateFilter, Short delegateQuantor, String delegateName)
          Create a filter
 RefStruct refCreateStruct(RefObject structType, List args)
           
 RefStruct refCreateStruct(String structName, List args)
           
 RefStruct refCreateStruct(String structName, Object arg)
          arg must be instanceof Structure_1_0.
 void refDelete()
           
 RefEnum refGetEnum(RefObject enumType, String literalName)
          This implementation does not supporte enums.
 RefEnum refGetEnum(String enumName, String literalName)
          This implementation does not supporte enums.
 RefPackage refImmediatePackage()
           
 RefObject refMetaObject()
           
 Model_1_0 refModel()
          Returns model defined for this package.
 RefObject refObject(RefObject primary, RefObject secondary)
          Returns a proxy implementing the same interfaces as the secondary RefObject and delegating to the primary RefObject if possible the secondary RefObject as fallback
 RefObject refObject(String refMofId)
          Get object with the given id.
 ObjectFactory_1_0 refObjectFactory()
          Returns the object factory from which the package creates and retrieves objects.
 RefPackage refOutermostPackage()
           
 RefPackage refPackage(RefObject nestedPackage)
           
 RefPackage refPackage(String nestedPackageName)
           
 PersistenceManager refPersistenceManager()
          Retrieves the JDO Persistence Manager delegating to this package.
 void refRollback()
          Same as
 UnitOfWork_1_0 refUnitOfWork()
          Return the current unit of work.
 Collection refVerifyConstraints(boolean deepVerify)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.jmi.reflect.RefBaseObject
equals, hashCode, refMofId
 

Field Detail

classes

protected transient Map classes
Map containing , entries, respectively. This map is shared by all JMI packages, i.e. if any package loads a class it is available for all other packages and therefore must be loaded only once per classloader. Moreover, these members do not have to be serialized.


structConstructors

protected transient Map structConstructors

filterConstructors

protected transient Map filterConstructors
Constructor Detail

RefPackage_1

public RefPackage_1(RefPackage outermostPackage,
                    RefPackage immediatePackage)
Method Detail

refPersistenceManager

public PersistenceManager refPersistenceManager()
Retrieves the JDO Persistence Manager delegating to this package.

Specified by:
refPersistenceManager in interface RefPackage_1_1
Returns:
the JDO Persistence Manager delegating to this package.

refObject

public RefObject refObject(RefObject primary,
                           RefObject secondary)
Returns a proxy implementing the same interfaces as the secondary RefObject and delegating to
  1. the primary RefObject if possible
  2. the secondary RefObject as fallback

Specified by:
refObject in interface RefPackage_1_1
Parameters:
primary - its methods override the secondary object's methods
secondary - its interfacse are implemented by the proxy object as well
Returns:
a proxy object delgating to the primary or secondary object as appropriate

refObjectFactory

public ObjectFactory_1_0 refObjectFactory()
Description copied from interface: RefPackage_1_0
Returns the object factory from which the package creates and retrieves objects.

Specified by:
refObjectFactory in interface RefPackage_1_0
Returns:
ObjectFactory_1_0 object factory.

refModel

public Model_1_0 refModel()
Description copied from interface: RefPackage_1_0
Returns model defined for this package.

Specified by:
refModel in interface RefPackage_1_0
Returns:
Model_1_0 model assigned to this package.

refObject

public RefObject refObject(String refMofId)
Description copied from interface: RefPackage_1_0
Get object with the given id. This operation is equivalent to
   Object_1_0 object = refPackage.refObjectFactory().getObject(
     new Path(identity)
   );
   RefObject refObject = (RefRootPackage_1)refPackage.refOutermostPackage()).marshal(object);
 

Specified by:
refObject in interface RefPackage_1_0
Parameters:
refMofId - unique id of RefObject.
Returns:
RefObject

refUnitOfWork

public UnitOfWork_1_0 refUnitOfWork()
Description copied from interface: RefPackage_1_0
Return the current unit of work. Equivalent to refOutermostPackage().refUnitOfWork().

Specified by:
refUnitOfWork in interface RefPackage_1_0

refBegin

public void refBegin()
Description copied from interface: RefPackage_1_0
Same as
 try {
   this.refUnitOfWork.begin();
 }
 catch(ServiceException e) {
   throw new JmiServiceException(e);
 }
 
The added value of this method is to map a ServiceException to a JmiServiceException which simplifies exception handling.

Specified by:
refBegin in interface RefPackage_1_0

refCommit

public void refCommit()
Description copied from interface: RefPackage_1_0
Same as
 try {
   this.refUnitOfWork.commit();
 }
 catch(ServiceException e) {
   throw new JmiServiceException(e);
 }
 
The added value of this method is to map a ServiceException to a JmiServiceException which simplifies exception handling.

Specified by:
refCommit in interface RefPackage_1_0

refRollback

public void refRollback()
Description copied from interface: RefPackage_1_0
Same as
 try {
   this.refUnitOfWork.rollback();
 }
 catch(ServiceException e) {
   throw new JmiServiceException(e);
 }
 
The added value of this method is to map a ServiceException to a JmiServiceException which simplifies exception handling.

Specified by:
refRollback in interface RefPackage_1_0

refCreateStruct

public RefStruct refCreateStruct(String structName,
                                 Object arg)
arg must be instanceof Structure_1_0. arg is wrapped by the typed JMI structure class.

Specified by:
refCreateStruct in interface RefPackage_1_0

refCreateStruct

public RefStruct refCreateStruct(String structName,
                                 List args)
Specified by:
refCreateStruct in interface RefPackage

refCreateFilter

public RefFilter_1_0 refCreateFilter(String filterClassName,
                                     FilterProperty[] filterProperties,
                                     AttributeSpecifier[] attributeSpecifiers)
Specified by:
refCreateFilter in interface RefPackage_1_0

refCreateFilter

public RefFilter_1_0 refCreateFilter(String filterClassName,
                                     FilterProperty[] filterProperties,
                                     AttributeSpecifier[] attributeSpecifiers,
                                     RefFilter_1_0 delegateFilter,
                                     Short delegateQuantor,
                                     String delegateName)
Description copied from interface: RefPackage_1_1
Create a filter

Specified by:
refCreateFilter in interface RefPackage_1_1
Returns:
a filter

refMetaObject

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

refPackage

public RefPackage refPackage(RefObject nestedPackage)
Specified by:
refPackage in interface RefPackage

refPackage

public RefPackage refPackage(String nestedPackageName)
Specified by:
refPackage in interface RefPackage

refAllPackages

public Collection refAllPackages()
Specified by:
refAllPackages in interface RefPackage

refClass

public RefClass refClass(RefObject type)
Specified by:
refClass in interface RefPackage

refClass

public RefClass refClass(String qualifiedClassName)
Specified by:
refClass in interface RefPackage

refAllClasses

public Collection refAllClasses()
Specified by:
refAllClasses in interface RefPackage

refAssociation

public RefAssociation refAssociation(RefObject association)
This implementation does not support association classes.

Specified by:
refAssociation in interface RefPackage

refAssociation

public RefAssociation refAssociation(String associationName)
This implementation does not support association classes.

Specified by:
refAssociation in interface RefPackage

refAllAssociations

public Collection refAllAssociations()
This implementation does not support association classes.

Specified by:
refAllAssociations in interface RefPackage

refCreateStruct

public RefStruct refCreateStruct(RefObject structType,
                                 List args)
Specified by:
refCreateStruct in interface RefPackage

refGetEnum

public RefEnum refGetEnum(RefObject enumType,
                          String literalName)
This implementation does not supporte enums.

Specified by:
refGetEnum in interface RefPackage

refGetEnum

public RefEnum refGetEnum(String enumName,
                          String literalName)
This implementation does not supporte enums.

Specified by:
refGetEnum in interface RefPackage

refDelete

public void refDelete()
Specified by:
refDelete in interface RefPackage

refImmediatePackage

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

refOutermostPackage

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

refVerifyConstraints

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


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