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
Nested ClassesModifier and TypeInterfaceDescriptionstatic classException thrown in alternate control flow if getPersistentState finds no entity data. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiongetPersistentId(ChangeSetBacked entity, ChangeSet cs) Return idvoidgetPersistentState(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.DataAccessExceptionChangeSetPersister.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
-