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

public class DDClass extends DDBase implements Cloneable
This class contains all the info regarding the storable class.
  • Field Details

  • 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

      public DDClass(DataDictionary dictionary, FList flist) throws EBufException
      The input flist should have the following format
       0 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

      public DDClass(FList list, boolean isNewObject) throws EBufException
      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

      public static boolean isASystemManagedFld(DDClassField classFieldObj) throws EBufException
      Varifies whether the passed in DDClassField is to be managed by system
      Parameters:
      classFieldObj - Object of DDClassField which is to be varified whether it is to be managed by system
      Returns:
      Returns true if the passed in object of DDClassField is to be managed by system; false otherwise
      Throws:
      EBufException - JAVAPCM API's EBufException is thrown
    • isThisAMandatoryField

      public static boolean isThisAMandatoryField(DDClassField classFieldObj) throws EBufException
      Varifies whether the passed in DDClassField is a mandatory field for this DDClass class
      Parameters:
      classFieldObj - Object of DDClassField which is to be varified whether it is a mandatory field for this class
      Returns:
      Returns true if the passed in object of DDClassField is a mandatory field for this class; flase otherwise
      Throws:
      EBufException - JAVAPCM API's EBufException is thrown
    • clone

      public Object clone() throws CloneNotSupportedException
      This method returns a copy of the object.
      Overrides:
      clone in class Object
      Returns:
      Null if the deep cloning of flist is not succesful.
      Throws:
      CloneNotSupportedException
    • getDescription

      public String getDescription() throws EBufException
      Extracting the Class Description from the FList
      Overrides:
      getDescription in class DDBase
      Throws:
      EBufException
    • getName

      public String getName() throws EBufException
      Extracting Class Name from the FList
      Overrides:
      getName in class DDBase
      Throws:
      EBufException
    • getPurgeProperty

      public String getPurgeProperty() throws EBufException
      Extracting the Purge Property Spec info for a class from the FList
      Throws:
      EBufException
    • getLabel

      public String getLabel() throws EBufException
      Extracting Label for the class from the FList
      Overrides:
      getLabel in class DDBase
      Throws:
      EBufException
    • getTable

      public String getTable() throws EBufException
      Extracting the Table Name represting this class from the FList
      Overrides:
      getTable in class DDBase
      Throws:
      EBufException
    • getStartSequenceNumber

      public String getStartSequenceNumber() throws EBufException
      Extracting Sequence Start Number from the FList
      Overrides:
      getStartSequenceNumber in class DDBase
      Throws:
      EBufException
    • getReadAccess

      public String getReadAccess() throws EBufException
      Extracting Read Access info for the class from the FList
      Overrides:
      getReadAccess in class DDBase
      Throws:
      EBufException
    • getWriteAccess

      public String getWriteAccess() throws EBufException
      Extracting Write Access info for the class from the FList
      Overrides:
      getWriteAccess in class DDBase
      Throws:
      EBufException
    • getStorage

      public String getStorage() throws EBufException
      Extracting the Storage Spec info for a class from the FList
      Overrides:
      getStorage in class DDBase
      Throws:
      EBufException
    • isChildOf

      public boolean isChildOf(DDClass classDesc) throws EBufException
      Determine if this is a child of a class
      Parameters:
      classDesc - The DDClass 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

      public Vector getDDClassFields() throws EBufException
      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

      protected void setMandatoryFieldsForBaseClass(FList classArray) throws EBufException
      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

      public void updateFList(DDClassField fieldObject, boolean objIsFromDDField) throws EBufException
      Throws:
      EBufException
    • updateFList

      public void updateFList(DDClassField parentObj, DDClassField childObj, boolean objIsFromDDField) throws EBufException
      Throws:
      EBufException
    • updateFList

      public void updateFList(Hashtable hashtable, boolean isSubClass) throws EBufException
      Throws:
      EBufException
    • createElement

      protected FList createElement(DDClassField classFieldObj) throws EBufException
      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