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
ConstructorsConstructorDescriptionSchemaTableOperations
(AbstractSchemaJdbcStore.ProtoSchemaOptions<K, V, C> schemaOptions, AbstractSchemaJdbcStore.Parameter[] upsertParameters) -
Method Summary
Modifier and TypeMethodDescriptionprotected 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, boolean key) Methods inherited from interface org.infinispan.persistence.jdbc.common.TableOperations
publishKeys
-
Constructor Details
-
SchemaTableOperations
public SchemaTableOperations(AbstractSchemaJdbcStore.ProtoSchemaOptions<K, V, C> schemaOptions, AbstractSchemaJdbcStore.Parameter[] upsertParameters)
-
-
Method Details
-
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, boolean key) 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
- Throws:
SQLException
-
prepareValueStatement
protected void prepareValueStatement(PreparedStatement ps, int segment, MarshallableEntry<? extends K, ? extends V> entry) throws SQLException- Throws:
SQLException
-