public interface IDResolver
All custom implementation classes of this interface should extend the out of box implementation class: IDResolverImpl.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM Copyright notice field.
|
Modifier and Type | Method and Description |
---|---|
boolean |
checkId(java.lang.String tableName,
java.util.List primaryKeyData)
Check to see if the primary key or unique-index key is in the database.
|
boolean |
checkId(java.lang.String tableName,
java.util.List primaryKeyData,
java.lang.String schema)
Check ID for a specific schema to see if the primary key or
unique-index key is in the database.
|
void |
clearAllCache()
Clear cache for all tables.
|
void |
clearAllSecondaryCache()
Clear the secondary cache for all tables.
|
long |
getCacheSize()
Get the max cache size for the IDResolver.
|
com.ibm.commerce.foundation.dataload.idresolve.IDResolverForOneTable |
getIDResolverInUseForCheckId(java.lang.String tableName)
Get the ID resolver in use for checkId.
|
java.util.List<com.ibm.commerce.foundation.dataload.idresolve.IDResolverForOneTable> |
getIDResolversInUseForResolveId(java.lang.String tableName)
Get the ID resolvers in use for resolveId.
|
java.util.SortedSet<java.lang.String> |
getIDResolverTableNames()
Get the ID resolver table names in sorted alphabetic order.
|
IDResolveResponse |
resolveId(IDResolveRequest request)
Resolve ID to check if the unique index data exists in the database.
|
void |
setCacheSize(long size)
Set max cache size for the IDResolver.
|
static final java.lang.String COPYRIGHT
IDResolveResponse resolveId(IDResolveRequest request) throws DataLoadException
request
- an IDResolveRequest object containing the request infoDataLoadException
- the exception is thrown if the ID cannot be resolved
and the generate new key is set to false in the request.boolean checkId(java.lang.String tableName, java.util.List primaryKeyData) throws DataLoadException
tableName
- the table nameprimaryKeyData
- a list of data which forms a primary key or
a list of data which forms a unique-index key.
The size of the list is the same as the number of columns in the primary key or unique-index key.
The order of the list is the same as the primary key defined or unique-index key defined.DataLoadException
- this exception is thrown if there are some errors during
the checking primary key or unique-index key data in the database.boolean checkId(java.lang.String tableName, java.util.List primaryKeyData, java.lang.String schema) throws DataLoadException
tableName
- the table nameprimaryKeyData
- a list of data which forms a primary key or
a list of data which forms a unique-index key.
The size of the list is the same as the number of columns in the primary key or unique-index key.
The order of the list is the same as the primary key or unique-index key defined.schema
- a schema nameDataLoadException
- this exception is thrown if there are some errors during
the checking primary key or unique-index key data in the database.void setCacheSize(long size)
size
- the cache sizelong getCacheSize()
void clearAllCache()
void clearAllSecondaryCache()
java.util.List<com.ibm.commerce.foundation.dataload.idresolve.IDResolverForOneTable> getIDResolversInUseForResolveId(java.lang.String tableName)
tableName
- a table namecom.ibm.commerce.foundation.dataload.idresolve.IDResolverForOneTable getIDResolverInUseForCheckId(java.lang.String tableName) throws DataLoadException
tableName
- a table nameDataLoadException
- this exception is thrown if there are some problems
getting the ID resolver.java.util.SortedSet<java.lang.String> getIDResolverTableNames()