Package org.infinispan.persistence.sql
Class AbstractSchemaJdbcStore.SchemaTableOperations<K,V,C extends 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 AbstractSchemaJdbcConfiguration>
protected abstract static class AbstractSchemaJdbcStore.SchemaTableOperations<K,V,C extends AbstractSchemaJdbcConfiguration> extends BaseTableOperations<K,V>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.infinispan.persistence.jdbc.common.sql.BaseTableOperations
BaseTableOperations.FlowableConnection, BaseTableOperations.ResultSetEntryIterator
-
-
Field Summary
-
Fields inherited from class org.infinispan.persistence.jdbc.common.sql.BaseTableOperations
fetchSize, readQueryTimeout, writeQueryTimeout
-
-
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, 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, Json json, boolean key)
-
Methods inherited from class org.infinispan.persistence.jdbc.common.sql.BaseTableOperations
batchUpdates, deleteAllRows, deleteEntry, getDeleteAllSql, getDeleteRowSql, getSelectAllSql, getSelectRowSql, getSizeSql, getUpsertRowSql, loadEntry, preparePublishStatement, prepareSizeStatement, publishEntries, size, upsertEntry
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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, 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, 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
- Specified by:
entryFromResultSet
in classBaseTableOperations<K,V>
- Throws:
SQLException
-
prepareKeyStatement
protected void prepareKeyStatement(PreparedStatement ps, Object key) throws SQLException
- Specified by:
prepareKeyStatement
in classBaseTableOperations<K,V>
- Throws:
SQLException
-
prepareValueStatement
protected void prepareValueStatement(PreparedStatement ps, int segment, MarshallableEntry<? extends K,? extends V> entry) throws SQLException
- Specified by:
prepareValueStatement
in classBaseTableOperations<K,V>
- Throws:
SQLException
-
-