Class TechnicalGoal

java.lang.Object
org.ivoa.dm.proposal.prop.TechnicalGoal
All Implemented Interfaces:
org.ivoa.vodml.jaxb.XmlIdManagement, org.ivoa.vodml.jpa.JPAManipulations, org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>

@Entity @VoDml(id="proposal:TechnicalGoal", role=objectType) public class TechnicalGoal extends Object implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>, org.ivoa.vodml.jaxb.XmlIdManagement
collects together the technical goals of the proposal. objectType: TechnicalGoal
  • Field Details

    • _id

      protected Long _id
      inserted database key
    • performance

      @VoDml(id="proposal:TechnicalGoal.performance", role=composition, type="proposal:PerformanceParameters", typeRole=objectType) protected PerformanceParameters performance
      . composition performance : ( Multiplicity : 1 )
    • spectrum

      @VoDml(id="proposal:TechnicalGoal.spectrum", role=composition, type="proposal:ScienceSpectralWindow", typeRole=objectType) protected List<ScienceSpectralWindow> spectrum
      . composition spectrum : ( Multiplicity : 1..* )
  • Constructor Details

    • TechnicalGoal

      public TechnicalGoal()
      Creates a new TechnicalGoal
    • TechnicalGoal

      public TechnicalGoal(PerformanceParameters performance, List<ScienceSpectralWindow> spectrum)
      full parameter constructor.
      Parameters:
      performance - .
      spectrum - .
    • TechnicalGoal

      public TechnicalGoal(TechnicalGoal 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
    • getXmlId

      public String getXmlId()
      getter for XMLID
      Specified by:
      getXmlId in interface org.ivoa.vodml.jaxb.XmlIdManagement
    • setXmlId

      public void setXmlId(String id)
      Specified by:
      setXmlId in interface org.ivoa.vodml.jaxb.XmlIdManagement
    • hasNaturalKey

      public boolean hasNaturalKey()
      Specified by:
      hasNaturalKey in interface org.ivoa.vodml.jaxb.XmlIdManagement
    • updateUsing

      public void updateUsing(TechnicalGoal 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.
    • getPerformance

      public PerformanceParameters getPerformance()
      Returns performance Attribute.
      Returns:
      performance Attribute
    • setPerformance

      public void setPerformance(PerformanceParameters pPerformance)
      Set performance Attribute.
      Parameters:
      pPerformance - value to set
    • withPerformance

      public TechnicalGoal withPerformance(PerformanceParameters pPerformance)
      fluent setter for performance Attribute.
      Parameters:
      pPerformance - value to set
      Returns:
      TechnicalGoal
    • getSpectrum

      public List<ScienceSpectralWindow> getSpectrum()
      Returns spectrum composition as an immutable list.
      Returns:
      spectrum composition.
    • setSpectrum

      public void setSpectrum(List<ScienceSpectralWindow> pSpectrum)
      Defines whole spectrum composition.
      Parameters:
      pSpectrum - composition to set.
    • addToSpectrum

      public void addToSpectrum(ScienceSpectralWindow p)
      Add a org.ivoa.dm.proposal.prop.ScienceSpectralWindow to the composition.
      Parameters:
      p - org.ivoa.dm.proposal.prop.ScienceSpectralWindow to add
    • removeFromSpectrum

      public void removeFromSpectrum(ScienceSpectralWindow p)
      Remove a org.ivoa.dm.proposal.prop.ScienceSpectralWindow from the composition.
      Parameters:
      p - org.ivoa.dm.proposal.prop.ScienceSpectralWindow to remove
    • replaceInSpectrum

      public void replaceInSpectrum(ScienceSpectralWindow _p)
      update a org.ivoa.dm.proposal.prop.ScienceSpectralWindow in the composition.
      Parameters:
      _p - org.ivoa.dm.proposal.prop.ScienceSpectralWindow to update the match is done via the database key
    • createTechnicalGoal

      public static TechnicalGoal createTechnicalGoal(Consumer<TechnicalGoal.TechnicalGoalBuilder> f)
      create a TechnicalGoal 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