|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.jdo.spi.persistence.support.ejb.cmp.JDOEJB11HelperImpl
public abstract class JDOEJB11HelperImpl
| Field Summary | |
|---|---|
protected static Logger |
logger
|
protected static java.util.ResourceBundle |
messages
I18N message handler |
| Constructor Summary | |
|---|---|
JDOEJB11HelperImpl()
|
|
| Method Summary | |
|---|---|
abstract void |
assertInstanceOfRemoteInterfaceImpl(java.lang.Object o)
Validates that this instance is of the correct implementation class of a remote interface type. |
protected void |
assertInstanceOfRemoteInterfaceImpl(java.lang.Object o,
java.lang.String beanName)
Validates that this instance is of the correct implementation class of bean remote interface. |
protected void |
assertObjectIdNotNull(java.lang.Object oid)
Validates that the object id instance is not null. |
void |
assertPrimaryKeyFieldNotNull(java.lang.Object pkfield,
java.lang.String pkfieldName,
java.lang.String beanName)
Validates that the primary key field of an Object type is not null. |
protected void |
assertPrimaryKeyNotNull(java.lang.Object pk)
Validates that the primary key instance is not null. |
java.util.Collection |
convertCollectionEJBObjectToPC(java.util.Collection coll,
PersistenceManager pm,
boolean validate)
Converts Collection of EJBObjects to a Collection of persistence-capable instances. |
java.util.Collection |
convertCollectionObjectIdToPrimaryKey(java.util.Collection oids)
Converts Collection of Object Id's of persistence-capable instances to a Collection of of the PrimaryKey instances. |
java.util.Collection |
convertCollectionPCToEJBObject(java.util.Collection pcs,
PersistenceManager pm)
Converts Collection of persistence-capable instances to a Collection of EJBObjects. |
java.util.Set |
convertCollectionPCToEJBObjectSet(java.util.Collection pcs,
PersistenceManager pm)
Converts Collection of persistence-capable instances to a Set of EJBObjects. |
java.util.Collection |
convertCollectionPCToPrimaryKey(java.util.Collection pcs,
PersistenceManager pm)
Converts Collection of persistence-capable instances to a Collection of the PrimaryKey Class instances. |
java.util.Collection |
convertCollectionPrimaryKeyToObjectId(java.util.Collection keys)
Converts Collection of PrimaryKey instances to a Collection of Object Id's of a corresponding persistence-capable Class. |
java.lang.Object |
convertEJBObjectToPC(EJBObject o,
PersistenceManager pm,
boolean validate)
Converts EJBObject to persistence-capable instance. |
abstract java.lang.Object |
convertObjectIdToPrimaryKey(java.lang.Object objectId)
Converts Object Id of a persistence-capable instance to an instance of the PrimaryKey Class. |
EJBObject |
convertPCToEJBObject(java.lang.Object pc,
PersistenceManager pm)
Converts persistence-capable instance to EJBObject. |
java.lang.Object |
convertPCToPrimaryKey(java.lang.Object pc,
PersistenceManager pm)
Converts persistence-capable instance to an instance of the PrimaryKey Class. |
abstract java.lang.Object |
convertPrimaryKeyToObjectId(java.lang.Object key)
Converts instance of a PrimaryKey Class to an instance of the Object Id of a corresponding persistence-capable Class. |
protected java.lang.Object |
convertPrimaryKeyToPC(java.lang.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 java.lang.Class |
getPCClass()
Returns the class object of the corresponding persistence-capable class of the concrete bean class. |
java.io.Serializable |
readSerializableObjectFromByteArray(byte[] byteArray)
Constructs a Serializable object from byteArray. |
byte[] |
writeSerializableObjectToByteArray(java.io.Serializable serializableObject)
Serializes serializableObject into a byte array |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.sun.jdo.spi.persistence.support.sqlstore.ejb.JDOEJB11Helper |
|---|
getContainer |
| Field Detail |
|---|
protected static final java.util.ResourceBundle messages
protected static final Logger logger
| Constructor Detail |
|---|
public JDOEJB11HelperImpl()
| Method Detail |
|---|
public EJBObject convertPCToEJBObject(java.lang.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 java.lang.Object convertEJBObjectToPC(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.
java.lang.IllegalArgumentException - if validate is true and instance does
not exist in the database or is deleted.
protected java.lang.Object convertPrimaryKeyToPC(java.lang.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.
java.lang.IllegalArgumentException - if validate is true and instance does
not exist in the database or is deleted.
public java.util.Collection convertCollectionPCToEJBObject(java.util.Collection pcs,
PersistenceManager pm)
convertCollectionPCToEJBObject in interface JDOEJB11Helperpcs - the Collection of persistence-capable instance to be converted.pm - the associated instance of PersistenceManager.
public java.util.Set convertCollectionPCToEJBObjectSet(java.util.Collection pcs,
PersistenceManager pm)
convertCollectionPCToEJBObjectSet in interface JDOEJB11Helperpcs - the Collection of persistence-capable instance to be converted.pm - the associated instance of PersistenceManager.
public java.util.Collection convertCollectionEJBObjectToPC(java.util.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.
java.lang.IllegalArgumentException - if validate is true and at least one instance does
not exist in the database or is deleted.
public java.lang.Object convertPCToPrimaryKey(java.lang.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 java.util.Collection convertCollectionPCToPrimaryKey(java.util.Collection pcs,
PersistenceManager pm)
convertCollectionPCToPrimaryKey in interface JDOEJB11Helperpcs - Collection of the persistence-capable instances.pm - the associated instance of PersistenceManager.
public abstract java.lang.Object convertObjectIdToPrimaryKey(java.lang.Object objectId)
convertObjectIdToPrimaryKey in interface JDOEJB11HelperobjectId - the Object Id to be converted.
public abstract java.lang.Object convertPrimaryKeyToObjectId(java.lang.Object key)
convertPrimaryKeyToObjectId in interface JDOEJB11Helperkey - the PrimaryKey instance to be converted.
public java.util.Collection convertCollectionObjectIdToPrimaryKey(java.util.Collection oids)
convertCollectionObjectIdToPrimaryKey in interface JDOEJB11Helperoids - Collection of the Object Id to be converted.
public java.util.Collection convertCollectionPrimaryKeyToObjectId(java.util.Collection keys)
convertCollectionPrimaryKeyToObjectId in interface JDOEJB11Helperkeys - Collection of the PrimaryKey instances to be converted.
public byte[] writeSerializableObjectToByteArray(java.io.Serializable serializableObject)
writeSerializableObjectToByteArray in interface JDOEJB11HelperserializableObject - Instance of a Serializable Object
public java.io.Serializable readSerializableObjectFromByteArray(byte[] byteArray)
readSerializableObjectFromByteArray in interface JDOEJB11HelperbyteArray - Array of byte obtained from a call to writeSerializableObjectToByteArray
writeSerializableObjectToByteArray(Serializable)public NumericConverter getNumericConverter()
getNumericConverter in interface JDOEJB11Helperpublic abstract java.lang.Class getPCClass()
getPCClass in interface JDOEJB11Helperpublic abstract void assertInstanceOfRemoteInterfaceImpl(java.lang.Object o)
assertInstanceOfRemoteInterfaceImpl in interface JDOEJB11Helpero - the instance to validate.
java.lang.IllegalArgumentException - if validation fails.
protected void assertInstanceOfRemoteInterfaceImpl(java.lang.Object o,
java.lang.String beanName)
o - the instance to validate.beanName - as String.
java.lang.IllegalArgumentException - if validation fails.protected void assertPrimaryKeyNotNull(java.lang.Object pk)
pk - the primary key instance to validate.
java.lang.IllegalArgumentException - if validation fails.
public void assertPrimaryKeyFieldNotNull(java.lang.Object pkfield,
java.lang.String pkfieldName,
java.lang.String beanName)
pkfield - the primary key field instance to validate.pkfieldName - the primary key field name.beanName - the EJB name.
java.lang.IllegalArgumentException - if validation fails.protected void assertObjectIdNotNull(java.lang.Object oid)
oid - the object id instance to validate.
JDOFatalInternalException - if validation fails.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||