public class IDResolverImpl extends java.lang.Object implements IDResolver
Constructor and Description |
---|
IDResolverImpl()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
checkId(java.lang.String tableName,
java.util.List primaryKeyData)
Check to see if the primary 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 is in the database
|
void |
clearAllCache()
Clear cache for all tables.
|
void |
clearAllSecondaryCache()
Clear 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)
This method obtains the data from IDResolveRequest, processes it and then creates
an IDResolveResponse object and returns it.
|
void |
setCacheSize(long size)
Set the max total map size allowed.
|
public java.util.List<com.ibm.commerce.foundation.dataload.idresolve.IDResolverForOneTable> getIDResolversInUseForResolveId(java.lang.String tableName)
getIDResolversInUseForResolveId
in interface IDResolver
tableName
- a table namepublic com.ibm.commerce.foundation.dataload.idresolve.IDResolverForOneTable getIDResolverInUseForCheckId(java.lang.String tableName) throws DataLoadException
getIDResolverInUseForCheckId
in interface IDResolver
tableName
- a table nameDataLoadException
- this exception is thrown if there are some problems
getting the ID resolver.public java.util.SortedSet<java.lang.String> getIDResolverTableNames()
getIDResolverTableNames
in interface IDResolver
public boolean checkId(java.lang.String tableName, java.util.List primaryKeyData) throws DataLoadException
checkId
in interface IDResolver
tableName
- the table nameprimaryKeyData
- a list of data which forms a primary key.
The size of the list is the same as the number of columns in the
primary key. The order of the list is the same as the primary key
defined.DataLoadException
- this exception is thrown if there are some errors during
the checking primary key data in the database.public boolean checkId(java.lang.String tableName, java.util.List primaryKeyData, java.lang.String schema) throws DataLoadException
checkId
in interface IDResolver
tableName
- the table nameprimaryKeyData
- a list of data which forms a primary key.
The size of the list is the same as the number of columns in the primary key.
The order of the list is the same as the primary key defined.schema
- a schema nameDataLoadException
- this exception is thrown if there are some errors during
the checking primary key data in the database.public void setCacheSize(long size)
setCacheSize
in interface IDResolver
size
- a long numberpublic long getCacheSize()
getCacheSize
in interface IDResolver
public void clearAllCache()
clearAllCache
in interface IDResolver
public void clearAllSecondaryCache()
clearAllSecondaryCache
in interface IDResolver
public IDResolveResponse resolveId(IDResolveRequest request) throws DataLoadException
resolveId
in interface IDResolver
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.