Class DummyDataRecord

    • Constructor Detail

      • DummyDataRecord

        public DummyDataRecord()
      • DummyDataRecord

        public DummyDataRecord​(Field field)
    • Method Detail

      • getId

        public String getId()
        Description copied from interface: DataRecord
        Returns the data record identifier. This id is unique within the RecordSet from witch this data record has been get. This id is null when it has been built from a RecordTemplate but not yet inserted into a RecordSet.
        Specified by:
        getId in interface DataRecord
      • setId

        public void setId​(String externalId)
        Description copied from interface: DataRecord
        Gives an id to the data record. This id must be set before the record is inserted in a RecordSet.
        Specified by:
        setId in interface DataRecord
        Parameters:
        externalId - the identifier to set to this data record.
      • isNew

        public boolean isNew()
        Description copied from interface: DataRecord
        Is this data record a new one?
        Specified by:
        isNew in interface DataRecord
        Returns:
        true if this record has not been inserted in a RecordSet. False otherwise.
      • getField

        public Field getField​(String fieldName)
        Description copied from interface: DataRecord
        Gets the specified named field. If there is several fields with the given name, then only the first one is returned.
        Specified by:
        getField in interface DataRecord
        Parameters:
        fieldName - the name of a field.
        Returns:
        the named field or, in the case there is no such field, either null or an empty field.
      • getField

        public Field getField​(String fieldName,
                              int occurrence)
        Description copied from interface: DataRecord
        Gets the nth occurrence of the specified named field.
        Specified by:
        getField in interface DataRecord
        Parameters:
        fieldName - the name of a field.
        occurrence - the nth occurrence of such a field.
        Returns:
        the named field or, in the case there is no such field, either null or an empty field.
      • getField

        public Field getField​(int fieldIndex)
        Description copied from interface: DataRecord
        Gets the field at the index position in this data record.
        Specified by:
        getField in interface DataRecord
        Parameters:
        fieldIndex - the index of the field in the data record.
        Returns:
        the field or, in the case there is no such field, either null or an empty field.
      • size

        public int size()
        Description copied from interface: DataRecord
        Gets the size of this data record or -1 whether this operation isn't supported.
        Specified by:
        size in interface DataRecord
        Returns:
        the total number of fields making this record, whatever their name. If this method isn't supported, -1 is returned.
      • getFieldNames

        public String[] getFieldNames()
        Description copied from interface: DataRecord
        Gets the name of all the fields set in this data record.
        Specified by:
        getFieldNames in interface DataRecord
        Returns:
        an array with the name of the fields.
      • getLanguage

        public String getLanguage()
        Description copied from interface: DataRecord
        Gets the language in which any text valued some of the fields are.
        Specified by:
        getLanguage in interface DataRecord
        Returns:
        the ISO-631 code of a supported language.
      • setLanguage

        public void setLanguage​(String language)
        Description copied from interface: DataRecord
        Sets the language in which the text fields are valued.
        Specified by:
        setLanguage in interface DataRecord
        Parameters:
        language - the ISO-631 code of a supported language.
      • getValues

        public Map<String,​String> getValues​(String language)
        Description copied from interface: DataRecord
        Gets a dictionary of all field values, each of them mapped to the name of their corresponding field.
        Specified by:
        getValues in interface DataRecord
        Parameters:
        language - the language in which are the valued the text fields.
        Returns:
        a Map of field values mapped to their corresponding field name.
      • getResourceReference

        public ResourceReference getResourceReference()
        Description copied from interface: DataRecord
        Gets the reference to the resource in Silverpeas to which this data record belongs.
        Specified by:
        getResourceReference in interface DataRecord
        Returns:
        a reference to a resource in Silverpeas.