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 org.springframework.dao.DataAccessException, ChangeSetPersister.NotFoundException TODO how to tell when not found? throw exception?- Throws:
org.springframework.dao.DataAccessException
ChangeSetPersister.NotFoundException
-
getPersistentId
K getPersistentId(ChangeSetBacked entity, ChangeSet cs) throws org.springframework.dao.DataAccessException Return id- Parameters:
entity
-cs
-- Returns:
- Throws:
org.springframework.dao.DataAccessException
-
persistState
K persistState(ChangeSetBacked entity, ChangeSet cs) throws org.springframework.dao.DataAccessException Return key- Parameters:
entity
-cs
- Key may be null if not persistent- Returns:
- Throws:
org.springframework.dao.DataAccessException
-