Class ObjectReader1<T>

All Implemented Interfaces:
ObjectReader<T>

public class ObjectReader1<T> extends ObjectReaderAdapter<T>
  • Field Details

  • Constructor Details

  • Method Details

    • readObject

      public T readObject(JSONReader jsonReader)
      Description copied from interface: ObjectReader
      Reads an object from the specified JSONReader.
      Parameters:
      jsonReader - the JSONReader to use for parsing
      Returns:
      the deserialized object
    • readArrayMappingJSONBObject

      public T readArrayMappingJSONBObject(JSONReader jsonReader, Type fieldType, Object fieldName, long features)
      Description copied from interface: ObjectReader
      Reads an object from JSONB format with array mapping.
      Specified by:
      readArrayMappingJSONBObject in interface ObjectReader<T>
      Overrides:
      readArrayMappingJSONBObject in class ObjectReaderAdapter<T>
      Parameters:
      jsonReader - the JSONReader to use for parsing
      fieldType - the type of the field being read
      fieldName - the name of the field being read
      features - the features to use
      Returns:
      the deserialized object
    • readJSONBObject

      public T readJSONBObject(JSONReader jsonReader, Type fieldType, Object fieldName, long features)
      Description copied from interface: ObjectReader
      Reads an object from JSONB format.
      Specified by:
      readJSONBObject in interface ObjectReader<T>
      Overrides:
      readJSONBObject in class ObjectReaderAdapter<T>
      Parameters:
      jsonReader - the JSONReader to use for parsing
      fieldType - the type of the field being read
      fieldName - the name of the field being read
      features - the features to use
      Returns:
      the deserialized object
    • initDefaultValue

      protected void initDefaultValue(T object)
      Overrides:
      initDefaultValue in class ObjectReaderAdapter<T>
    • readObject

      public T readObject(JSONReader jsonReader, Type fieldType, Object fieldName, long features)
      Description copied from interface: ObjectReader
      Reads an object from the specified JSONReader with the given field type, field name, and features.
      Specified by:
      readObject in interface ObjectReader<T>
      Overrides:
      readObject in class ObjectReaderBean<T>
      Parameters:
      jsonReader - the JSONReader to use for parsing
      fieldType - the type of the field being read
      fieldName - the name of the field being read
      features - the features to use
      Returns:
      the deserialized object
    • getFieldReader

      public FieldReader getFieldReader(long hashCode)
      Description copied from interface: ObjectReader
      Gets the FieldReader for the specified field hash code.
      Specified by:
      getFieldReader in interface ObjectReader<T>
      Overrides:
      getFieldReader in class ObjectReaderAdapter<T>
      Parameters:
      hashCode - the hash code of the field name
      Returns:
      the FieldReader for the field, or null if not found
    • getFieldReaderLCase

      public FieldReader getFieldReaderLCase(long hashCode)
      Description copied from interface: ObjectReader
      Gets the FieldReader for the specified field hash code, using lowercase matching.
      Specified by:
      getFieldReaderLCase in interface ObjectReader<T>
      Overrides:
      getFieldReaderLCase in class ObjectReaderAdapter<T>
      Parameters:
      hashCode - the hash code of the field name (lowercase)
      Returns:
      the FieldReader for the field, or null if not found
    • setFieldValue

      public boolean setFieldValue(Object object, String fieldName, long fieldNameHashCode, int value)
      Description copied from interface: ObjectReader
      Sets the value of a field in the specified object.
      Parameters:
      object - the object in which to set the field value
      fieldName - the name of the field to set
      fieldNameHashCode - the hash code of the field name
      value - the integer value to set
      Returns:
      true if the field was successfully set, false otherwise