Class OfferedCycles

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

@Entity @VoDml(id="proposalManagement:OfferedCycles", role=objectType) public class OfferedCycles extends Object implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
. objectType: OfferedCycles
  • Field Details

    • _id

      protected Long _id
      inserted database key
    • cycles

      @VoDml(id="proposalManagement:OfferedCycles.cycles", role=composition, type="proposalManagement:ProposalCycle", typeRole=objectType) protected List<ProposalCycle> cycles
      . composition cycles : ( Multiplicity : 1..* )
  • Constructor Details

    • OfferedCycles

      public OfferedCycles()
      Creates a new OfferedCycles
    • OfferedCycles

      public OfferedCycles(List<ProposalCycle> cycles)
      full parameter constructor.
      Parameters:
      cycles - .
    • OfferedCycles

      public OfferedCycles(OfferedCycles 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(OfferedCycles 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.
    • getCycles

      public List<ProposalCycle> getCycles()
      Returns cycles composition as an immutable list.
      Returns:
      cycles composition
    • setCycles

      public void setCycles(List<ProposalCycle> pCycles)
      Defines whole cycles composition.
      Parameters:
      pCycles - composition to set
    • addToCycles

      public void addToCycles(ProposalCycle p)
      Add a org.ivoa.dm.proposal.management.ProposalCycle to the composition.
      Parameters:
      p - org.ivoa.dm.proposal.management.ProposalCycle to add
    • removeFromCycles

      public void removeFromCycles(ProposalCycle p)
      Remove a org.ivoa.dm.proposal.management.ProposalCycle from the composition.
      Parameters:
      p - org.ivoa.dm.proposal.management.ProposalCycle to remove
    • replaceInCycles

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

      public static OfferedCycles createOfferedCycles(Consumer<OfferedCycles.OfferedCyclesBuilder> f)
      create a OfferedCycles 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
    • jpaClone

      public void jpaClone(jakarta.persistence.EntityManager em)
      Specified by:
      jpaClone in interface org.ivoa.vodml.jpa.JPAManipulations
    • persistRefs

      public void persistRefs(jakarta.persistence.EntityManager _em)
      Specified by:
      persistRefs in interface org.ivoa.vodml.jpa.JPAManipulations