Enterprise Information Portal APIs

com.ibm.mm.sdk.common
Class DKComponentTypeDefICM

java.lang.Object
  |
  +--com.ibm.mm.sdk.common.dkAbstractEntityDef
        |
        +--com.ibm.mm.sdk.common.DKComponentTypeDefICM
All Implemented Interfaces:
dkEntityDef, DKMessageId, java.io.Serializable
Direct Known Subclasses:
DKComponentTypeViewDefICM, DKItemTypeDefICM

public class DKComponentTypeDefICM
extends dkAbstractEntityDef
implements java.io.Serializable

This class is used to represent component type definitions in Content Manager Server. Just as Content Manager entities are represented by DKItemTypeDefICM, Content Manager sub-entities are represented by this class. In other words, in a item-type hierarchy, child components are represented by instances of DKComponentTypeDefICM. Furthermore, DKItemTypeDefICM is the specialized sub-class of DKComponentTypeDefICM used to represent root items in an item-type hierarchy.

Since:
Version 8
See Also:
#DKItemTypeDefICM, #dkAbstractEntityDef, Serialized Form

Fields inherited from interface com.ibm.mm.sdk.common.DKMessageId
    For details, see the class or interface
 
Constructor Summary
DKComponentTypeDefICM()
          Default constructor for a component type.
DKComponentTypeDefICM(DKComponentTypeDefICM compType)
          copy constructor for a component type.
DKComponentTypeDefICM(dkDatastore ds)
          Constructs a component type class definition for the specified ICM datastore
 
Method Summary
 void add()
          Adds this component type definition to the persistent store.
 void addAttr(dkAttrDef attrObj)
          Adds a new attribute definition to this component type.
 void addAttrGroup(dkAttrGroupDef attrGroupObj)
          Adds a new attribute group definition to the in-memory representation of this component type.
 void addForeignKey(DKForeignKeyDefICM fkey)
          Adds a new foreign key to the in-memory representation of this component type
 void addSubEntity(dkEntityDef entityObj)
          Adds a new child component type the in-memory representation of this component type.
 java.lang.Object clone()
          Clone this component type definition object
 dkAttrDef createAttr()
          Creates a new attribute type and returns it to caller as a reference t0 a dkAttrDef object
 dkAttrGroupDef createAttrGroup()
          Creates a new attribute group definition and returns it to caller as a reference to a dkAttrGroupDef object.
 DKForeignKeyDefICM createForeignKey()
          Creates a new foreign key and returns it to the caller as a reference to a DKForeignKeyDefICM object
 dkEntityDef createSubEntity()
          Create a new child component type for this component type and return it to the caller as a reference to a dkEntityDef object.
 void del()
          Deletes the persistent definition of this component type from the persistent store.
 dkAttrDef getAttr(java.lang.String attrName)
          Retrieves an attribute definition object using its name from the in-memory representation of the component type.
 dkAttrGroupDef getAttrGroup(java.lang.String attrGroupName)
          Retrieves an attribute group definition object using its name from the in-memory representation of this component type.
 short getCardinalityMax()
          Retrieves the maximum number of rows for this component type.
 short getCardinalityMin()
          Retrieves the minimum number of rows for the component type.
 int getComponentTypeId()
          Gets the component type identifier for the component type.
 DKComponentTypeIndexDefICM getComponentTypeIndex(java.lang.String cpIndexName)
          Retrieves a component type index object based on its name from the in-memory representation of this component type.
 java.lang.String getComponentTypeName()
          Returns the name for this component type
 int getComponentViewId()
          Returns the identifier for the component type view.
 short getDeleteRule()
          Retrieves the delete rule for this component type.
 java.lang.String getDescription(java.lang.String langCode)
          Retrieves the description for this component type for the specified languae code
 DKForeignKeyDefICM getForeignKey(java.lang.String constraintName)
          Retrieves a foreign key object by its name from the in-memory representation of this component type.
 short getId()
          Returns the identifier for this component type.
 int getIntId()
          Gets the integer identifier for this component type
 int getItemTypeId()
          Returns the identifier of the item type that this component type is associated with.
 java.lang.String getItemTypeName()
          Retrieves the name of the item type that this component type is associated with.
 dkEntityDef getParent()
          Retrieves the entity definition for the parent of this component type
 int getParentId()
          Retrieves the identifier for the parent entity of this component type The parent identifier values is used to build the type hierarchy among the component types
 dkEntityDef getSubEntity(java.lang.String compName)
          Retrieves a child component type definition object by its name from the in-memory representation of this component type.
 boolean isRoot()
          Check to see if this component type is a root component type in an item-hierarchy or not
 boolean isView()
          Check to see if this component type is a component type view definition object or a component type definition object.
 java.lang.String[] listAttrGroupNames()
          Retrieves an array of names for user-defined attribute groups.
 java.lang.String[] listAttrGroupNames(int option)
          Retrieves an array of names for attribute groups that satisfy the criteria in the specified option value
 dkCollection listAttrGroups()
          Retrieves the list of user-defined attribute groups for this component type.
 dkCollection listAttrGroups(int option)
          Retrieves a list of attributes group based on the value of the specified option DK_ICM_ALL_ATTRGROUP :Lists all attribute groups from the persistent store DK_ICM_USER_ATTRGROUP :Lists all user defined attribute groups DK_ICM_SYSTEM_ATTRGROUP :Lists all system attribute groups
 java.lang.String[] listAttrNames()
          Retrieves an array of the names of user defined attributes that are not resource manager attributes
 java.lang.String[] listAttrNames(int option)
          Retrieves an array of the names of attributes that don't belong to any attribute group and that satisfy the criteria in the specified option
 dkCollection listAttrs()
          Retrieves a list of user defined attributes for this component type that don't belong to any attribute group and are not resource manager attributes.
 dkCollection listAttrs(int option)
          Retrieves a list of attributes for this component type that don't belong to any attribute group and that satisfy the criteria in the specified option.
 dkCollection listComponentTypeIndexes()
          Gets a list of component type indexes objects belong to the component type
 java.lang.String[] listComponentTypeIndexNames()
          Gets an array of component type index names.
 java.lang.String[] listForeignKeyNames()
          Retrieves an array of names for foreign key constraints belonging to this component type
 dkCollection listForeignKeys()
          Retrieves the list of foreign keys for this component type
 dkCollection listSubEntities()
          Retrieves a list of child component types for this component type.
 dkCollection listSubEntities(int option)
          Retrieves a list of child component types for this component based on the option value.
 java.lang.String[] listSubEntityNames()
          Retrieves an array of names for child component type.
 java.lang.String[] listSubEntityNames(int option)
          Retrieves an array of names for child component type.
 void removeAttr(java.lang.String attrName)
          Removes an attribute definition from this component type.
 void removeAttrGroup(java.lang.String attrGroupName)
          Removes an attribute group from the in-memory representation of this component type.
 void removeForeignKey(java.lang.String constraintName)
          Removes a foreign key from the in-memory representation of this component type.
 void removeSubEntity(java.lang.String compName)
          Removes a child component type by its name from the in-memory representation of this component type.
 dkAttrDef retrieveAttr(java.lang.String attrName)
          Retrieves an attribute definition object based on its name from the persistent store
 dkAttrGroupDef retrieveAttrGroup(java.lang.String attrGroupName)
          Retrieves an attribute group object using its name from the persistent store
 DKComponentTypeIndexDefICM retrieveComponentTypeIndex(java.lang.String indexName)
          Retrieve a component type index object by its name from the persistent store
 DKForeignKeyDefICM retrieveForeignKey(java.lang.String constraintName)
          Retrieves a foreign key object based on its constraint name for this component type from the persistent store
 dkEntityDef retrieveParent()
          Retrieves the parent entity definition for this component type from the persistent store
 dkEntityDef retrieveSubEntity(java.lang.String compName)
          Retrieve a child component type object from the persistent store based on its name.
 void setCardinalityMax(short cardinalityMax)
          Sets the maximum number of rows for this component type.
 void setCardinalityMin(short cardinalityMin)
          Sets the minimum number of rows for this component type.
 void setComponentTypeName(java.lang.String compTypeName)
          Sets the name for this component type
 void setDeleteRule(short deleteRule)
          Sets the delete rule for this component type.
 void setDescription(java.lang.String desc, java.lang.String langCode)
          Sets a new value into the description field for this component type for the specified language code.
 void setId(short id)
          Sets the identifier for this component type
 void setIntId(int id)
          Sets the integer-based identifier for this component type
 void setItemTypeName(java.lang.String itemTypeName)
          Sets the name of the item type that this component type is associated with
 void setParent(dkEntityDef parent)
          Sets the parent component type for this component type.
 void setParentId(int parentEntityId)
          Sets the identifier for the parent component type of this component type
 void update()
          Updates the persistent reprenstation of this component type object in the persistent store.
 void updateAttr(dkAttrDef attrDef)
          Updates an attribute definition from the in-memory representation of this component type
 void updateAttrGroup(dkAttrGroupDef attrGroupDef)
          Updates the definition of an attribute group object inside the in-memory representation of this component type
 void updateForeignKey(DKForeignKeyDefICM fkey)
          Updates the foreign key in the in-memory representation of this component type.
 void updateSubEntity(dkEntityDef subEntityDef)
          Updates a child component type definition object in the in-memory representation of this component type.
 
Methods inherited from class com.ibm.mm.sdk.common.dkAbstractEntityDef
add, add, clearCache, datastoreName, datastoreType, del, del, deleteAttr, deleteSubEntity, getDatastore, getDescription, getName, getParentEntityName, getType, hasSubEntities, isSearchable, isTextSearchable, setDatastore, setDescription, setName, setParentEntityName, setTextSearchable, setType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DKComponentTypeDefICM

public DKComponentTypeDefICM()
Default constructor for a component type. Constructs a component type class definition for the Content Manager store

DKComponentTypeDefICM

public DKComponentTypeDefICM(dkDatastore ds)
Constructs a component type class definition for the specified ICM datastore
Parameters:
ds - - the ICM datastore

DKComponentTypeDefICM

public DKComponentTypeDefICM(DKComponentTypeDefICM compType)
copy constructor for a component type. Creates a component type definition object using the component type object in the input parameter as a template
Parameters:
compType - component type object to be used as a template for creating the new object
Method Detail

clone

public java.lang.Object clone()
Clone this component type definition object
Returns:
A component type definition object that is a clone of this object

isRoot

public boolean isRoot()
Check to see if this component type is a root component type in an item-hierarchy or not
Returns:
false, since this class is always used to reprsent a child component. Sub-classes of this class will return true or false based on whether they represent root or child
See Also:
DKItemTypeDefICM

isView

public boolean isView()
Check to see if this component type is a component type view definition object or a component type definition object.
Returns:
false, since this class is always used to represent the base component type The DKComponentTypeViewDefICM overrides this method and returns true since it represents a view See DKComponentTypeViewDefICM

getId

public short getId()
Returns the identifier for this component type.
Returns:
component type identifier

setId

public void setId(short id)
Sets the identifier for this component type
Parameters:
id - the identifier value for this component type

getIntId

public int getIntId()
Gets the integer identifier for this component type
Returns:
integer identifier for this component type

setIntId

public void setIntId(int id)
Sets the integer-based identifier for this component type
Parameters:
id - - integer-based identifier for this component type

getComponentTypeId

public int getComponentTypeId()
Gets the component type identifier for the component type.
Returns:
identifier for this component type.

getComponentTypeName

public java.lang.String getComponentTypeName()
Returns the name for this component type
Returns:
name for this component type

setComponentTypeName

public void setComponentTypeName(java.lang.String compTypeName)
Sets the name for this component type
Parameters:
compTypeName - name to be set for this component type

getComponentViewId

public int getComponentViewId()
Returns the identifier for the component type view. Since this is the base type, the component view identifier is equal to the component type identifier. This method is overriden to return the view identifier in the DKComponentTypeViewDefICM sub-class
Returns:
identifier of the component type view

getItemTypeId

public int getItemTypeId()
Returns the identifier of the item type that this component type is associated with.
Returns:
the item type identifier

getItemTypeName

public java.lang.String getItemTypeName()
                                 throws DKException,
                                        java.lang.Exception
Retrieves the name of the item type that this component type is associated with.
Returns:
the name of the item type that this component type is associated with.

setItemTypeName

public void setItemTypeName(java.lang.String itemTypeName)
                     throws DKException,
                            java.lang.Exception
Sets the name of the item type that this component type is associated with
Parameters:
itemTypeName, - the name of the item type that this component type is associated with.

createAttr

public dkAttrDef createAttr()
                     throws DKException,
                            java.lang.Exception
Creates a new attribute type and returns it to caller as a reference t0 a dkAttrDef object
Overrides:
createAttr in class dkAbstractEntityDef
Returns:
a new DKAttrDefICM object as a reference to a dkAttrDef object
Throws:
if - this entity did not allow a new attribute to be created

addAttr

public void addAttr(dkAttrDef attrObj)
             throws DKAlreadyExistException,
                    DKException,
                    java.lang.Exception
Adds a new attribute definition to this component type. This is in-memory operation only.
Overrides:
addAttr in class dkAbstractEntityDef
Parameters:
attrObj - the new attribute definition to be added to the component type as an instance of DKAttrDefICM.
Throws:
this - attribute already exists in this component type definition

removeAttr

public void removeAttr(java.lang.String attrName)
                throws DKNotExistException,
                       DKException
Removes an attribute definition from this component type. This is in-memory operation only
Overrides:
removeAttr in class dkAbstractEntityDef
Parameters:
attrName - name of the attribute definition that needs to be removed from the in-memory representation of this component type
Throws:
if - this attribute definition to be removed doesn't exist in the in-memory representation of this component type

getAttr

public dkAttrDef getAttr(java.lang.String attrName)
                  throws DKException,
                         java.lang.Exception
Retrieves an attribute definition object using its name from the in-memory representation of the component type. No datastore operation is initiated as a result of calling this method
Overrides:
getAttr in class dkAbstractEntityDef
Parameters:
attrName - name of the attribute whose definition is to be retrieved
Returns:
an attribute definition object as an instance of DKAttrDefICM
Throws:
if - the attribute with the specified name does not exist

updateAttr

public void updateAttr(dkAttrDef attrDef)
                throws DKException,
                       java.lang.Exception
Updates an attribute definition from the in-memory representation of this component type
Parameters:
attrDef - the attribute definition that needs to be updated from the in-memory representation of this component type
Throws:
if - the attribute definition to be updated does not exist exist in the in-memory representation of this component type

listAttrs

public dkCollection listAttrs()
                       throws DKException,
                              java.lang.Exception
Retrieves a list of user defined attributes for this component type that don't belong to any attribute group and are not resource manager attributes.
Overrides:
listAttrs in class dkAbstractEntityDef
Returns:
a collection of attribute definitions as instances of DKAttrDefICM
Throws:
if - the component type name/identifier that those attributes belong is invalid

listAttrs

public dkCollection listAttrs(int option)
                       throws DKException,
                              java.lang.Exception
Retrieves a list of attributes for this component type that don't belong to any attribute group and that satisfy the criteria in the specified option.
Parameters:
option - - valid values are:
  • DK_ICM_ALL_ATTR :Lists attributes that match all of the options below in combinaiton
  • DK_ICM_RESOURCE_ATTR :Lists all resource manager attributes
  • DK_ICM_USER_ATTR :Lists all user defined attributes
  • DK_ICM_SYSTEM_ATTR :Lists all system attributes
  • DK_ICM_USER_ATTR_NO_RESOURCE :Lists user defined attributes without listing resource manager attributes
Returns:
a collection of attribute definitions as instance of DKAttrDefICM
Throws:
if - the component type name/identifier that those attributes belong is invalid

listAttrNames

public java.lang.String[] listAttrNames()
                                 throws DKException,
                                        java.lang.Exception
Retrieves an array of the names of user defined attributes that are not resource manager attributes
Overrides:
listAttrNames in class dkAbstractEntityDef
Returns:
an array of names of user-defined attributes that are not resource manager attributes
Throws:
if - the component type name/identifier that those attributes belong is invalid

listAttrNames

public java.lang.String[] listAttrNames(int option)
                                 throws DKException,
                                        java.lang.Exception
Retrieves an array of the names of attributes that don't belong to any attribute group and that satisfy the criteria in the specified option
Parameters:
option - - valid option values are:
  • DK_ICM_ALL_ATTR :Lists attributes that match all of the options specified below in combinition
  • DK_ICM_RESOURCE_ATTR :Lists all resource manager attributes
  • DK_ICM_USER_ATTR :Lists all user defined attributes
  • DK_ICM_SYSTEM_ATTR :Lists all system attributes
  • DK_ICM_USER_ATTR_NO_RESOURCE :Lists all user defined attributes that are not resource manager attributes
Returns:
an array of names for attributes that match the option criteria and are not part of any attribute group
Throws:
if - the component type name/identifier that those attributes belong is invalid

retrieveAttr

public dkAttrDef retrieveAttr(java.lang.String attrName)
                       throws DKException,
                              java.lang.Exception
Retrieves an attribute definition object based on its name from the persistent store
Overrides:
retrieveAttr in class dkAbstractEntityDef
Parameters:
attrName - - the name of the attribute whose definition is to be retrieved from the persistent store
Returns:
Attribute definition as an instance of DKAttrDefICM

createAttrGroup

public dkAttrGroupDef createAttrGroup()
                               throws DKException,
                                      java.lang.Exception
Creates a new attribute group definition and returns it to caller as a reference to a dkAttrGroupDef object.
Returns:
a new DKAttrGroupDefICM object as a reference to a dkAttrGroupDef object.
Throws:
if - this component does not create the new definition of an attribute group

addAttrGroup

public void addAttrGroup(dkAttrGroupDef attrGroupObj)
                  throws DKAlreadyExistException,
                         DKException,
                         java.lang.Exception
Adds a new attribute group definition to the in-memory representation of this component type. No datastore operation is initiated as a result of calling this method
Parameters:
attrGroupObj - - a attribute group definition as an instance of DKAttrGroupDefICM.
Throws:
if - the specified attribute group already exists in this component type

removeAttrGroup

public void removeAttrGroup(java.lang.String attrGroupName)
                     throws DKNotExistException,
                            DKException
Removes an attribute group from the in-memory representation of this component type. No datastore operation is initiated as a result of calling this method
Parameters:
attrGroupName - name of the attribute group that needs to be removed from the in-memroy representation of this component type.
Throws:
if - the attribute group to be removed does not exist in this component type

getAttrGroup

public dkAttrGroupDef getAttrGroup(java.lang.String attrGroupName)
                            throws DKException,
                                   java.lang.Exception
Retrieves an attribute group definition object using its name from the in-memory representation of this component type. If the attribute group does not exist in memory, then null value is returned.
Parameters:
attrGroupName - name of attribute group to be retrieved from the in-memory representation of the component type
Returns:
an attribute group object definition as an instance of DKAttrGroupDefICM
Throws:
if - the attribute group with the specified name does not exist in the in-memory representation of this component type

updateAttrGroup

public void updateAttrGroup(dkAttrGroupDef attrGroupDef)
                     throws DKException,
                            java.lang.Exception
Updates the definition of an attribute group object inside the in-memory representation of this component type
Parameters:
attrGroupDef - attribute group object whose definition is to be updated
Throws:
if - the attribute group object does not exist in the in-memory representation of this component type

listAttrGroups

public dkCollection listAttrGroups()
                            throws DKException,
                                   java.lang.Exception
Retrieves the list of user-defined attribute groups for this component type.
Returns:
a collection of user-defined attribute group definitions as instance of DKAttrGroupDefICM
Throws:
if - the component type name/identifier that those attribute groups belong is invalid

listAttrGroups

public dkCollection listAttrGroups(int option)
                            throws DKException,
                                   java.lang.Exception
Retrieves a list of attributes group based on the value of the specified option
Returns:
a collection of attribute group definitions as instance of DKAttrGroupDefICM
Throws:
if - the component type name/identifier that those attribute groups belong is invalid

listAttrGroupNames

public java.lang.String[] listAttrGroupNames()
                                      throws DKException,
                                             java.lang.Exception
Retrieves an array of names for user-defined attribute groups.
Returns:
an array of names for user-defined attribute groups
Throws:
if - the component type name/identifier that those attributes belong is invalid

listAttrGroupNames

public java.lang.String[] listAttrGroupNames(int option)
                                      throws DKException,
                                             java.lang.Exception
Retrieves an array of names for attribute groups that satisfy the criteria in the specified option value
Parameters:
option - - valid option values are:
  • DK_ICM_ALL_ATTRGROUP :Lists the names of all of the attribute groups from the persistent store
  • DK_ICM_USER_ATTRGROUP :Lists the names of the user defined attribute groups
  • DK_ICM_SYSTEM_ATTRGROUP :Lists the names of the system attribute groups
Returns:
an array of names of the attribute groups selected on the basis of the provided options
Throws:
if - the component type name/identifier that those attributes belong is invalid

retrieveAttrGroup

public dkAttrGroupDef retrieveAttrGroup(java.lang.String attrGroupName)
                                 throws DKException,
                                        java.lang.Exception
Retrieves an attribute group object using its name from the persistent store
Parameters:
name - the name of the attribute group to be retrieved from the persistent store
Returns:
attribute group definition as an instance of DKAttrGroupDefICM

getParent

public dkEntityDef getParent()
Retrieves the entity definition for the parent of this component type
Returns:
parent entity definition as a dkEntityDef object

setParent

public void setParent(dkEntityDef parent)
Sets the parent component type for this component type.
Parameters:
parentEntity - parent entity definition

setParentId

public void setParentId(int parentEntityId)
Sets the identifier for the parent component type of this component type
Parameters:
parentEntityId - component type identifier for the parent entity of this component type

getParentId

public int getParentId()
Retrieves the identifier for the parent entity of this component type The parent identifier values is used to build the type hierarchy among the component types
Returns:
identifier of the parent entity for this component type

retrieveParent

public dkEntityDef retrieveParent()
                           throws DKException,
                                  java.lang.Exception
Retrieves the parent entity definition for this component type from the persistent store
Returns:
parent entity definition as an instance of DKComponentTypeDefICM.

createSubEntity

public dkEntityDef createSubEntity()
                            throws DKException,
                                   java.lang.Exception
Create a new child component type for this component type and return it to the caller as a reference to a dkEntityDef object.
Overrides:
createSubEntity in class dkAbstractEntityDef
Returns:
a new child component object of type DKComponentTypeDefICM as a reference to a dkEntityDef object
Throws:
if - this call does not result in the creation of a sub entity

addSubEntity

public void addSubEntity(dkEntityDef entityObj)
                  throws DKAlreadyExistException,
                         DKException,
                         java.lang.Exception
Adds a new child component type the in-memory representation of this component type. No datastorestore operation is initiated as a result of calling this method
Overrides:
addSubEntity in class dkAbstractEntityDef
Parameters:
entityObj - a new child component as an instance of DKComponentTypeDefICM
Throws:
if - the child component type already exists as part of this entity

removeSubEntity

public void removeSubEntity(java.lang.String compName)
                     throws DKNotExistException,
                            DKException
Removes a child component type by its name from the in-memory representation of this component type. No datastore operation is initiated as a result of calling this method
Overrides:
removeSubEntity in class dkAbstractEntityDef
Parameters:
compName - the component type name of the entity that needs to be removed
Throws:
if - this direct child component type definition to be removed doesn't exist in the in-memory representation of this component type

getSubEntity

public dkEntityDef getSubEntity(java.lang.String compName)
                         throws DKException,
                                java.lang.Exception
Retrieves a child component type definition object by its name from the in-memory representation of this component type. No datastore operation is initiated as a result of calling this method
Overrides:
getSubEntity in class dkAbstractEntityDef
Parameters:
compName - name of the child component type to be retrieved
Returns:
a sub entity object as an instance of DKComponentTypeDefICM
Throws:
if - the child component type of the specified name does not exist in-memory representation of this component type

updateSubEntity

public void updateSubEntity(dkEntityDef subEntityDef)
                     throws DKException,
                            java.lang.Exception
Updates a child component type definition object in the in-memory representation of this component type. No datastore operation is initiated as a result of calling this method
Parameters:
subEntityDef - the child component type object to be updated in the in-memory representation
Throws:
if - the component type object to be updated does not exist in the memory

listSubEntities

public dkCollection listSubEntities()
                             throws DKException,
                                    java.lang.Exception
Retrieves a list of child component types for this component type. Only the direct chlidren will be returned by this call. The user has to recursively call this method in order to retrieve all of the child component types underneath this component type
Overrides:
listSubEntities in class dkAbstractEntityDef
Returns:
a collection of direct children sub-entities for this component type as instances of DKComponentTypeDefICM
Throws:
if - error occurs

listSubEntities

public dkCollection listSubEntities(int option)
                             throws DKException,
                                    java.lang.Exception
Retrieves a list of child component types for this component based on the option value.
Parameters:
option - - valid option values are:
  • DKConstantICM.DK_ICM_ALL_COMPONENT_TYPESLists all direct child component types
  • DKConstantICM.DK_ICM_SYSTEM_COMPONENT_TYPESLists all the system defined direct child component types
  • DKConstantICM.DK_ICM_USER_COMPONENT_TYPESLists all user defined direct child component types
If caching is on and the child component types have been retrieved previously, only the child component types currently in-memory will be returned. Otherwise the child component types are retrieved from the persistent store and stored in memory for future cached access.
Returns:
a collection of direct child component types as instances of DKComponentTypeDefICM
Throws:
DKException - if an error occurs

listSubEntityNames

public java.lang.String[] listSubEntityNames()
                                      throws DKException,
                                             java.lang.Exception
Retrieves an array of names for child component type. The child component types selected are the user defined direct chlid component types
Overrides:
listSubEntityNames in class dkAbstractEntityDef
Returns:
an array of names of the selected child component types.
Throws:
if - an error occurs

listSubEntityNames

public java.lang.String[] listSubEntityNames(int option)
                                      throws DKException,
                                             java.lang.Exception
Retrieves an array of names for child component type. The child component types selected are the direct children and also those selected based on the criteria established by the option value
Parameters:
option - - valid values are:
  • DKConstantICM.DK_ICM_ALL_COMPONENT_TYPESLists all the direct child component types
  • DKConstantICM.DK_ICM_SYSTEM_COMPONENT_TYPESLists the system defined direct child component types
  • DKConstantICM.DK_ICM_USER_COMPONENT_TYPESLists the user defined direct child component types
Returns:
an array of names for the selected child component types.
Throws:
if - an error occurs

retrieveSubEntity

public dkEntityDef retrieveSubEntity(java.lang.String compName)
                              throws DKException,
                                     java.lang.Exception
Retrieve a child component type object from the persistent store based on its name.
Overrides:
retrieveSubEntity in class dkAbstractEntityDef
Parameters:
name - the name of the child component type to be retrieved from the persistent store
Returns:
child component type definition as an instance of DKComponentTypeDefICM
Throws:
if - an error occurs

getComponentTypeIndex

public DKComponentTypeIndexDefICM getComponentTypeIndex(java.lang.String cpIndexName)
                                                 throws DKException,
                                                        java.lang.Exception
Retrieves a component type index object based on its name from the in-memory representation of this component type. No datastore operation is initiated as a result of calling this mehtod
Parameters:
cpIndexName - name of component type index to be retrieved
Returns:
a component type index as an instance of DKComponentTypeIndexDefICM
Throws:
if - the component type index does not exist in the in-memory representation of this component type

listComponentTypeIndexes

public dkCollection listComponentTypeIndexes()
                                      throws DKException,
                                             java.lang.Exception
Gets a list of component type indexes objects belong to the component type
Returns:
a dkCollection of DKComponentTypeIndexDefICM's
Throws:
DKException - if error occurs

listComponentTypeIndexNames

public java.lang.String[] listComponentTypeIndexNames()
                                               throws DKException,
                                                      java.lang.Exception
Gets an array of component type index names.
Returns:
an arry of component type index names
Throws:
DKException - if error occurs

retrieveComponentTypeIndex

public DKComponentTypeIndexDefICM retrieveComponentTypeIndex(java.lang.String indexName)
                                                      throws DKException,
                                                             java.lang.Exception
Retrieve a component type index object by its name from the persistent store
Parameters:
name - the name of the component type index to be retrieved from the persistent datastore

createForeignKey

public DKForeignKeyDefICM createForeignKey()
                                    throws DKException,
                                           java.lang.Exception
Creates a new foreign key and returns it to the caller as a reference to a DKForeignKeyDefICM object
Returns:
a new foreign key as an instance of a DKForeignKeyDefICM
Throws:
if - this method call does not create a foreign key

addForeignKey

public void addForeignKey(DKForeignKeyDefICM fkey)
                   throws DKAlreadyExistException,
                          DKException,
                          java.lang.Exception
Adds a new foreign key to the in-memory representation of this component type
Parameters:
fkey - a foreing key object as an instance of DKForeignKeyDefICM
Throws:
if - this foreign key already exists in this component type

removeForeignKey

public void removeForeignKey(java.lang.String constraintName)
                      throws DKNotExistException,
                             DKException
Removes a foreign key from the in-memory representation of this component type. No datastore operation is initiated as a result of calling this method
Parameters:
constraintName - - name of the foreing key that needs to be removed
Throws:
if - this foreign key definition to be removed doesn't exist in the in-memory representation of this component type

getForeignKey

public DKForeignKeyDefICM getForeignKey(java.lang.String constraintName)
                                 throws DKException,
                                        java.lang.Exception
Retrieves a foreign key object by its name from the in-memory representation of this component type. No datastore operation is initiated as a result of calling this method
Parameters:
constraintName - - name of the foreing key to be retrieved
Returns:
a foreign key as an instance of DKForeignKeyDefICM
Throws:
if - this foreign key definition with the given name doesn't exist in the in-memory representation of this component type

updateForeignKey

public void updateForeignKey(DKForeignKeyDefICM fkey)
                      throws DKException,
                             java.lang.Exception
Updates the foreign key in the in-memory representation of this component type. No datastore operation is initiated as a result of calling this method
Parameters:
fkey - - foreing key object to be updated in the in-memory representation
Throws:
if - the foreign key object doesn't exist in the in-memory representation of this component type

listForeignKeys

public dkCollection listForeignKeys()
                             throws DKException,
                                    java.lang.Exception
Retrieves the list of foreign keys for this component type
Returns:
a collection of foreign keys as instances of DKForeignKeyDefICM
Throws:
if - an error occurs

listForeignKeyNames

public java.lang.String[] listForeignKeyNames()
                                       throws DKException,
                                              java.lang.Exception
Retrieves an array of names for foreign key constraints belonging to this component type
Returns:
an array of foreign key constraint names
Throws:
if - an error occurs

retrieveForeignKey

public DKForeignKeyDefICM retrieveForeignKey(java.lang.String constraintName)
                                      throws DKException,
                                             java.lang.Exception
Retrieves a foreign key object based on its constraint name for this component type from the persistent store
Parameters:
constraintName - the constraint name of the foreign key to be retrieved from the persistent store
Throws:
if - an error occurs

add

public void add()
         throws DKException,
                java.lang.Exception
Adds this component type definition to the persistent store.
Overrides:
add in class dkAbstractEntityDef
Throws:
when - the subclass does not implement this method

del

public void del()
         throws DKException,
                java.lang.Exception
Deletes the persistent definition of this component type from the persistent store. The in-memory copy of the component type is not affected.
Overrides:
del in class dkAbstractEntityDef
Throws:
when - the subclass does not implement this method

update

public void update()
            throws DKException,
                   java.lang.Exception
Updates the persistent reprenstation of this component type object in the persistent store. The in-memory copy of the component type is not changed.
Throws:
when - the subclass does not implement this method

getCardinalityMin

public short getCardinalityMin()
Retrieves the minimum number of rows for the component type. This number is valid only for non-root component types
Returns:
minimum number of rows for this component type

setCardinalityMin

public void setCardinalityMin(short cardinalityMin)
Sets the minimum number of rows for this component type. This number is valid only for non-root component types
Parameters:
cardinalityMin - minimum number of rows for this component type

getCardinalityMax

public short getCardinalityMax()
Retrieves the maximum number of rows for this component type. This number is valid only for non-root component type. Maxium cardinality must be equal to or greater than the minimum cardinality
Returns:
cardinalityMax maximum number of rows for this component type

setCardinalityMax

public void setCardinalityMax(short cardinalityMax)
Sets the maximum number of rows for this component type. This number is valid only for non-root component type. Maxium cardinality must be greater than or equal to the minimum cardinality
Parameters:
cardinalityMax - maximum number of rows for this component type

getDeleteRule

public short getDeleteRule()
Retrieves the delete rule for this component type. The delete rule specifies what action is to take place on the target component type when the source component type is deleted.
Returns:
the delete rule. The valid values are:
  • DKConstantICM.DK_ICM_DELETE_RULE_NO_ACTION No action. Delete is prevented and an exception is thrown
  • DKConstantICM.DK_ICM_DELETE_RULE_SET_NULLSet null. The source component type is deleted and relationship with the target component type is removed.
  • DKConstantICM.DK_ICM_DELETE_RULE_CASCADECascade on deletion. The source and target component type are both deleted.
  • DKConstantICM.DK_ICM_DELETE_RULE_RESTRICTRestrict on deletion. Same as no action

setDeleteRule

public void setDeleteRule(short deleteRule)
Sets the delete rule for this component type. The delete rule specifies what action is to take place on the target component type when the source component type is deleted.
Parameters:
deleteRule - - The valid values are:
  • DKConstantICM.DK_ICM_DELETE_RULE_NO_ACTION No action. Delete is prevented and an exception is thrown
  • DKConstantICM.DK_ICM_DELETE_RULE_SET_NULLSet null. The source component type is deleted and relationship with the target component type is removed.
  • DKConstantICM.DK_ICM_DELETE_RULE_CASCADECascade on deletion. The source and target component type are both deleted.
  • DKConstantICM.DK_ICM_DELETE_RULE_RESTRICTRestrict on deletion. Same as no action

getDescription

public java.lang.String getDescription(java.lang.String langCode)
                                throws DKException,
                                       java.lang.Exception
Retrieves the description for this component type for the specified languae code
Parameters:
langCode, - the language code for which the description is to be retrieved
Returns:
the description for the specified language code for this component type

setDescription

public void setDescription(java.lang.String desc,
                           java.lang.String langCode)
                    throws DKException,
                           java.lang.Exception
Sets a new value into the description field for this component type for the specified language code.
Parameters:
langCode, - the language code for this component type for the specified language code
desc, - the value to set this component type's description to

EIP Java APIs

(c) Copyright International Business Machines Corporation 1996, 2002. IBM Corp. All rights reserved.