public abstract class JDOEJB11HelperImpl extends Object implements JDOEJB11Helper
| Modifier and Type | Field and Description |
|---|---|
protected static Logger |
logger |
protected static ResourceBundle |
messages
I18N message handler
|
| Constructor and Description |
|---|
JDOEJB11HelperImpl() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
assertInstanceOfRemoteInterfaceImpl(Object o)
Validates that this instance is of the correct implementation class
of a remote interface type.
|
protected void |
assertInstanceOfRemoteInterfaceImpl(Object o,
String beanName)
Validates that this instance is of the correct implementation class
of bean remote interface.
|
protected void |
assertObjectIdNotNull(Object oid)
Validates that the object id instance is not null.
|
void |
assertPrimaryKeyFieldNotNull(Object pkfield,
String pkfieldName,
String beanName)
Validates that the primary key field of an Object type is not null.
|
protected void |
assertPrimaryKeyNotNull(Object pk)
Validates that the primary key instance is not null.
|
Collection |
convertCollectionEJBObjectToPC(Collection coll,
PersistenceManager pm,
boolean validate)
Converts Collection of EJBObjects to a Collection of
persistence-capable instances.
|
Collection |
convertCollectionObjectIdToPrimaryKey(Collection oids)
Converts Collection of Object Id's of persistence-capable instances to a
Collection of of the PrimaryKey instances.
|
Collection |
convertCollectionPCToEJBObject(Collection pcs,
PersistenceManager pm)
Converts Collection of persistence-capable instances to a Collection of
EJBObjects.
|
Set |
convertCollectionPCToEJBObjectSet(Collection pcs,
PersistenceManager pm)
Converts Collection of persistence-capable instances to a Set of
EJBObjects.
|
Collection |
convertCollectionPCToPrimaryKey(Collection pcs,
PersistenceManager pm)
Converts Collection of persistence-capable instances to a Collection of
the PrimaryKey Class instances.
|
Collection |
convertCollectionPrimaryKeyToObjectId(Collection keys)
Converts Collection of PrimaryKey instances to a Collection of Object Id's
of a corresponding persistence-capable Class.
|
Object |
convertEJBObjectToPC(javax.ejb.EJBObject o,
PersistenceManager pm,
boolean validate)
Converts EJBObject to persistence-capable instance.
|
abstract Object |
convertObjectIdToPrimaryKey(Object objectId)
Converts Object Id of a persistence-capable instance to an instance of the
PrimaryKey Class.
|
javax.ejb.EJBObject |
convertPCToEJBObject(Object pc,
PersistenceManager pm)
Converts persistence-capable instance to EJBObject.
|
Object |
convertPCToPrimaryKey(Object pc,
PersistenceManager pm)
Converts persistence-capable instance to an instance of the PrimaryKey Class.
|
abstract Object |
convertPrimaryKeyToObjectId(Object key)
Converts instance of a PrimaryKey Class to an instance of the Object Id of a
corresponding persistence-capable Class.
|
protected Object |
convertPrimaryKeyToPC(Object key,
PersistenceManager pm,
boolean validate)
Converts PrimaryKey object to persistence-capable instance.
|
NumericConverter |
getNumericConverter()
Return NumericConverter for conversion from Number to BigDecimal or
BigInteger for this bean type.
|
abstract Class |
getPCClass()
Returns the class object of the corresponding persistence-capable class
of the concrete bean class.
|
Serializable |
readSerializableObjectFromByteArray(byte[] byteArray)
Constructs a Serializable object from byteArray.
|
byte[] |
writeSerializableObjectToByteArray(Serializable serializableObject)
Serializes serializableObject into a byte array
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetContainerprotected static final ResourceBundle messages
protected static final Logger logger
public javax.ejb.EJBObject convertPCToEJBObject(Object pc, PersistenceManager pm)
convertPCToEJBObject in interface JDOEJB11Helperpc - the persistence-capable instance to be converted as an Object.pm - the associated instance of PersistenceManager.public Object convertEJBObjectToPC(javax.ejb.EJBObject o, PersistenceManager pm, boolean validate)
convertEJBObjectToPC in interface JDOEJB11Helpero - the EJBObject instance to be converted.pm - the associated instance of PersistenceManager.validate - true if the existence of the instance is to be validated.IllegalArgumentException - if validate is true and instance does
not exist in the database or is deleted.protected Object convertPrimaryKeyToPC(Object key, PersistenceManager pm, boolean validate)
key - the PrimaryKey object to be converted.pm - the associated instance of PersistenceManager.validate - true if the existence of the instance is to be validated.IllegalArgumentException - if validate is true and instance does
not exist in the database or is deleted.public Collection convertCollectionPCToEJBObject(Collection pcs, PersistenceManager pm)
convertCollectionPCToEJBObject in interface JDOEJB11Helperpcs - the Collection of persistence-capable instance to be converted.pm - the associated instance of PersistenceManager.public Set convertCollectionPCToEJBObjectSet(Collection pcs, PersistenceManager pm)
convertCollectionPCToEJBObjectSet in interface JDOEJB11Helperpcs - the Collection of persistence-capable instance to be converted.pm - the associated instance of PersistenceManager.public Collection convertCollectionEJBObjectToPC(Collection coll, PersistenceManager pm, boolean validate)
convertCollectionEJBObjectToPC in interface JDOEJB11Helpercoll - the Collection of EJBObject instances to be converted.pm - the associated instance of PersistenceManager.validate - true if the existence of the instances is to be validated.IllegalArgumentException - if validate is true and at least one instance does
not exist in the database or is deleted.public Object convertPCToPrimaryKey(Object pc, PersistenceManager pm)
convertPCToPrimaryKey in interface JDOEJB11Helperpc - the persistence-capable instance to be converted as an Object.pm - the associated instance of PersistenceManager.public Collection convertCollectionPCToPrimaryKey(Collection pcs, PersistenceManager pm)
convertCollectionPCToPrimaryKey in interface JDOEJB11Helperpcs - Collection of the persistence-capable instances.pm - the associated instance of PersistenceManager.public abstract Object convertObjectIdToPrimaryKey(Object objectId)
convertObjectIdToPrimaryKey in interface JDOEJB11HelperobjectId - the Object Id to be converted.public abstract Object convertPrimaryKeyToObjectId(Object key)
convertPrimaryKeyToObjectId in interface JDOEJB11Helperkey - the PrimaryKey instance to be converted.public Collection convertCollectionObjectIdToPrimaryKey(Collection oids)
convertCollectionObjectIdToPrimaryKey in interface JDOEJB11Helperoids - Collection of the Object Id to be converted.public Collection convertCollectionPrimaryKeyToObjectId(Collection keys)
convertCollectionPrimaryKeyToObjectId in interface JDOEJB11Helperkeys - Collection of the PrimaryKey instances to be converted.public byte[] writeSerializableObjectToByteArray(Serializable serializableObject)
writeSerializableObjectToByteArray in interface JDOEJB11HelperserializableObject - Instance of a Serializable Objectpublic Serializable readSerializableObjectFromByteArray(byte[] byteArray)
readSerializableObjectFromByteArray in interface JDOEJB11HelperbyteArray - Array of byte obtained from a call to writeSerializableObjectToByteArraywriteSerializableObjectToByteArray(Serializable)public NumericConverter getNumericConverter()
getNumericConverter in interface JDOEJB11Helperpublic abstract Class getPCClass()
getPCClass in interface JDOEJB11Helperpublic abstract void assertInstanceOfRemoteInterfaceImpl(Object o)
assertInstanceOfRemoteInterfaceImpl in interface JDOEJB11Helpero - the instance to validate.IllegalArgumentException - if validation fails.protected void assertInstanceOfRemoteInterfaceImpl(Object o, String beanName)
o - the instance to validate.beanName - as String.IllegalArgumentException - if validation fails.protected void assertPrimaryKeyNotNull(Object pk)
pk - the primary key instance to validate.IllegalArgumentException - if validation fails.public void assertPrimaryKeyFieldNotNull(Object pkfield, String pkfieldName, String beanName)
pkfield - the primary key field instance to validate.pkfieldName - the primary key field name.beanName - the EJB name.IllegalArgumentException - if validation fails.protected void assertObjectIdNotNull(Object oid)
oid - the object id instance to validate.JDOFatalInternalException - if validation fails.Copyright © 2019. All rights reserved.