Class AllocatedProposal

java.lang.Object
org.ivoa.dm.proposal.management.AllocatedProposal
All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations, org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>

@Entity @VoDml(id="proposalManagement:AllocatedProposal", role=objectType) public class AllocatedProposal extends Object implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
an instance of a proposal that is allocated observing time. objectType: AllocatedProposal
  • Field Details

    • _id

      protected Long _id
      inserted database key
    • allocation

      @VoDml(id="proposalManagement:AllocatedProposal.allocation", role=composition, type="proposalManagement:AllocatedBlock", typeRole=objectType) protected List<AllocatedBlock> allocation
      what is allocated to the proposal. composition allocation : ( Multiplicity : 1..* )
    • submitted

      @VoDml(id="proposalManagement:AllocatedProposal.submitted", role=reference, type="proposalManagement:SubmittedProposal", typeRole=objectType) protected SubmittedProposal submitted
      ReferenceObject submitted : the proposal. ( Multiplicity : 1 )
  • Constructor Details

    • AllocatedProposal

      public AllocatedProposal()
      Creates a new AllocatedProposal
    • AllocatedProposal

      public AllocatedProposal(SubmittedProposal submitted, List<AllocatedBlock> allocation)
      full parameter constructor.
      Parameters:
      submitted - the proposal.
      allocation - what is allocated to the proposal.
    • AllocatedProposal

      public AllocatedProposal(AllocatedProposal other)
      Copy Constructor. Note that references will remain as is rather than be copied.
      Parameters:
      other - the object to be copied.
  • Method Details

    • getId

      public Long getId()
      Specified by:
      getId in interface org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
      Returns:
      the id
    • updateClonedReferences

      public void updateClonedReferences()
      updates any cloned references that are contained within the hierarchy.
    • updateUsing

      public void updateUsing(AllocatedProposal 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.
    • getSubmitted

      public SubmittedProposal getSubmitted()
      Returns submitted Reference
      Returns:
      submitted Reference
    • setSubmitted

      public void setSubmitted(SubmittedProposal pSubmitted)
      Defines submitted Reference
      Parameters:
      pSubmitted - reference to set
    • getAllocation

      public List<AllocatedBlock> getAllocation()
      Returns allocation composition as an immutable list.
      Returns:
      allocation composition.
    • setAllocation

      public void setAllocation(List<AllocatedBlock> pAllocation)
      Defines whole allocation composition.
      Parameters:
      pAllocation - composition to set.
    • addToAllocation

      public void addToAllocation(AllocatedBlock p)
      Add a org.ivoa.dm.proposal.management.AllocatedBlock to the composition.
      Parameters:
      p - org.ivoa.dm.proposal.management.AllocatedBlock to add
    • removeFromAllocation

      public void removeFromAllocation(AllocatedBlock p)
      Remove a org.ivoa.dm.proposal.management.AllocatedBlock from the composition.
      Parameters:
      p - org.ivoa.dm.proposal.management.AllocatedBlock to remove
    • replaceInAllocation

      public void replaceInAllocation(AllocatedBlock _p)
      update a org.ivoa.dm.proposal.management.AllocatedBlock in the composition.
      Parameters:
      _p - org.ivoa.dm.proposal.management.AllocatedBlock to update the match is done via the database key
    • createAllocatedProposal

      public static AllocatedProposal createAllocatedProposal(Consumer<AllocatedProposal.AllocatedProposalBuilder> f)
      create a AllocatedProposal 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
    • persistRefs

      @Deprecated public void persistRefs(jakarta.persistence.EntityManager _em)
      Deprecated.
      generally better to use the model level reference persistence as only this can deal with "contained" references properly.
      Specified by:
      persistRefs in interface org.ivoa.vodml.jpa.JPAManipulations