org.apache.ignite.cache.store.cassandra.persistence

## Class PojoFieldAccessor

- java.lang.Object
- - org.apache.ignite.cache.store.cassandra.persistence.PojoFieldAccessor

-     public class PojoFieldAccessor
      extends Object

  Property accessor provides read/write access to POJO object properties defined through: 1) Getter/setter methods 2) Raw class members

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PojoFieldAccessor(Field field)` Constructs object instance from Field, providing direct access to class member.
    `PojoFieldAccessor(PropertyDescriptor desc, Field field)` Constructs object instance from Java Bean property descriptor, providing access to getter/setter.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Annotation` | `getAnnotation(Class clazz)` Returns POJO field annotation.
    `Class` | `getFieldType()` Returns field type.
    `String` | `getName()` Returns POJO field name.
    `Object` | `getValue(Object obj)` Returns field value for the object instance.
    `boolean` | `isReadOnly()` Indicates if it's read-only field.
    `void` | `setValue(Object obj, Object val)` Assigns value for the object field.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PojoFieldAccessor

          public PojoFieldAccessor(PropertyDescriptor desc,
                                   Field field)

      Constructs object instance from Java Bean property descriptor, providing access to getter/setter.
      Parameters:
        `desc` - Java Bean property descriptor.
        `field` - object field associated with property descriptor.

    - #### PojoFieldAccessor

          public PojoFieldAccessor(Field field)

      Constructs object instance from Field, providing direct access to class member.
      Parameters:
        `field` - Field descriptor.

  - ### Method Detail

    - #### getName

          public String getName()

      Returns POJO field name.
      Returns:
        field name.

    - #### isReadOnly

          public boolean isReadOnly()

      Indicates if it's read-only field.
      Returns:
        true if field read-only, false if not.

    - #### getAnnotation

          public Annotation getAnnotation(Class clazz)

      Returns POJO field annotation.
      Parameters:
        `clazz` - Class of the annotation to get.
      Returns:
        annotation.

    - #### getValue

          public Object getValue(Object obj)

      Returns field value for the object instance.
      Parameters:
        `obj` - object instance.
      Returns:
        field value.

    - #### setValue

          public void setValue(Object obj,
                               Object val)

      Assigns value for the object field.
      Parameters:
        `obj` - object instance.
        `val` - value to assign.

    - #### getFieldType

          public Class getFieldType()

      Returns field type.
      Returns:
        field type.

2022 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.13.0
Release Date | : April 20 2022