IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.base.types
Interface Type

All Known Implementing Classes:
DSEType

@ATTR(value={"id#String#REQUIRED","implClass#String#REQUIRED","keyBuilder#String#IMPLIED"})
public interface Type

This interface is implemented by DSEType, a concrete class that defines a type of business object or business process.


Method Summary
 PropertyDescription addPropertyDescriptor(PropertyDescription propertyDescriptor)
          Adds the PropertyDescriptor to the list of contained descriptors and, if successful, returns the added PropertyDescriptor.
 java.lang.Object createInstance()
          Returns a business object populated with the default data specified for this Type.
 java.lang.Object createInstance(PropertyDescription propertyDescriptor)
          Returns a business object populated with the default data specified for this Type.
 java.lang.Object createInstanceSharingDescriptors(PropertyDescription descriptor, Hashtable parameters, java.lang.String newDescriptorName)
          Returns a business object populated with the default data specified for this Type.
 java.lang.Object createInstanceSharingDescriptors(PropertyDescription descriptor, java.lang.String newDescriptorName)
          Returns a business object populated with the default data specified for this Type.
 PropertyDescription getDefaultDescriptorForType()
          Returns the PropertyDescriptor associated with this Type that defines its business rules.
 java.lang.Class getImplClass()
          Returns the class that implements the business behavior described by this Type.
 Key getKey(TypedData businessObject)
          Returns a Key object which can, if the Type has unique Keys, be used to identify the business object passed as argument.
 KeyBuilder getKeyBuilder()
          Returns the KeyBuilder responsible for building Keys for this Type.
 java.lang.String getName()
          Returns the name of this Type.
 PropertyDescription getPropertyDescriptor(int index)
          Returns the PropertyDescriptor at the index position.
 PropertyDescription getPropertyDescriptor(java.lang.String name)
          Returns the PropertyDescriptor with the passed name or null if the descriptor of that name does not exist.
 java.util.Enumeration getPropertyDescriptors()
          Returns an Enumeration of all PropertyDescriptors contained within this Type.
 boolean isCompound()
          Returns a flag indicating whether this Type is Compound or not.
 void reset()
          Resets the type.
 void reset(Type newType)
          Resets the type with a new Type instance.
 void setDefaultDescriptorForType(PropertyDescription propertyDescriptor)
          Sets the default PropertyDescriptor that defines this Type's business rules.
 void setKeyBuilder(KeyBuilder keyBuilder)
          Sets the KeyBuilder that is responsible for building Keys.
 

Method Detail

addPropertyDescriptor

PropertyDescription addPropertyDescriptor(PropertyDescription propertyDescriptor)
                                          throws DSETypeException
Adds the PropertyDescriptor to the list of contained descriptors and, if successful, returns the added PropertyDescriptor.

Parameters:
propertyDescriptor - PropertyDescription
Returns:
PropertyDescription
Throws:
DSETypeException - - Name of PropertyDescriptor to add is either null or a duplicate

createInstance

java.lang.Object createInstance()
                                throws DSETypeException
Returns a business object populated with the default data specified for this Type. Compound Types return a KeyedCollection and simple Types return a DataField with a business object as its value. The business object is associated with the default PropertyDescriptor for this Type.

Returns:
TypedData
Throws:
DSETypeException - - Object creation is unsuccessful.

createInstance

java.lang.Object createInstance(PropertyDescription propertyDescriptor)
                                throws DSETypeException
Returns a business object populated with the default data specified for this Type. The PropertyDescriptor to be associated with the business object is passed as an argument. Compound Types return a KeyedCollection and simple Types return a DataField with a business object as its value.

Parameters:
propertyDescriptor - PropertyDescription
Returns:
TypedData
Throws:
DSETypeException - - Object creation is unsuccessful

createInstanceSharingDescriptors

java.lang.Object createInstanceSharingDescriptors(PropertyDescription descriptor,
                                                  Hashtable parameters,
                                                  java.lang.String newDescriptorName)
                                                  throws DSETypeException
Returns a business object populated with the default data specified for this Type. The PropertyDescriptor to be associated with the business object and a Hashtable of parameters are passed as arguments. The passed descriptor or the inner descriptors for the Type may be shared with other types. The method uses, if it is defined, the new descriptorName to set the name of the business object. Compound Types return a KeyedCollection and simple Types return a DataField with a business object as value.

Returns:
TypedData
Throws:
DSETypeException - - Object creation is unsuccessful

createInstanceSharingDescriptors

java.lang.Object createInstanceSharingDescriptors(PropertyDescription descriptor,
                                                  java.lang.String newDescriptorName)
                                                  throws DSETypeException
Returns a business object populated with the default data specified for this Type. The PropertyDescriptor to be associated with the business object is passed as an argument. The passed descriptor or the inner descriptors for the Type may be shared with other types. The method uses, if it is defined, the new descriptorName to set the name of the business object. Compound Types return a KeyedCollection and simple Types return a DataField with a business object as its value.

Returns:
TypedData
Throws:
DSETypeException - - Object creation is unsuccessful

getDefaultDescriptorForType

PropertyDescription getDefaultDescriptorForType()
Returns the PropertyDescriptor associated with this Type that defines its business rules.

Returns:
PropertyDescription

getImplClass

java.lang.Class getImplClass()
Returns the class that implements the business behavior described by this Type.

Returns:
Class

getKey

Key getKey(TypedData businessObject)
           throws DSETypeException
Returns a Key object which can, if the Type has unique Keys, be used to identify the business object passed as argument.

This behaviour may be delegated to a utility object since Types are to be employed, not subclassed. Returns a Key with a value of zero for all Types, including Simple Types, which do not have unique Keys.

Parameters:
businessObject - TypedData
Returns:
Key
Throws:
DSETypeException - - If the building of the key for the businessObject given fails

getKeyBuilder

KeyBuilder getKeyBuilder()
Returns the KeyBuilder responsible for building Keys for this Type.

Returns:
KeyBuilder

getName

java.lang.String getName()
Returns the name of this Type.

Returns:
String

getPropertyDescriptor

PropertyDescription getPropertyDescriptor(int index)
Returns the PropertyDescriptor at the index position.

Parameters:
index - int
Returns:
com.ibm.btt.base.types.PropertyDescription

getPropertyDescriptor

PropertyDescription getPropertyDescriptor(java.lang.String name)
Returns the PropertyDescriptor with the passed name or null if the descriptor of that name does not exist.

Parameters:
name - String
Returns:
PropertyDescription

getPropertyDescriptors

java.util.Enumeration getPropertyDescriptors()
Returns an Enumeration of all PropertyDescriptors contained within this Type.

Returns:
Enumeration

isCompound

boolean isCompound()
Returns a flag indicating whether this Type is Compound or not.

Returns:
boolean - True if the Type is compound

reset

void reset()
           throws DSETypeException
Resets the type.

Throws:
DSETypeException - - Thrown if the type cannot be reset

reset

void reset(Type newType)
           throws DSETypeException
Resets the type with a new Type instance.

Parameters:
newType - com.ibm.btt.base.types.DSEType
Throws:
DSETypeException - - Thrown if the type cannot be reset

setDefaultDescriptorForType

void setDefaultDescriptorForType(PropertyDescription propertyDescriptor)
Sets the default PropertyDescriptor that defines this Type's business rules.

Parameters:
propertyDescriptor - PropertyDescription

setKeyBuilder

void setKeyBuilder(KeyBuilder keyBuilder)
Sets the KeyBuilder that is responsible for building Keys.

Parameters:
keyBuilder - KeyBuilder

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2011