org.ogf.graap.wsag.wsrf.persistence
Class AgreementEprContainer

java.lang.Object
  extended by org.ogf.graap.wsag.wsrf.persistence.AgreementEprContainer

@Entity
public class AgreementEprContainer
extends Object

Entity class for the agreement persistence. It is used to build the relationship between an agreement and an EPR. It defines the entity fields (the tables' columns), the named-queries used to access the stored data, and the corresponding getter/setter methods.

Author:
T.Weuffel

Constructor Summary
AgreementEprContainer()
          The default constructor is required by the JPA2 environment.
AgreementEprContainer(String agreementId, EndpointReferenceType epr)
          Used to create an instance of this entity ba hand.
 
Method Summary
static EndpointReferenceType findEPRForAgreement(String agreementId)
          Finds the EPR for the agreement with the given id.
 String getAgreementFactoryId()
           
 String getAgreementId()
           
 EndpointReferenceType getEpr()
          Returns the EPR of the persisted resourse.
 String getEprAddress()
           
 void setAgreementFactoryId(String agreementFactoryId)
           
 void setAgreementId(String agreementId)
           
 void setEpr(EndpointReferenceType epr)
           
 void setEprAddress(String eprAddress)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AgreementEprContainer

public AgreementEprContainer()
The default constructor is required by the JPA2 environment. It is used to instantiate an instance of this entity. All values are then passed to this instance by setter-injection.


AgreementEprContainer

public AgreementEprContainer(String agreementId,
                             EndpointReferenceType epr)
Used to create an instance of this entity ba hand.

Parameters:
agreementId - ID of the agreement.
epr - EPR of the agreement.
Method Detail

getAgreementId

public String getAgreementId()
Returns:
the agreement id

setAgreementId

public void setAgreementId(String agreementId)
Parameters:
agreementId - the agreement id to set

getEpr

public EndpointReferenceType getEpr()
                             throws PersistedResourceException
Returns the EPR of the persisted resourse.

Returns:
the agreement endpoint reference
Throws:
PersistedResourceException - indicates that the persisted EPR could not be de-serialized

setEpr

public void setEpr(EndpointReferenceType epr)
Parameters:
epr - the agreement endpoint reference to set

getAgreementFactoryId

public String getAgreementFactoryId()
Returns:
the agreement factory id

setAgreementFactoryId

public void setAgreementFactoryId(String agreementFactoryId)
Parameters:
agreementFactoryId - the agreement factory id to set

getEprAddress

public String getEprAddress()
Returns:
the address of the EPR

setEprAddress

public void setEprAddress(String eprAddress)
Parameters:
eprAddress - the address of the EPR to set

findEPRForAgreement

public static EndpointReferenceType findEPRForAgreement(String agreementId)
                                                 throws Exception
Finds the EPR for the agreement with the given id.

Parameters:
agreementId - identifies the agreement for which the EPR is resolved
Returns:
the agreement EPR
Throws:
Exception - an exception if the agreement was not found or an other error occurred


Copyright © 2008-2012. All Rights Reserved.