|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.dse.base.types.DSEType
This class provides an implementation of the Type interface which defines a Type of business object or business process.
This definition is configured through the associated of PropertyDescriptors. Two kinds of PropertyDescriptors can be associated, namely those which describe structure and a single PropertyDescriptor which defines the default business rules for business objects of this Type.
Field Summary | |
static DSETypeExternalizer |
externalizer
|
Fields inherited from interface com.ibm.dse.base.types.TypeConstants |
CONV_TYPE_DEFAULT,
CONV_TYPE_HOST,
CONV_TYPE_OUTPUT,
CONV_TYPE_SER,
CONV_TYPE_XML,
disabled,
hidden,
isDisabled,
isHidden,
isMandatory,
isOmitted,
isReadOnly,
mandatory,
omitted,
readOnly,
TYPE_DEFAULT,
TYPE_REGISTRY_INIT_SIZE |
Constructor Summary | |
DSEType(java.lang.String name,
java.lang.String implClassName)
This constructor creates a DSEType with the name and implementing class passed as argument. |
Method Summary | |
PropertyDescription |
addPropertyDescriptor(PropertyDescription descriptor)
Adds the PropertyDescriptor passed as argument to the list of contained descriptors and if successful, the PropertyDescriptor added is returned. |
java.lang.Object |
createInstance()
Returns a business object populated with the default data specified for this Type. |
java.lang.Object |
createInstance(PropertyDescription descriptor)
Returns a business object populated with the default data specified for this Type. |
PropertyDescription |
getDefaultDescriptorForType()
Returns the PropertyDescriptor associated with this Type which defines its business rules. |
static DSETypeExternalizer |
getExternalizer()
Gets the externalizer. |
java.lang.Class |
getImplClass()
Returns the class which implements the business behaviour 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 passed |
PropertyDescription |
getPropertyDescriptor(java.lang.String name)
Returns the PropertyDescriptor with the name passed, or null is no descriptor of that name exists. |
java.util.Enumeration |
getPropertyDescriptors()
Retruns an Enumeration of all PropertyDescriptors contained within this Type. |
boolean |
isCompound()
Retruns a flag indicating whether this Type is Compound or not. |
static java.lang.Object |
readObject(java.lang.String name)
Instantiates a Typed Data Element named: name, from the definition file. |
void |
reset()
Resets this type |
void |
reset(Type newType)
Resets this type with a new Type instance |
void |
setDefaultDescriptorForType(PropertyDescription defaultDescriptor)
Sets the default PropertyDescriptor which defines this Types business rules to that passed as argument. |
static void |
setExternalizer(DSETypeExternalizer anExternalizer)
Sets the externalizer. |
void |
setKeyBuilder(KeyBuilder keyBuilder)
Sets the KeyBuilder which is responsible for building Keys for this Type to that passed. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static DSETypeExternalizer externalizer
Constructor Detail |
public DSEType(java.lang.String name, java.lang.String implClassName) throws DSETypeException
name
- StringimplClassName
- StringMethod Detail |
public PropertyDescription addPropertyDescriptor(PropertyDescription descriptor) throws DSETypeException
propertyDescriptor
- PropertyDescriptionpublic java.lang.Object createInstance() throws DSETypeException
Compond Types return a KeyedCollection, Simple Types return a DataField with a business object as value. The business object returned is associated with the defualt PropertyDescriptor for this Type.
public java.lang.Object createInstance(PropertyDescription descriptor) throws DSETypeException
Compond Types return a KeyedCollection, Simple Types return a DataField with a business object as value. The PropertyDescriptor to be associated with the business object created is passed as argument.
propertyDescriptor
- PropertyDescriptionpublic PropertyDescription getDefaultDescriptorForType()
public static DSETypeExternalizer getExternalizer() throws DSETypeException
public java.lang.Class getImplClass()
public Key getKey(TypedData businessObject) throws DSETypeException
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.
businessObject
- TypedDatapublic KeyBuilder getKeyBuilder()
public java.lang.String getName()
public PropertyDescription getPropertyDescriptor(int index)
index
- intpublic PropertyDescription getPropertyDescriptor(java.lang.String name)
name
- Stringpublic java.util.Enumeration getPropertyDescriptors()
public boolean isCompound()
public static java.lang.Object readObject(java.lang.String name) throws DSETypeException
public void reset() throws DSETypeException
public void reset(Type newType) throws DSETypeException
newType
- com.ibm.dse.base.types.DSETypepublic void setDefaultDescriptorForType(PropertyDescription defaultDescriptor)
propertyDescriptor
- PropertyDescriptionpublic static void setExternalizer(DSETypeExternalizer anExternalizer)
anExternalizer
- DSETypeExternalizerpublic void setKeyBuilder(KeyBuilder keyBuilder)
keyBuilder
- KeyBuilder
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |