Interface ChangeSetPersister<K>
- Type Parameters:
K
- entity key
public interface ChangeSetPersister<K>
Interface to be implemented by classes that can synchronize between data stores and ChangeSets.
- Author:
- Rod Johnson
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
Exception thrown in alternate control flow if getPersistentState finds no entity data. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetPersistentId
(ChangeSetBacked entity, ChangeSet cs) Return idvoid
getPersistentState
(Class<? extends ChangeSetBacked> entityClass, K key, ChangeSet changeSet) TODO how to tell when not found?persistState
(ChangeSetBacked entity, ChangeSet cs) Return key
-
Field Details
-
ID_KEY
- See Also:
-
CLASS_KEY
- See Also:
-
-
Method Details
-
getPersistentState
void getPersistentState(Class<? extends ChangeSetBacked> entityClass, K key, ChangeSet changeSet) throws DataAccessException, ChangeSetPersister.NotFoundException TODO how to tell when not found? throw exception? -
getPersistentId
Return id- Parameters:
entity
-cs
-- Returns:
- Throws:
DataAccessException
-
persistState
Return key- Parameters:
entity
-cs
- Key may be null if not persistent- Returns:
- Throws:
DataAccessException
-