Package org.ivoa.dm.executionbroker
Class OfferSetResponse
java.lang.Object
org.ivoa.dm.executionbroker.AbstractComponent
org.ivoa.dm.executionbroker.OfferSetResponse
- All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations,org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
@Entity
@VoDml(id="execbroker:OfferSetResponse",
role=objectType)
public class OfferSetResponse
extends AbstractComponent
implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
A set of executions offered in response to a request, including a uuid, href, and an expiry date for the set.
objectType: OfferSetResponse
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder class for OfferSetResponse, mainly for use in the functional builder pattern. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringA human readable description.protected List<AbstractExecutionSession>.protected StringA flag to indicate whether the request can be handled by this service.Fields inherited from class org.ivoa.dm.executionbroker.AbstractComponent
_id, kind, meta -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new OfferSetResponseOfferSetResponse(String result, String description, List<AbstractExecutionSession> offers, String kind, ComponentMetadata meta) full parameter constructor.OfferSetResponse(AbstractComponent superinstance, String result, String description, List<AbstractExecutionSession> offers) Constructor from supertype instance.OfferSetResponse(OfferSetResponse other) Copy Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a org.ivoa.dm.executionbroker.AbstractExecutionSession to the composition.copyMe()make a clone of the object taking into account current polymorhic type.static OfferSetResponsecreate a OfferSetResponse in functional builder style.voiddelete(jakarta.persistence.EntityManager em) voidReturns description Attribute.Returns offers composition as an immutable list.Returns result Attribute.voidRemove a org.ivoa.dm.executionbroker.AbstractExecutionSession from the composition.voidupdate a org.ivoa.dm.executionbroker.AbstractExecutionSession in the composition.voidsetDescription(String pDescription) Set description Attribute.voidsetOffers(List<AbstractExecutionSession> pOffers) Defines whole offers composition.voidSet result Attribute.voidupdateUsing(OfferSetResponse other) Update this object with the content of the given object.withDescription(String pDescription) fluent setter for description Attribute.withResult(String pResult) fluent setter for result Attribute.Methods inherited from class org.ivoa.dm.executionbroker.AbstractComponent
getId, getKind, getMeta, setKind, setMeta, updateUsing, withKind, withMetaMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ivoa.vodml.jpa.JPAManipulationsForObjectType
getId
-
Field Details
-
result
@VoDml(id="execbroker:OfferSetResponse.result", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String resultA flag to indicate whether the request can be handled by this service. If service is able to handle the request, then the `result` will be `YES` and the `offers` block should contain one or more offers. If service is not able to handle the request, the `result` will be `NO` and the `messages` block should contain one or more reasons explaining why. : Attribute result : multiplicity 1 -
description
@VoDml(id="execbroker:OfferSetResponse.description", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String descriptionA human readable description. : Attribute description : multiplicity 1 -
offers
@VoDml(id="execbroker:OfferSetResponse.offers", role=composition, type="execbroker:AbstractExecutionSession", typeRole=objectType) protected List<AbstractExecutionSession> offers. composition offers : ( Multiplicity : 1..* )
-
-
Constructor Details
-
OfferSetResponse
public OfferSetResponse()Creates a new OfferSetResponse -
OfferSetResponse
public OfferSetResponse(String result, String description, List<AbstractExecutionSession> offers, String kind, ComponentMetadata meta) full parameter constructor.- Parameters:
result- A flag to indicate whether the request can be handled by this service. If service is able to handle the request, then the `result` will be `YES` and the `offers` block should contain one or more offers. If service is not able to handle the request, the `result` will be `NO` and the `messages` block should contain one or more reasons explaining why.description- A human readable description.offers- .kind- The component type identifier.meta- The component metadata.
-
OfferSetResponse
Copy Constructor. Note that references will remain as is rather than be copied.- Parameters:
other- the object to be copied.
-
OfferSetResponse
public OfferSetResponse(AbstractComponent superinstance, String result, String description, List<AbstractExecutionSession> offers) Constructor from supertype instance.- Parameters:
superinstance- The supertype.result- A flag to indicate whether the request can be handled by this service. If service is able to handle the request, then the `result` will be `YES` and the `offers` block should contain one or more offers. If service is not able to handle the request, the `result` will be `NO` and the `messages` block should contain one or more reasons explaining why.description- A human readable description.offers- .
-
-
Method Details
-
copyMe
make a clone of the object taking into account current polymorhic type.- Specified by:
copyMein classAbstractComponent- Returns:
- the cloned object.
-
updateUsing
Update this object with the content of the given object. Note that references will remain as is rather than be copied.- Parameters:
other- the object to be copied.
-
getResult
Returns result Attribute.- Returns:
- result Attribute
-
setResult
Set result Attribute.- Parameters:
pResult- value to set
-
withResult
fluent setter for result Attribute.- Parameters:
pResult- value to set- Returns:
- OfferSetResponse
-
getDescription
Returns description Attribute.- Returns:
- description Attribute
-
setDescription
Set description Attribute.- Parameters:
pDescription- value to set
-
withDescription
fluent setter for description Attribute.- Parameters:
pDescription- value to set- Returns:
- OfferSetResponse
-
getOffers
Returns offers composition as an immutable list.- Returns:
- offers composition.
-
setOffers
Defines whole offers composition.- Parameters:
pOffers- composition to set.
-
addToOffers
Add a org.ivoa.dm.executionbroker.AbstractExecutionSession to the composition.- Parameters:
p- org.ivoa.dm.executionbroker.AbstractExecutionSession to add
-
removeFromOffers
Remove a org.ivoa.dm.executionbroker.AbstractExecutionSession from the composition.- Parameters:
p- org.ivoa.dm.executionbroker.AbstractExecutionSession to remove
-
replaceInOffers
update a org.ivoa.dm.executionbroker.AbstractExecutionSession in the composition.- Parameters:
_p- org.ivoa.dm.executionbroker.AbstractExecutionSession to update the match is done via the database key
-
createOfferSetResponse
public static OfferSetResponse createOfferSetResponse(Consumer<OfferSetResponse.OfferSetResponseBuilder> f) create a OfferSetResponse in functional builder style.- Parameters:
f- the functional builder.- Returns:
- an object initialized from the builder.
-
forceLoad
public void forceLoad()- Specified by:
forceLoadin interfaceorg.ivoa.vodml.jpa.JPAManipulations- Overrides:
forceLoadin classAbstractComponent
-
delete
public void delete(jakarta.persistence.EntityManager em) - Specified by:
deletein interfaceorg.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
-