org.apache.ignite.cache.store.cassandra.common

## Class PropertyMappingHelper

- java.lang.Object
- - org.apache.ignite.cache.store.cassandra.common.PropertyMappingHelper

-     public class PropertyMappingHelper
      extends Object

  Helper class providing bunch of methods to discover fields of POJO objects and map builtin Java types to appropriate Cassandra types.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PropertyMappingHelper()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Object` | `getCassandraColumnValue(com.datastax.driver.core.Row row, String col, Class clazz, Serializer serializer)` Returns value of specific column in the row returned by CQL statement.
    `static com.datastax.driver.core.DataType.Name` | `getCassandraType(Class clazz)` Maps Cassandra type to specified Java type.
    `static PojoFieldAccessor` | `getPojoFieldAccessor(Class clazz, String prop)` Returns property accessor by class property name.

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

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

- - ### Constructor Detail

    - #### PropertyMappingHelper

          public PropertyMappingHelper()

  - ### Method Detail

    - #### getCassandraType

          public static com.datastax.driver.core.DataType.Name getCassandraType(Class clazz)

      Maps Cassandra type to specified Java type.
      Parameters:
        `clazz` - java class.
      Returns:
        Cassandra type.

    - #### getPojoFieldAccessor

          public static PojoFieldAccessor getPojoFieldAccessor(Class clazz,
                                                               String prop)

      Returns property accessor by class property name.
      Parameters:
        `clazz` - class from which to get property accessor.
        `prop` - name of the property.
      Returns:
        property accessor.

    - #### getCassandraColumnValue

          public static Object getCassandraColumnValue(com.datastax.driver.core.Row row,
                                                       String col,
                                                       Class clazz,
                                                       Serializer serializer)

      Returns value of specific column in the row returned by CQL statement.
      Parameters:
        `row` - row returned by CQL statement.
        `col` - column name.
        `clazz` - java class to which column value should be casted.
        `serializer` - serializer to use if column stores BLOB otherwise could be null.
      Returns:
        row column value.

2022 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.12.0
Release Date | : January 10 2022