public abstract class PersisterBase extends java.lang.Object implements OddjobPersister
Modifier | Constructor and Description |
---|---|
|
PersisterBase()
Constructor.
|
protected |
PersisterBase(Path path)
Constructor used for nested persisters.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
clear(Path path)
Remove a possibly previously persisted object.
|
protected abstract java.lang.String[] |
list(Path path) |
protected abstract void |
persist(Path path,
java.lang.String id,
java.lang.Object component)
Provided by subclasses to do the persisting.
|
ComponentPersister |
persisterFor(java.lang.String id)
Provide a ComponentPersiter which may or may not require the id.
|
protected abstract void |
remove(Path path,
java.lang.String id)
Remove a possibly previously persisted object.
|
protected abstract java.lang.Object |
restore(Path path,
java.lang.String id,
java.lang.ClassLoader classLoader)
Restore a previously persisted Component or it's Proxy.
|
void |
setPath(java.lang.String path) |
public PersisterBase()
protected PersisterBase(Path path)
path
- The path.public void setPath(java.lang.String path)
public ComponentPersister persisterFor(java.lang.String id)
OddjobPersister
persisterFor
in interface OddjobPersister
id
- An Id which may be used for a path. May be Null.protected abstract void persist(Path path, java.lang.String id, java.lang.Object component) throws ComponentPersistException
path
- The path as a string. Never null.id
- The id. Never Null.component
- The component or it's proxy.ComponentPersistException
protected abstract java.lang.Object restore(Path path, java.lang.String id, java.lang.ClassLoader classLoader) throws ComponentPersistException
path
- The path. Never Null.id
- The id. Never Null.classLoader
- The classLoader.ComponentPersistException
protected abstract java.lang.String[] list(Path path) throws ComponentPersistException
ComponentPersistException
protected abstract void remove(Path path, java.lang.String id) throws ComponentPersistException
path
- The path.id
- The id.ComponentPersistException
protected abstract void clear(Path path) throws ComponentPersistException
path
- The path.id
- The id.ComponentPersistException