org.springframework.datastore.redis.engine
Class RedisAssociationIndexer

java.lang.Object
  extended by org.springframework.datastore.redis.engine.RedisAssociationIndexer
All Implemented Interfaces:
AssociationIndexer<Long,Long>

public class RedisAssociationIndexer
extends Object
implements AssociationIndexer<Long,Long>

An indexer for Redis

Since:
1.0

Constructor Summary
RedisAssociationIndexer(RedisTemplate template, org.springframework.core.convert.ConversionService typeConverter, Association association)
           
 
Method Summary
 PersistentEntity getIndexedEntity()
           
 void index(Long primaryKey, List<Long> foreignKeys)
          Creates an index queryable via the primary key
 void index(Long primaryKey, Long foreignKey)
          Index a single foreign key
 List<Long> query(Long primaryKey)
          Queries the given primary key and returns the foreign keys
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RedisAssociationIndexer

public RedisAssociationIndexer(RedisTemplate template,
                               org.springframework.core.convert.ConversionService typeConverter,
                               Association association)
Method Detail

index

public void index(Long primaryKey,
                  List<Long> foreignKeys)
Description copied from interface: AssociationIndexer
Creates an index queryable via the primary key

Specified by:
index in interface AssociationIndexer<Long,Long>
Parameters:
primaryKey - The primary key
foreignKeys - The foreign keys

index

public void index(Long primaryKey,
                  Long foreignKey)
Description copied from interface: AssociationIndexer
Index a single foreign key

Specified by:
index in interface AssociationIndexer<Long,Long>
Parameters:
primaryKey - The primaryKey
foreignKey - The foreignKey

query

public List<Long> query(Long primaryKey)
Description copied from interface: AssociationIndexer
Queries the given primary key and returns the foreign keys

Specified by:
query in interface AssociationIndexer<Long,Long>
Parameters:
primaryKey - The primary key
Returns:
The foreign keys

getIndexedEntity

public PersistentEntity getIndexedEntity()
Specified by:
getIndexedEntity in interface AssociationIndexer<Long,Long>