|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ogf.graap.wsag.server.api.EngineComponent
org.ogf.graap.wsag.server.persistence.impl.AbstractWSAG4JPersistence
public abstract class AbstractWSAG4JPersistence
Abstract implementation of an agreement factory home. This implementation provides global configuration-related functions as well as it is responsible to find and load the agreement factory prototype (based on the configuration).
All implementations of the IAgreementFactoryHome interface should extend this abstract
implementation.
| Constructor Summary | |
|---|---|
AbstractWSAG4JPersistence()
|
|
| Method Summary | |
|---|---|
protected void |
doInitialize()
|
protected abstract PersistentAgreementFactory[] |
doLoad()
Loads the agreement factories for this persistence layer. |
protected abstract boolean |
doRemove(PersistentAgreementFactory factory)
Removes a persistent factory from the persistence layer. |
PersistentAgreementFactory |
find(String agreementFactoryId)
Lists the agreement for the factory with the given id. |
boolean |
hasChanged()
Indicates that the persistence layer has changed and needs to be re-initialized (see #initialize()). |
PersistentAgreementFactory[] |
list()
Lists all agreement factories. |
void |
remove(String factoryId)
Removes the factory with the given ID. |
void |
setChanged(boolean changed)
Sets the flag to indicate that the persistence layer has changed and needs to be re-initialized (see #initialize()). |
| Methods inherited from class org.ogf.graap.wsag.server.api.EngineComponent |
|---|
getEngine, initialize |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.ogf.graap.wsag.server.persistence.IAgreementFactoryHome |
|---|
saveAgreementFactories |
| Constructor Detail |
|---|
public AbstractWSAG4JPersistence()
| Method Detail |
|---|
protected abstract PersistentAgreementFactory[] doLoad()
throws PersistedResourceException
#initialize()) or during a
find(String), list() or remove(String) operation
PersistedResourceException - indicates an error while loading the persistent factories
protected abstract boolean doRemove(PersistentAgreementFactory factory)
throws PersistedResourceException
factory - the factory to remove
true if the factory was removed, otherwise false
PersistedResourceException - indicates an error while removing the factorypublic boolean hasChanged()
#initialize()).
true if the persistence layer needs to be reloaded, otherwise false.public void setChanged(boolean changed)
#initialize()).
changed - true if the persistence layer needs to be reloaded, otherwise
false
protected void doInitialize()
throws Exception
doInitialize in class EngineComponentException
public PersistentAgreementFactory find(String agreementFactoryId)
throws Exception
find in interface IAgreementFactoryHomeagreementFactoryId - the id of the factory for which the agreements are listed
Exception - indicates an error while looking up the factory at the persistence layer
public PersistentAgreementFactory[] list()
throws Exception
list in interface IAgreementFactoryHomeException - indicates an exception while loading the factories from the database
public void remove(String factoryId)
throws Exception
remove in interface IAgreementFactoryHomefactoryId - ID of the factory to remove.
Exception - indicates an exception while removing the factory from the database
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||