Class IdentifiedRecordTemplate

    • Constructor Detail

      • IdentifiedRecordTemplate

        public IdentifiedRecordTemplate​(RecordTemplate wrappedTemplate)
        A IdentifiedRecordTemplate is built upon a wrapped template.
        Parameters:
        wrappedTemplate - another RecordTemplate instance.
    • Method Detail

      • getFieldNames

        public String[] getFieldNames()
        Description copied from interface: RecordTemplate
        Gets all the field names of the DataRecords built on this template.
        Specified by:
        getFieldNames in interface RecordTemplate
        Returns:
        an array with the name of the fields defined by this template.
      • getFieldIndex

        public int getFieldIndex​(String fieldName)
                          throws FormException
        Description copied from interface: RecordTemplate
        Gets the index in this template of of the named field.
        Specified by:
        getFieldIndex in interface RecordTemplate
        Parameters:
        fieldName - the name of a field.
        Returns:
        the index of the named field in this template or -1 if no template of this field can be found.
        Throws:
        FormException - if the template of the specified named field cannot be got.
      • checkDataRecord

        public boolean checkDataRecord​(DataRecord record)
        Description copied from interface: RecordTemplate
        Checks the specified DataRecord instance matches this template.
        Specified by:
        checkDataRecord in interface RecordTemplate
        Parameters:
        record - a DataRecord object.
        Returns:
        true if the data record is built on this template and all the constraints are satisfied.
      • getExternalId

        public String getExternalId()
        Gets the external template id.
        Returns:
        the external identifier set.
      • setExternalId

        public void setExternalId​(String externalId)
        Gives an external id to the template.
        Parameters:
        externalId - an identifier.
      • getInternalId

        public int getInternalId()
        Gets the internal identifier. It is for internal mechanism.
        Returns:
        an identifier.
      • setInternalId

        public void setInternalId​(int id)
        Sets the internal identifier to this template. It is for internal mechanism.
        Parameters:
        id - an internal identifier.
      • getTemplateName

        public String getTemplateName()
      • setTemplateName

        public void setTemplateName​(String templateName)
      • setEncrypted

        public void setEncrypted​(boolean encrypted)
      • isEncrypted

        public boolean isEncrypted()
      • getInstanceId

        public String getInstanceId()