org.ogf.graap.wsag.server.persistence.impl
Class DatabasePersistentAgreementFactory

java.lang.Object
  extended by org.ogf.graap.wsag.server.persistence.impl.AbstractPersistentAgreementFactory
      extended by org.ogf.graap.wsag.server.persistence.impl.DatabasePersistentAgreementFactory
All Implemented Interfaces:
AgreementFactory, IAgreementHome, PersistentAgreementFactory

public class DatabasePersistentAgreementFactory
extends AbstractPersistentAgreementFactory

Author:
owaeld

Field Summary
 
Fields inherited from class org.ogf.graap.wsag.server.persistence.impl.AbstractPersistentAgreementFactory
factory, resourceId
 
Constructor Summary
DatabasePersistentAgreementFactory(AgreementFactory factory)
          Creates a new DatabasePersistentAgreementFactory using the given agreement factory as delegation target for calls to the AgreementFactory interface.
 
Method Summary
 PersistentAgreement[] doLoad()
          Loads all agreements that were created by this factory.
 void doRemove(PersistentAgreement toRemove)
          Removes an agreement from the persistence layer
 PersistentAgreement persistAgreement(Agreement agreement)
          Persists the given agreement instance.
 
Methods inherited from class org.ogf.graap.wsag.server.persistence.impl.AbstractPersistentAgreementFactory
addAgreement, createAgreement, find, getAgreementFactory, getResourceId, getTemplates, initiateNegotiation, list, list, load, remove, save, setResourceId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabasePersistentAgreementFactory

public DatabasePersistentAgreementFactory(AgreementFactory factory)
Creates a new DatabasePersistentAgreementFactory using the given agreement factory as delegation target for calls to the AgreementFactory interface.

Parameters:
factory - the agreement factory
Method Detail

persistAgreement

public PersistentAgreement persistAgreement(Agreement agreement)
                                     throws PersistedResourceException
Description copied from class: AbstractPersistentAgreementFactory
Persists the given agreement instance.

Specified by:
persistAgreement in class AbstractPersistentAgreementFactory
Parameters:
agreement - the agreement to persist
Returns:
the persisted agreement
Throws:
PersistedResourceException - indicates that an error occurred while persisting the agreement

doLoad

public PersistentAgreement[] doLoad()
                             throws PersistedResourceException
Loads all agreements that were created by this factory.

Specified by:
doLoad in class AbstractPersistentAgreementFactory
Returns:
the loaded agreements
Throws:
PersistedResourceException - indicates an error while loading the agreements from the persistence layer
See Also:
PersistentAgreementFactory.load()

doRemove

public void doRemove(PersistentAgreement toRemove)
              throws PersistedResourceException
Removes an agreement from the persistence layer

Specified by:
doRemove in class AbstractPersistentAgreementFactory
Parameters:
toRemove - the agreement to remove
Throws:
PersistedResourceException - indicates that the agreement could not be removed from the persistence layer
See Also:
IAgreementHome.remove(java.lang.String)


Copyright © 2008-2012 Fraunhofer Institute SCAI. All Rights Reserved.