Responsible for creating indices for associations used in queries. An instance may be specific to a particular association of a particular native instance of an entity (the parent of the association).
Type Params | Return Type | Name and description |
---|---|---|
|
void |
index(K primaryKey, java.util.List<T> foreignKeys) Creates an index queryable via the primary key. |
|
void |
index(T primaryKey, K foreignKey) Index a single foreign key |
|
void |
preIndex(K primaryKey, java.util.List<T> foreignKeys) Creates an index queryable via the primary key. |
Methods inherited from class | Name |
---|---|
interface AssociationQueryExecutor |
doesReturnKeys, getIndexedEntity, query |
Creates an index queryable via the primary key. This is called *after* the entity this association indexer is part of has been persisted. Usually, for a particular association type, only this OR preIndex(Object, java.util.List) will be implemented.
primaryKey
- The primary keyforeignKeys
- The foreign keysIndex a single foreign key
primaryKey
- The primaryKeyforeignKey
- The foreignKeyCreates an index queryable via the primary key. This is called *before* the entity that this association indexer is part of is persisted, but after the native entry has been updated ready to be persisted. This allows the index to be placed in the native instance itself, e.g. in a document database. Usually, for a particular association type, only this OR index(Object, java.util.List) will be implemented.
primaryKey
- The primary keyforeignKeys
- The foreign keys