*/
private void addIndex(final Object connection, final AttributeWrapper wrapper, final String rowKey,
final EntityMetadata metadata)
{
Indexer indexer = indexManager.getIndexer();
if (indexer != null)
{
// Add row key to list(Required for wild search over table).
wrapper.addIndex(
getHashKey(metadata.getTableName(),
((AbstractAttribute) metadata.getIdAttribute()).getJPAColumnName()), getDouble(rowKey));
// Add row-key as inverted index as well needed for multiple clause
// search with key and non row key.
wrapper.addIndex(
getHashKey(metadata.getTableName(),
getHashKey(((AbstractAttribute) metadata.getIdAttribute()).getJPAColumnName(), rowKey)),
getDouble(rowKey));
indexer.index(metadata.getEntityClazz(), metadata, wrapper.getIndexes(), rowKey, null);
}
}