Interface FieldFormat

    • Method Detail

      • extract

        java.lang.String extract​(UnmarshallingContext context,
                                 boolean reportErrors)
        Extracts the field text from a record. Returns null if the field was not present in the record.

        May return Value.INVALID if the field is invalid, or Value.NIL if the field is explicitly set to nil or null such as in an XML or JSON formatted stream.

        Implementations should also remove any field padding before returning the text.

        Parameters:
        context - the UnmarshallingContext holding the record
        Returns:
        the field text
      • insertField

        void insertField​(MarshallingContext context,
                         java.lang.String text)
        Inserts field text into a record.
        Parameters:
        context - the MarshallingContext holding the record
        text - the field text to insert into the record
      • getSize

        int getSize()
        Returns the size of the field. Fixed length formats should return the field length, while other formats should simply return 1.
        Returns:
        the size of the field
      • isNillable

        boolean isNillable()
        Returns whether this field is nillable.
        Returns:
        true if nillable, false otherwise
      • isLazy

        boolean isLazy()
        TODO rename isLazy to something better?? Returns whether this field is optionally present in the record.
        Returns:
        true if lazy, false otherwise