public interface SQLRecordTransformer<K,V>
To specify an entry transformer for a given Infinispan cache that is
backed by an SQL store, provide its class name to the
store configuration.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
SQLRecordTransformer.InitParameters
SQL transformer initialisation parameters.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getCreateTableStatement()
Returns the SQL statement to create a table for the entries.
|
String |
getTableName()
Returns the associated SQL table name.
|
void |
init(SQLRecordTransformer.InitParameters initParams)
Initialises the SQL transformer.
|
Collection<org.jooq.Condition> |
resolveSelectionConditions(K key)
Resolves the SQL selection conditions for the specified Infinispan
entry key.
|
com.nimbusds.infinispan.persistence.common.InfinispanEntry<K,V> |
toInfinispanEntry(org.jooq.Record sqlRecord)
Transforms the specified SQL record to an Infinispan entry (key /
value / metadata triple).
|
SQLRecord |
toSQLRecord(com.nimbusds.infinispan.persistence.common.InfinispanEntry<K,V> infinispanEntry)
Transforms the specified Infinispan entry (key / value pair with
optional metadata) to an SQL record ready to be written.
|
void init(SQLRecordTransformer.InitParameters initParams)
initParams - The initialisation parameters.String getCreateTableStatement()
configured database.String getTableName()
Collection<org.jooq.Condition> resolveSelectionConditions(K key)
key - The Infinispan entry key. Not null.SQLRecord toSQLRecord(com.nimbusds.infinispan.persistence.common.InfinispanEntry<K,V> infinispanEntry)
Example:
uid=cae7t,
givenName=Alice, surname=Adams and
email=alice@wonderland.net.
Resulting SQL record:
uid: cae7t (key) surname: Adams given_name: Alice email: alice@wonderland.net
infinispanEntry - The Infinispan entry. Not null.com.nimbusds.infinispan.persistence.common.InfinispanEntry<K,V> toInfinispanEntry(org.jooq.Record sqlRecord)
Example:
SQL record:
uid: cae7t surname: Adams given_name: Alice email: alice@wonderland.net
Resulting key / value pair:
uid=cae7t,
givenName=Alice, surname=Adams and
email=alice@wonderland.net.
sqlRecord - The SQL record. Must not be null.Copyright © 2016 Connect2id Ltd.. All Rights Reserved.