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
  • Field Details

    • result

      @VoDml(id="execbroker:OfferSetResponse.result", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String 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. : Attribute result : multiplicity 1
    • description

      @VoDml(id="execbroker:OfferSetResponse.description", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String description
      A 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

      public OfferSetResponse(OfferSetResponse other)
      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

      public AbstractComponent copyMe()
      make a clone of the object taking into account current polymorhic type.
      Specified by:
      copyMe in class AbstractComponent
      Returns:
      the cloned object.
    • updateUsing

      public void updateUsing(OfferSetResponse other)
      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

      public String getResult()
      Returns result Attribute.
      Returns:
      result Attribute
    • setResult

      public void setResult(String pResult)
      Set result Attribute.
      Parameters:
      pResult - value to set
    • withResult

      public OfferSetResponse withResult(String pResult)
      fluent setter for result Attribute.
      Parameters:
      pResult - value to set
      Returns:
      OfferSetResponse
    • getDescription

      public String getDescription()
      Returns description Attribute.
      Returns:
      description Attribute
    • setDescription

      public void setDescription(String pDescription)
      Set description Attribute.
      Parameters:
      pDescription - value to set
    • withDescription

      public OfferSetResponse withDescription(String pDescription)
      fluent setter for description Attribute.
      Parameters:
      pDescription - value to set
      Returns:
      OfferSetResponse
    • getOffers

      public List<AbstractExecutionSession> getOffers()
      Returns offers composition as an immutable list.
      Returns:
      offers composition.
    • setOffers

      public void setOffers(List<AbstractExecutionSession> pOffers)
      Defines whole offers composition.
      Parameters:
      pOffers - composition to set.
    • addToOffers

      public void addToOffers(AbstractExecutionSession p)
      Add a org.ivoa.dm.executionbroker.AbstractExecutionSession to the composition.
      Parameters:
      p - org.ivoa.dm.executionbroker.AbstractExecutionSession to add
    • removeFromOffers

      public void removeFromOffers(AbstractExecutionSession p)
      Remove a org.ivoa.dm.executionbroker.AbstractExecutionSession from the composition.
      Parameters:
      p - org.ivoa.dm.executionbroker.AbstractExecutionSession to remove
    • replaceInOffers

      public void replaceInOffers(AbstractExecutionSession _p)
      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:
      forceLoad in interface org.ivoa.vodml.jpa.JPAManipulations
      Overrides:
      forceLoad in class AbstractComponent
    • delete

      public void delete(jakarta.persistence.EntityManager em)
      Specified by:
      delete in interface org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>