Package org.infinispan.persistence.sql
Class AbstractSchemaJdbcStore.SchemaTableOperations<K,V,C extends org.infinispan.persistence.sql.configuration.AbstractSchemaJdbcConfiguration>
- java.lang.Object
-
- org.infinispan.persistence.jdbc.common.sql.BaseTableOperations<K,V>
-
- org.infinispan.persistence.sql.AbstractSchemaJdbcStore.SchemaTableOperations<K,V,C>
-
- All Implemented Interfaces:
TableOperations<K,V>
- Direct Known Subclasses:
QueriesJdbcStore.QueryTableOperations
,TableJdbcStore.TableTableOperations
- Enclosing class:
- AbstractSchemaJdbcStore<K,V,C extends org.infinispan.persistence.sql.configuration.AbstractSchemaJdbcConfiguration>
protected abstract static class AbstractSchemaJdbcStore.SchemaTableOperations<K,V,C extends org.infinispan.persistence.sql.configuration.AbstractSchemaJdbcConfiguration> extends org.infinispan.persistence.jdbc.common.sql.BaseTableOperations<K,V>
-
-
Constructor Summary
Constructors Constructor Description SchemaTableOperations(AbstractSchemaJdbcStore.ProtoSchemaOptions<K,V,C> schemaOptions, AbstractSchemaJdbcStore.Parameter[] upsertParameters)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected MarshallableEntry<K,V>
entryFromResultSet(ResultSet rs, Object keyIfProvided, boolean fetchValue, Predicate<? super K> keyPredicate)
protected void
prepareKeyStatement(PreparedStatement ps, Object key)
protected void
prepareValueStatement(PreparedStatement ps, int segment, MarshallableEntry<? extends K,? extends V> entry)
protected void
setParameter(PreparedStatement ps, AbstractSchemaJdbcStore.ProtostreamFieldType type, int position, org.infinispan.commons.dataconversion.internal.Json json)
This method assigns a parameter based on the type using the parameter type.protected void
updateJsonWithParameter(ResultSet rs, AbstractSchemaJdbcStore.Parameter parameter, int offset, org.infinispan.commons.dataconversion.internal.Json json)
-
Methods inherited from interface org.infinispan.persistence.jdbc.common.TableOperations
publishKeys
-
-
-
-
Constructor Detail
-
SchemaTableOperations
public SchemaTableOperations(AbstractSchemaJdbcStore.ProtoSchemaOptions<K,V,C> schemaOptions, AbstractSchemaJdbcStore.Parameter[] upsertParameters)
-
-
Method Detail
-
setParameter
protected void setParameter(PreparedStatement ps, AbstractSchemaJdbcStore.ProtostreamFieldType type, int position, org.infinispan.commons.dataconversion.internal.Json json) throws SQLException
This method assigns a parameter based on the type using the parameter type. Normally this code would live in the enum, but some implementations may require a different assignment based on the database and thus this method can be extended to change that behavior.- Parameters:
ps
-type
-position
-json
-- Throws:
SQLException
-
updateJsonWithParameter
protected void updateJsonWithParameter(ResultSet rs, AbstractSchemaJdbcStore.Parameter parameter, int offset, org.infinispan.commons.dataconversion.internal.Json json) throws SQLException
- Throws:
SQLException
-
entryFromResultSet
protected MarshallableEntry<K,V> entryFromResultSet(ResultSet rs, Object keyIfProvided, boolean fetchValue, Predicate<? super K> keyPredicate) throws SQLException
- Throws:
SQLException
-
prepareKeyStatement
protected void prepareKeyStatement(PreparedStatement ps, Object key) throws SQLException
- Throws:
SQLException
-
prepareValueStatement
protected void prepareValueStatement(PreparedStatement ps, int segment, MarshallableEntry<? extends K,? extends V> entry) throws SQLException
- Throws:
SQLException
-
-