|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.j2ca.base.AdapterBOUtil
This class provides a set of utility methods whose functionality is generally common to all adapters. This centralization helps reduce redundant code across adapters, improve uniformity for adapter behavior and, perhaps most importantly, isolate adapters from changes in the underlying WBI libraries upon which the adapter model is built (for example, the WBI BO model).
Method Summary | |
---|---|
static commonj.sdo.DataObject |
copyBusinessObject(commonj.sdo.DataObject busObj)
Performs a deep copy of a given business object. |
static commonj.sdo.DataObject |
copyBusinessObjectShallow(commonj.sdo.DataObject busObj)
Performs a shallow copy of a given business object. |
static commonj.sdo.DataObject |
createBusinessObject(java.lang.String namespace,
java.lang.String complexTypeName)
Creates a new instance of a business object. |
static commonj.sdo.DataObject |
createDataObject(java.lang.String namespace,
java.lang.String complexTypeName)
Creates a new instance of a data object. |
static commonj.sdo.DataObject |
createDataObject(commonj.sdo.Type type)
Creates a new instance of a data object by type. |
static commonj.sdo.Property[] |
getChangedProperties(commonj.sdo.DataObject busObj)
Provides a list of all properties that have been changed in a business object. |
static commonj.sdo.ChangeSummary |
getChangeSummary(commonj.sdo.DataObject busObj)
Returns the ChangeSummary for a given business object. |
static commonj.sdo.Property[] |
getKeyProperties(commonj.sdo.DataObject busObj)
Provides a list of all key properties defined for a given business object |
static int |
getMaxLength(commonj.sdo.Property p)
Returns the maximum length for a property as specified by 'MaxLength' for the property type definition. |
static commonj.sdo.DataObject |
getMetadataForObject(commonj.sdo.DataObject busObj)
Extracts the metadata embedded in the annotation of the business object complex type. |
static commonj.sdo.DataObject |
getMetadataForOperation(commonj.sdo.DataObject busObj,
java.lang.String operationName)
Extracts the metadata embedded in the annotation of the business object operation definition. |
static commonj.sdo.DataObject |
getMetadataForProperty(commonj.sdo.Property prop)
Extracts the metadata embedded in the annotation of the business object property definition. |
static commonj.sdo.Property |
getRootBusinessObjectProperty(commonj.sdo.Type businessGraphType)
Returns the top-level business object type for a given business object graph. |
static java.lang.String |
getTopLevelVerb(commonj.sdo.DataObject busObj)
Returns the top-level verb for an after-image business object. |
static boolean |
isAfterImageObject(commonj.sdo.DataObject busObj)
Checks whether busObj is an after-image business object. |
static boolean |
isBusinessGraph(commonj.sdo.DataObject dataObj)
|
static boolean |
isChildContained(commonj.sdo.Property childObjProperty)
Checks whether a child object is contained by its parent. |
static boolean |
isDeltaObject(commonj.sdo.DataObject busObj)
Checks whether busObj is a delta business object. |
static boolean |
isKeyProperty(commonj.sdo.Property p)
Checks whether a given property is defined as a key in the business object definition. |
static boolean |
isPropertyMarkedBlank(commonj.sdo.DataObject busObj,
commonj.sdo.Property prop)
Checks whether a property should be cleared (or was cleared) in the EIS during processing. |
static boolean |
isPropertyMarkedIgnore(commonj.sdo.DataObject busObj,
commonj.sdo.Property prop)
Checks whether a property should be ignored during processing. |
static void |
markAsAfterImageObject(commonj.sdo.DataObject busObj,
java.lang.String verbName)
Designates busObj as an after-image business object with a top-level verb of verbName |
static void |
markAsDeltaObject(commonj.sdo.DataObject busObj)
Designates busObj as a delta business object. |
static java.lang.String |
serializeDataObject(commonj.sdo.DataObject busObj)
Uses the BOXMLSerializer service to serialize the BO contents. |
static void |
setTopLevelVerb(commonj.sdo.DataObject busObj,
java.lang.String verbName)
Sets the top-level verb for an after-image business object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static commonj.sdo.DataObject createBusinessObject(java.lang.String namespace, java.lang.String complexTypeName) throws BusinessObjectDefinitionNotFoundException, InvalidObjectDefinitionException
complexTypeName
,
this method will instantiate the business graph specified as well as its contained child business object;
the business object instance (rather than the business graph) will be returned. If a business object
name is passed, this method will instantiate a "bare" business object--a business object without any
accompanying business graph.
This method should be used when a component wants to isolate itself from having to determine whether a user-provided
complex type (e.g. the object type specified in an EIS event table) identifies a business graph, a business object or some
other structure. Regardless of the type passed, this method will return a business object that the component can then use.
BusinessObjectDefinitionNotFoundException
- if definition cannot be located and/or instantiated
InvalidObjectDefinitionException
public static commonj.sdo.DataObject createDataObject(java.lang.String namespace, java.lang.String complexTypeName) throws BusinessObjectDefinitionNotFoundException
createBusinessObject(java.lang.String, java.lang.String)
.
BusinessObjectDefinitionNotFoundException
- if definition cannot be located and/or instantiatedpublic static commonj.sdo.DataObject createDataObject(commonj.sdo.Type type) throws BusinessObjectDefinitionNotFoundException, InvalidObjectDefinitionException
createDataObject(String, String)
for details.
BusinessObjectDefinitionNotFoundException
InvalidObjectDefinitionException
public static commonj.sdo.DataObject copyBusinessObject(commonj.sdo.DataObject busObj)
public static commonj.sdo.DataObject copyBusinessObjectShallow(commonj.sdo.DataObject busObj)
public static commonj.sdo.DataObject getMetadataForObject(commonj.sdo.DataObject busObj) throws InvalidObjectDefinitionException
null
if metadata is not defined for this business object
InvalidObjectDefinitionException
public static commonj.sdo.DataObject getMetadataForProperty(commonj.sdo.Property prop) throws InvalidPropertyDefinitionException
null
if
metadata is not defined for this property
InvalidPropertyDefinitionException
public static commonj.sdo.DataObject getMetadataForOperation(commonj.sdo.DataObject busObj, java.lang.String operationName) throws InvalidObjectDefinitionException
null
if
metadata is not defined for the given operation
InvalidObjectDefinitionException
public static boolean isKeyProperty(commonj.sdo.Property p) throws InvalidPropertyDefinitionException
true
if the property is defined as a key for the data object or false
otherwise.
InvalidPropertyDefinitionException
public static commonj.sdo.Property[] getKeyProperties(commonj.sdo.DataObject busObj) throws InvalidPropertyDefinitionException
InvalidPropertyDefinitionException
isKeyProperty(commonj.sdo.Property)
public static void markAsDeltaObject(commonj.sdo.DataObject busObj) throws InvalidObjectDefinitionException
busObj
as a delta business object.
InvalidObjectDefinitionException
public static boolean isDeltaObject(commonj.sdo.DataObject busObj)
busObj
is a delta business object.
true
if busObj
is a delta or false
otherwise.public static void markAsAfterImageObject(commonj.sdo.DataObject busObj, java.lang.String verbName) throws InvalidObjectDefinitionException
busObj
as an after-image business object with a top-level verb of verbName
InvalidObjectDefinitionException
public static boolean isAfterImageObject(commonj.sdo.DataObject busObj)
busObj
is an after-image business object.
true
if busObj
is an after-image or false
otherwise.public static java.lang.String getTopLevelVerb(commonj.sdo.DataObject busObj) throws InvalidObjectDefinitionException
InvalidObjectDefinitionException
public static void setTopLevelVerb(commonj.sdo.DataObject busObj, java.lang.String verbName) throws InvalidObjectDefinitionException
markAsAfterImageObject(commonj.sdo.DataObject, java.lang.String)
InvalidObjectDefinitionException
public static commonj.sdo.ChangeSummary getChangeSummary(commonj.sdo.DataObject busObj)
public static commonj.sdo.Property[] getChangedProperties(commonj.sdo.DataObject busObj)
public static boolean isPropertyMarkedIgnore(commonj.sdo.DataObject busObj, commonj.sdo.Property prop)
public static boolean isPropertyMarkedBlank(commonj.sdo.DataObject busObj, commonj.sdo.Property prop)
public static boolean isChildContained(commonj.sdo.Property childObjProperty)
public static int getMaxLength(commonj.sdo.Property p) throws java.lang.Exception
java.lang.Exception
public static commonj.sdo.Property getRootBusinessObjectProperty(commonj.sdo.Type businessGraphType)
This method allows a component that only has access to the business graph type to determine which property it should consider as the actual business object of interest (for example, if it needs to instantiate an instance of the business object).
public static boolean isBusinessGraph(commonj.sdo.DataObject dataObj)
public static java.lang.String serializeDataObject(commonj.sdo.DataObject busObj) throws java.lang.Exception
java.lang.Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |