Class EncodedStringField

  • All Implemented Interfaces:
    java.io.Serializable

    public class EncodedStringField
    extends StringField
    Created by carl.gould on 8/27/2014.
    See Also:
    Serialized Form
    • Constructor Detail

      • EncodedStringField

        public EncodedStringField​(SRecordMeta<?> meta,
                                  java.lang.String columnName,
                                  SFieldFlags... pvals)
      • EncodedStringField

        public EncodedStringField​(SRecordMeta<?> meta,
                                  java.lang.String columnName,
                                  int maxValue,
                                  SFieldFlags... pvals)
    • Method Detail

      • queryFieldValue

        public java.lang.Object queryFieldValue​(java.sql.ResultSet rs,
                                                int sqlIndex)
                                         throws java.lang.Exception
        Description copied from class: SFieldMeta
        Issues a JDBC get*() on the result set for the field and converts the database type to the appropriate internal type, eg, Double for a double field. The first column has sqlIndex==1.
        Overrides:
        queryFieldValue in class SFieldString
        Throws:
        java.lang.Exception
      • writeFieldValue

        public java.lang.Object writeFieldValue​(java.lang.Object value)
        Description copied from class: SFieldMeta
        Converts a single value from internal representation to database representation. Used primarily by the writeFieldValue above, but also used for converting optimistic lock values in SRecordInstance.flush.

        Overidden by SFieldBoolean. (not by SFieldString).

        NOTE: This does NOT need to handle NULL values (those are handled seperately by SRecordInstance)

        Overrides:
        writeFieldValue in class SFieldMeta