Class SubmittedProposal

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

@Entity @VoDml(id="proposalManagement:SubmittedProposal", role=objectType) public class SubmittedProposal extends AbstractProposal implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>, org.ivoa.vodml.jaxb.XmlIdManagement
an instance of a proposal that has been submitted. objectType: SubmittedProposal
  • Field Details

    • submissionDate

      @VoDml(id="proposalManagement:SubmittedProposal.submissionDate", role=attribute, type="ivoa:datetime", typeRole=primitiveType) protected Date submissionDate
      the date that the proposal was submitted. : Attribute submissionDate : multiplicity 1
    • successful

      @VoDml(id="proposalManagement:SubmittedProposal.successful", role=attribute, type="ivoa:boolean", typeRole=primitiveType) protected Boolean successful
      the proposal can go on to allocation. : Attribute successful : multiplicity 1
    • reviewsCompleteDate

      @VoDml(id="proposalManagement:SubmittedProposal.reviewsCompleteDate", role=attribute, type="ivoa:datetime", typeRole=primitiveType) protected Date reviewsCompleteDate
      the date when all the proposals are due. : Attribute reviewsCompleteDate : multiplicity 1
    • config

      @VoDml(id="proposalManagement:SubmittedProposal.config", role=composition, type="proposalManagement:ObservationConfiguration", typeRole=objectType) protected List<ObservationConfiguration> config
      . composition config : ( Multiplicity : 0..* )
    • reviews

      @VoDml(id="proposalManagement:SubmittedProposal.reviews", role=composition, type="proposalManagement:ProposalReview", typeRole=objectType) protected List<ProposalReview> reviews
      the reviews. composition reviews : ( Multiplicity : 0..* )
  • Constructor Details

    • SubmittedProposal

      public SubmittedProposal()
      Creates a new SubmittedProposal
    • SubmittedProposal

      public SubmittedProposal(List<ObservationConfiguration> config, Date submissionDate, Boolean successful, Date reviewsCompleteDate, List<ProposalReview> reviews, String title, String summary, Justification scientificJustification, Justification technicalJustification, List<Investigator> investigators, ProposalKind kind, List<RelatedProposal> relatedProposals, List<SupportingDocument> supportingDocuments, List<Target> targets, List<Field> fields, List<TechnicalGoal> technicalGoals, List<Observation> observations)
      full parameter constructor.
      Parameters:
      config - .
      submissionDate - the date that the proposal was submitted.
      successful - the proposal can go on to allocation.
      reviewsCompleteDate - the date when all the proposals are due.
      reviews - the reviews.
      title - the proposal title.
      summary - a short summary/abstract of the proposal.
      scientificJustification - scientific justification.
      technicalJustification - technical justification.
      investigators - the person(s) making the proposal.
      kind - the type of proposal.
      relatedProposals - .
      supportingDocuments - any additional documents.
      targets - the targets of the proposal.
      fields - the fields observed in the proposal.
      technicalGoals - the technical goals of the proposal.
      observations - the proposed observations.
    • SubmittedProposal

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

      public SubmittedProposal(AbstractProposal superinstance, List<ObservationConfiguration> config, Date submissionDate, Boolean successful, Date reviewsCompleteDate, List<ProposalReview> reviews)
      Constructor from supertype instance.
      Parameters:
      superinstance - The supertype.
      config - .
      submissionDate - the date that the proposal was submitted.
      successful - the proposal can go on to allocation.
      reviewsCompleteDate - the date when all the proposals are due.
      reviews - the reviews.
  • Method Details

    • copyMe

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

      public void updateClonedReferences()
      updates any cloned references that are contained within the hierarchy.
      Overrides:
      updateClonedReferences in class AbstractProposal
    • updateUsing

      public void updateUsing(SubmittedProposal 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.
    • getConfig

      public List<ObservationConfiguration> getConfig()
      Returns config composition as an immutable list.
      Returns:
      config composition.
    • setConfig

      public void setConfig(List<ObservationConfiguration> pConfig)
      Defines whole config composition.
      Parameters:
      pConfig - composition to set.
    • addToConfig

      public void addToConfig(ObservationConfiguration p)
      Add a org.ivoa.dm.proposal.management.ObservationConfiguration to the composition.
      Parameters:
      p - org.ivoa.dm.proposal.management.ObservationConfiguration to add
    • removeFromConfig

      public void removeFromConfig(ObservationConfiguration p)
      Remove a org.ivoa.dm.proposal.management.ObservationConfiguration from the composition.
      Parameters:
      p - org.ivoa.dm.proposal.management.ObservationConfiguration to remove
    • replaceInConfig

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

      public Date getSubmissionDate()
      Returns submissionDate Attribute.
      Returns:
      submissionDate Attribute
    • setSubmissionDate

      public void setSubmissionDate(Date pSubmissionDate)
      Set submissionDate Attribute.
      Parameters:
      pSubmissionDate - value to set
    • withSubmissionDate

      public SubmittedProposal withSubmissionDate(Date pSubmissionDate)
      fluent setter for submissionDate Attribute.
      Parameters:
      pSubmissionDate - value to set
      Returns:
      SubmittedProposal
    • getSuccessful

      public Boolean getSuccessful()
      Returns successful Attribute.
      Returns:
      successful Attribute
    • setSuccessful

      public void setSuccessful(Boolean pSuccessful)
      Set successful Attribute.
      Parameters:
      pSuccessful - value to set
    • withSuccessful

      public SubmittedProposal withSuccessful(Boolean pSuccessful)
      fluent setter for successful Attribute.
      Parameters:
      pSuccessful - value to set
      Returns:
      SubmittedProposal
    • getReviewsCompleteDate

      public Date getReviewsCompleteDate()
      Returns reviewsCompleteDate Attribute.
      Returns:
      reviewsCompleteDate Attribute
    • setReviewsCompleteDate

      public void setReviewsCompleteDate(Date pReviewsCompleteDate)
      Set reviewsCompleteDate Attribute.
      Parameters:
      pReviewsCompleteDate - value to set
    • withReviewsCompleteDate

      public SubmittedProposal withReviewsCompleteDate(Date pReviewsCompleteDate)
      fluent setter for reviewsCompleteDate Attribute.
      Parameters:
      pReviewsCompleteDate - value to set
      Returns:
      SubmittedProposal
    • getReviews

      public List<ProposalReview> getReviews()
      Returns reviews composition as an immutable list.
      Returns:
      reviews composition.
    • setReviews

      public void setReviews(List<ProposalReview> pReviews)
      Defines whole reviews composition.
      Parameters:
      pReviews - composition to set.
    • addToReviews

      public void addToReviews(ProposalReview p)
      Add a org.ivoa.dm.proposal.management.ProposalReview to the composition.
      Parameters:
      p - org.ivoa.dm.proposal.management.ProposalReview to add
    • removeFromReviews

      public void removeFromReviews(ProposalReview p)
      Remove a org.ivoa.dm.proposal.management.ProposalReview from the composition.
      Parameters:
      p - org.ivoa.dm.proposal.management.ProposalReview to remove
    • replaceInReviews

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

      public static SubmittedProposal createSubmittedProposal(Consumer<SubmittedProposal.SubmittedProposalBuilder> f)
      create a SubmittedProposal 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 AbstractProposal
    • 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
      Overrides:
      persistRefs in class AbstractProposal
    • delete

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