Interface RecordTemplate

    • Method Detail

      • getFieldNames

        String[] getFieldNames()
        Gets all the field names of the DataRecords built on this template.
        Returns:
        an array with the name of the fields defined by this template.
      • getFieldTemplate

        FieldTemplate getFieldTemplate​(String fieldName)
                                throws FormException
        Gets the FieldTemplate modelling the specified named field.
        Parameters:
        fieldName - the name of a field
        Returns:
        a FieldTemplate instance or null if there is no such template.
        Throws:
        FormException - if the template of the specified named field cannot be got.
        API Note:
        the FormException can be thrown if the template of the named field cannot be found instead of returning null. It depends of the implementation of the concrete class.
      • getFieldIndex

        int getFieldIndex​(String fieldName)
                   throws FormException
        Gets the index in this template of of the named field.
        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.
        API Note:
        the FormException can be thrown if the template of the named field cannot be found instead of returning -1. It depends of the implementation of the concrete class.
      • checkDataRecord

        boolean checkDataRecord​(DataRecord record)
        Checks the specified DataRecord instance matches this template.
        Parameters:
        record - a DataRecord object.
        Returns:
        true if the data record is built on this template and all the constraints are satisfied.