Package com.portal.pfc.infranet.datadict
Class DDClass
java.lang.Object
com.portal.pfc.infranet.datadict.DDBase
com.portal.pfc.infranet.datadict.DDClass
- All Implemented Interfaces:
IConstants
,Cloneable
,Comparable
- Direct Known Subclasses:
DDDatabase
This class contains all the info regarding the storable class.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
Fields inherited from class com.portal.pfc.infranet.datadict.DDBase
fFlist, fIsToModify, fNew
Fields inherited from interface com.portal.pfc.infranet.datadict.IConstants
CLS_NAME, FIELD_NOT_FOUND_TYPE, FIELD_NUM, kEditable, kEditableColor, kElementID, kFirstElementID, kHGap, kMagentaColor, kNewObject, kNonExistent, kNotEditableColor, kNumberDDFields, kStringLength, kVGap, PKG_NAME
-
Constructor Summary
ConstructorsConstructorDescriptionThis constructor is used when the class info is read from a file.DDClass
(DataDictionary dictionary, FList flist) The input flist should have the following formatDDClass
(DataDictionary dictionary, String name, String label, String desc) This constructor is used to create a new SubclassDDClass
(DataDictionary dictionary, String name, String label, String desc, String table, String seqStart, String storageSpec) This constructor is used to create a new Base class IMPORTANT: For base storable classes (not subclasses), Sequence Start Number field This is useful for creating objects with known POIDs. -
Method Summary
Modifier and TypeMethodDescriptionclone()
This method returns a copy of the object.protected FList
Creates an FList with Name, Description, Label, Read Access and Write Access information for the given class.protected FList
createClassArray
(String name, String descr, String table, String readAccess, String writeAccess, String label, Integer seqNum, String tableStorage) Creates an FList with Name, Description, Label, Read Access, Write Access, SQL Table name, Sequence Start Number and Storage Specifications information for the given class.protected FList
createElement
(DDClassField classFieldObj) This method is used to set the default properties for the dropped fields.protected FList
createElement
(String name, String type, String createPerm, String modPerm, String table, int fieldID) This method is used by DDClass.java, to add the mandatory fields to a base class when it is created.Extracting the fields availabe in the classExtracting the Class Description from the FListgetLabel()
Extracting Label for the class from the FListgetName()
Extracting Class Name from the FListExtracting the Purge Property Spec info for a class from the FListExtracting Read Access info for the class from the FListExtracting Sequence Start Number from the FListExtracting the Storage Spec info for a class from the FListgetTable()
Extracting the Table Name represting this class from the FListExtracting Write Access info for the class from the FListstatic boolean
isASystemManagedFld
(DDClassField classFieldObj) Varifies whether the passed in DDClassField is to be managed by systemboolean
Determine if this is a child of a classstatic boolean
isThisAMandatoryField
(DDClassField classFieldObj) Varifies whether the passed in DDClassField is a mandatory field for thisDDClass
classprotected void
setMandatoryFieldsForBaseClass
(FList classArray) Creates an FList with Mandatory Fields (PIN_FLD_ACCOUNT_OBJ, PIN_FLD_CREATED_T PIN_FLD_MOD_T, PIN_FLD_POID, PIN_FLD_READ_ACCESS, PIN_FLD_WRITE_ACCESS) for the base class are included.void
updateFList
(DDClassField fieldObject, boolean objIsFromDDField) void
updateFList
(DDClassField parentObj, DDClassField childObj, boolean objIsFromDDField) void
updateFList
(Hashtable hashtable, boolean isSubClass) Methods inherited from class com.portal.pfc.infranet.datadict.DDBase
compareTo, createFList, getAuditable, getColumn, getCreatePermission, getEncryptable, getFList, getIcon, getLength, getModifyPermission, getNumber, getOrder, getTypeIndex, getTypeString, isNew, isOpenedForModifications, setFieldProperties, setFList, setIsNew, setIsOpenedForModifications, toString
-
Field Details
-
EVENT_STR
- See Also:
-
EVENT_SUBCLASS_STR
- See Also:
-
FLD_PURGE_NON_PURGABLE
- See Also:
-
FLD_PURGE_PURGABLE
- See Also:
-
-
Constructor Details
-
DDClass
public DDClass(DataDictionary dictionary, String name, String label, String desc) throws EBufException This constructor is used to create a new Subclass- Throws:
EBufException
-
DDClass
public DDClass(DataDictionary dictionary, String name, String label, String desc, String table, String seqStart, String storageSpec) throws EBufException This constructor is used to create a new Base class IMPORTANT: For base storable classes (not subclasses), Sequence Start Number field This is useful for creating objects with known POIDs. By default, this field is set to 1. If the value of this field is 0 then, when creating objects of this type (or subtypes), the POID_ID will not be automatically generated by the DM. It has to be supplied by the caller, using the PCM_OPFLG_USE_POID_GIVEN opflag along with the PCM_OP_CREATE_OBJ op. If the value of this field is nonzero, then the DM will prevent the caller of PCM_OP_CREATE_OBJ from specifying a POID_ID less than this value when using the PCM_OPFLG_USE_POID_GIVEN opflag. However, when PCM_OPFLG_USE_POID_GIVEN is not specified, the DM just picks the next available sequence number.- Throws:
EBufException
-
DDClass
The input flist should have the following format0 PIN_FLD_OBJ_DESC ARRAY [1] allocated 9, used 9 1 PIN_FLD_OBJ_ELEM ARRAY [0] allocated 9, used 9 2 PIN_FLD_DESCR STR [0] "" 2 PIN_FLD_MOD_PERMISSION STR [0] "Writeable" 2 PIN_FLD_CREATE_PERMISSION STR [0] "Required" 2 PIN_FLD_ORDER DECIMAL [0] 0 2 PIN_FLD_SM_ITEM_NAME STR [0] "account_obj" 2 PIN_FLD_AUDITABLE INT [0] 0 2 PIN_FLD_FIELD_NAME STR [0] "PIN_FLD_ACCOUNT_OBJ" 2 PIN_FLD_LABEL STR [0] "" 2 PIN_FLD_FIELD_NUM ENUM [0] 40 1 PIN_FLD_OBJ_ELEM ARRAY [1] allocated 9, used 9 2 PIN_FLD_DESCR STR [0] "" 2 PIN_FLD_MOD_PERMISSION STR [0] "System" 2 PIN_FLD_CREATE_PERMISSION STR [0] "System" 2 PIN_FLD_ORDER DECIMAL [0] 0 2 PIN_FLD_SM_ITEM_NAME STR [0] "created_t" 2 PIN_FLD_AUDITABLE INT [0] 0 2 PIN_FLD_FIELD_NAME STR [0] "PIN_FLD_CREATED_T" 2 PIN_FLD_LABEL STR [0] "" 2 PIN_FLD_FIELD_NUM ENUM [0] 19 1 PIN_FLD_OBJ_ELEM ARRAY [2] allocated 9, used 9 2 PIN_FLD_DESCR STR [0] "" 2 PIN_FLD_MOD_PERMISSION STR [0] "System" 2 PIN_FLD_CREATE_PERMISSION STR [0] "System" 2 PIN_FLD_ORDER DECIMAL [0] 0 2 PIN_FLD_SM_ITEM_NAME STR [0] "mod_t" 2 PIN_FLD_AUDITABLE INT [0] 0 2 PIN_FLD_FIELD_NAME STR [0] "PIN_FLD_MOD_T" 2 PIN_FLD_LABEL STR [0] "" 2 PIN_FLD_FIELD_NUM ENUM [0] 20 1 PIN_FLD_OBJ_ELEM ARRAY [3] allocated 9, used 9 2 PIN_FLD_DESCR STR [0] "" 2 PIN_FLD_MOD_PERMISSION STR [0] "System" 2 PIN_FLD_CREATE_PERMISSION STR [0] "System" 2 PIN_FLD_ORDER DECIMAL [0] 0 2 PIN_FLD_SM_ITEM_NAME STR [0] "poid" 2 PIN_FLD_AUDITABLE INT [0] 0 2 PIN_FLD_FIELD_NAME STR [0] "PIN_FLD_POID" 2 PIN_FLD_LABEL STR [0] "" 2 PIN_FLD_FIELD_NUM ENUM [0] 16 1 PIN_FLD_OBJ_ELEM ARRAY [4] allocated 11, used 11 2 PIN_FLD_DESCR STR [0] "" 2 PIN_FLD_MOD_PERMISSION STR [0] "Writeable" 2 PIN_FLD_CREATE_PERMISSION STR [0] "System" 2 PIN_FLD_ORDER DECIMAL [0] 0 2 PIN_FLD_SM_ITEM_NAME STR [0] "read_access" 2 PIN_FLD_ENCRYPTABLE INT [0] 0 2 PIN_FLD_AUDITABLE INT [0] 0 2 PIN_FLD_FIELD_NAME STR [0] "PIN_FLD_READ_ACCESS" 2 PIN_FLD_LABEL STR [0] "" 2 PIN_FLD_LENGTH INT [0] 60 2 PIN_FLD_FIELD_NUM ENUM [0] 1903 1 PIN_FLD_OBJ_ELEM ARRAY [5] allocated 11, used 11 2 PIN_FLD_DESCR STR [0] "" 2 PIN_FLD_MOD_PERMISSION STR [0] "Writeable" 2 PIN_FLD_CREATE_PERMISSION STR [0] "System" 2 PIN_FLD_ORDER DECIMAL [0] 0 2 PIN_FLD_SM_ITEM_NAME STR [0] "write_access" 2 PIN_FLD_ENCRYPTABLE INT [0] 0 2 PIN_FLD_AUDITABLE INT [0] 0 2 PIN_FLD_FIELD_NAME STR [0] "PIN_FLD_WRITE_ACCESS" 2 PIN_FLD_LABEL STR [0] "" 2 PIN_FLD_LENGTH INT [0] 60 2 PIN_FLD_FIELD_NUM ENUM [0] 1904 1 PIN_FLD_DESCR STR [0] "" 1 PIN_FLD_SM_INFO STR [0] "" 1 PIN_FLD_SM_ITEM_NAME STR [0] "NewClass_t" 1 PIN_FLD_SEQ_START INT [0] 1 1 PIN_FLD_NAME STR [0] "/NewClass" 1 PIN_FLD_LABEL STR [0] "new class" 1 PIN_FLD_WRITE_ACCESS STR [0] "Self" 1 PIN_FLD_READ_ACCESS STR [0] "Self" 0 PIN_FLD_POID POID [0] 0.0.0.1 /dd/objects -1 0
- Throws:
EBufException
-
DDClass
This constructor is used when the class info is read from a file.- Parameters:
list
- The flist containg the object specifcation. Please refer to DDClass(DataDictionary dictionary, FList flist) for the format of the input flist.- Throws:
EBufException
-
-
Method Details
-
isASystemManagedFld
Varifies whether the passed in DDClassField is to be managed by system- Parameters:
classFieldObj
- Object ofDDClassField
which is to be varified whether it is to be managed by system- Returns:
- Returns
true
if the passed in object ofDDClassField
is to be managed by system;false
otherwise - Throws:
EBufException
- JAVAPCM API's EBufException is thrown
-
isThisAMandatoryField
Varifies whether the passed in DDClassField is a mandatory field for thisDDClass
class- Parameters:
classFieldObj
- Object ofDDClassField
which is to be varified whether it is a mandatory field for this class- Returns:
- Returns
true
if the passed in object ofDDClassField
is a mandatory field for this class;flase
otherwise - Throws:
EBufException
- JAVAPCM API's EBufException is thrown
-
clone
This method returns a copy of the object.- Overrides:
clone
in classObject
- Returns:
- Null if the deep cloning of flist is not succesful.
- Throws:
CloneNotSupportedException
-
getDescription
Extracting the Class Description from the FList- Overrides:
getDescription
in classDDBase
- Throws:
EBufException
-
getName
Extracting Class Name from the FList- Overrides:
getName
in classDDBase
- Throws:
EBufException
-
getPurgeProperty
Extracting the Purge Property Spec info for a class from the FList- Throws:
EBufException
-
getLabel
Extracting Label for the class from the FList- Overrides:
getLabel
in classDDBase
- Throws:
EBufException
-
getTable
Extracting the Table Name represting this class from the FList- Overrides:
getTable
in classDDBase
- Throws:
EBufException
-
getStartSequenceNumber
Extracting Sequence Start Number from the FList- Overrides:
getStartSequenceNumber
in classDDBase
- Throws:
EBufException
-
getReadAccess
Extracting Read Access info for the class from the FList- Overrides:
getReadAccess
in classDDBase
- Throws:
EBufException
-
getWriteAccess
Extracting Write Access info for the class from the FList- Overrides:
getWriteAccess
in classDDBase
- Throws:
EBufException
-
getStorage
Extracting the Storage Spec info for a class from the FList- Overrides:
getStorage
in classDDBase
- Throws:
EBufException
-
isChildOf
Determine if this is a child of a class- Parameters:
classDesc
- TheDDClass
object to be checked for the relationship with the current object.- Returns:
true
if this class is a child of the specified class.false
if this class is not a child of the specified class.- Throws:
EBufException
-
getDDClassFields
Extracting the fields availabe in the class- Throws:
EBufException
-
createClassArray
protected FList createClassArray(String name, String descr, String readAccess, String writeAccess, String label) throws EBufException Creates an FList with Name, Description, Label, Read Access and Write Access information for the given class. This method is used by the Sub-Classes only- Throws:
EBufException
-
createClassArray
protected FList createClassArray(String name, String descr, String table, String readAccess, String writeAccess, String label, Integer seqNum, String tableStorage) throws EBufException Creates an FList with Name, Description, Label, Read Access, Write Access, SQL Table name, Sequence Start Number and Storage Specifications information for the given class. This method is used by the Base Classes only- Throws:
EBufException
-
setMandatoryFieldsForBaseClass
Creates an FList with Mandatory Fields (PIN_FLD_ACCOUNT_OBJ, PIN_FLD_CREATED_T PIN_FLD_MOD_T, PIN_FLD_POID, PIN_FLD_READ_ACCESS, PIN_FLD_WRITE_ACCESS) for the base class are included. This method is used by the Base Classes only- Throws:
EBufException
-
updateFList
- Throws:
EBufException
-
updateFList
public void updateFList(DDClassField parentObj, DDClassField childObj, boolean objIsFromDDField) throws EBufException - Throws:
EBufException
-
updateFList
- Throws:
EBufException
-
createElement
This method is used to set the default properties for the dropped fields.- Throws:
EBufException
-
createElement
protected FList createElement(String name, String type, String createPerm, String modPerm, String table, int fieldID) throws EBufException This method is used by DDClass.java, to add the mandatory fields to a base class when it is created. This method is also over-ridden in DDClass.java to set the default properties for some of the fields that are dragged and dropped.- Throws:
EBufException
-