Class JdbcTupleCacheStore

java.lang.Object
org.gridgain.cache.store.jdbc.JdbcCacheStore<org.apache.ignite.table.Tuple,org.apache.ignite.table.Tuple>
org.gridgain.cache.store.jdbc.JdbcTupleCacheStore
All Implemented Interfaces:
org.apache.ignite.cache.CacheStore<org.apache.ignite.table.Tuple,org.apache.ignite.table.Tuple>

public class JdbcTupleCacheStore extends JdbcCacheStore<org.apache.ignite.table.Tuple,org.apache.ignite.table.Tuple>
JDBC cache store which is working with tuples.
  • Method Details

    • extractParameter

      @Nullable protected @Nullable Object extractParameter(String typeName, JdbcCacheStore.TypeKind typeKind, String fieldName, Object obj) throws org.apache.ignite.lang.IgniteException
      Description copied from class: JdbcCacheStore
      Get field value from object for use as query parameter.
      Specified by:
      extractParameter in class JdbcCacheStore<org.apache.ignite.table.Tuple,org.apache.ignite.table.Tuple>
      Parameters:
      typeName - Type name.
      typeKind - Type kind.
      fieldName - Field name.
      obj - Cache object.
      Returns:
      Field value from object.
      Throws:
      org.apache.ignite.lang.IgniteException - in case of error.
    • buildObject

      protected <R> R buildObject(String typeName, JdbcCacheStore.TypeKind typeKind, JdbcTypeField[] fields, Map<String,Integer> loadColIndexes, ResultSet rs) throws org.apache.ignite.lang.IgniteException
      Description copied from class: JdbcCacheStore
      Construct object from query result.
      Specified by:
      buildObject in class JdbcCacheStore<org.apache.ignite.table.Tuple,org.apache.ignite.table.Tuple>
      Type Parameters:
      R - Type of result object.
      Parameters:
      typeName - Type name.
      typeKind - Type kind.
      fields - Fields descriptors.
      loadColIndexes - Select query columns index.
      rs - ResultSet.
      Returns:
      Constructed object.
      Throws:
      org.apache.ignite.lang.IgniteException - If failed to construct cache object.
    • prepareBuilders

      protected void prepareBuilders(JdbcType types) throws org.apache.ignite.lang.IgniteException
      Prepare internal store specific builders for provided types metadata.
      Specified by:
      prepareBuilders in class JdbcCacheStore<org.apache.ignite.table.Tuple,org.apache.ignite.table.Tuple>
      Parameters:
      types - The type.
      Throws:
      org.apache.ignite.lang.IgniteException - If failed to prepare internal builders for types.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • kindForName

      protected JdbcCacheStore.TypeKind kindForName(String type)
      Get type kind by name.
      Specified by:
      kindForName in class JdbcCacheStore<org.apache.ignite.table.Tuple,org.apache.ignite.table.Tuple>
      Parameters:
      type - Type name to check.
      Returns:
      True if class not found.