Package org.ivoa.dm.proposal.management
Class SubmittedProposal
java.lang.Object
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 Object
implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>, org.ivoa.vodml.jaxb.XmlIdManagement
an instance of a proposal that has been submitted.
objectType: SubmittedProposal
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A builder class for SubmittedProposal, mainly for use in the functional builder pattern. -
Field Summary
Modifier and TypeFieldDescriptionprotected Long
inserted database keyprotected ObservingProposal
ReferenceObject proposal : the proposal that was submitted.protected List<ProposalReview>
the reviews.protected Date
the date when all the proposals are due.protected Date
the date that the proposal was submitted.protected Boolean
the proposal can go on to allocation. -
Constructor Summary
ConstructorDescriptionCreates a new SubmittedProposalCopy Constructor.SubmittedProposal
(ObservingProposal proposal, Date submissionDate, Boolean successful, Date reviewsCompleteDate, List<ProposalReview> reviews) full parameter constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a org.ivoa.dm.proposal.management.ProposalReview to the composition.static SubmittedProposal
create a SubmittedProposal in functional builder style.void
getId()
Returns proposal ReferenceReturns reviews composition as an immutable list.Returns reviewsCompleteDate AttributeReturns submissionDate AttributeReturns successful AttributegetXmlId()
getter for XMLIDboolean
void
jpaClone
(jakarta.persistence.EntityManager em) void
persistRefs
(jakarta.persistence.EntityManager _em) void
Remove a org.ivoa.dm.proposal.management.ProposalReview from the composition.void
update a org.ivoa.dm.proposal.management.ProposalReview in the composition.void
setProposal
(ObservingProposal pProposal) Defines proposal Referencevoid
setReviews
(List<ProposalReview> pReviews) Defines whole reviews composition.void
setReviewsCompleteDate
(Date pReviewsCompleteDate) Defines reviewsCompleteDate Attributevoid
setSubmissionDate
(Date pSubmissionDate) Defines submissionDate Attributevoid
setSuccessful
(Boolean pSuccessful) Defines successful Attributevoid
void
updateUsing
(SubmittedProposal other) Update this object with the content of the given object.withReviewsCompleteDate
(Date pReviewsCompleteDate) withSubmissionDate
(Date pSubmissionDate) withSuccessful
(Boolean pSuccessful)
-
Field Details
-
_id
inserted database key -
submissionDate
@VoDml(id="proposalManagement:SubmittedProposal.submissionDate", role=attribute, type="ivoa:datetime", typeRole=primitiveType) protected Date submissionDatethe 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 successfulthe 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 reviewsCompleteDatethe date when all the proposals are due. : Attribute reviewsCompleteDate : multiplicity 1 -
reviews
@VoDml(id="proposalManagement:SubmittedProposal.reviews", role=composition, type="proposalManagement:ProposalReview", typeRole=objectType) protected List<ProposalReview> reviewsthe reviews. composition reviews : ( Multiplicity : 1..* ) -
proposal
@VoDml(id="proposalManagement:SubmittedProposal.proposal", role=reference, type="proposal:ObservingProposal", typeRole=objectType) protected ObservingProposal proposalReferenceObject proposal : the proposal that was submitted. ( Multiplicity : 1 )
-
-
Constructor Details
-
SubmittedProposal
public SubmittedProposal()Creates a new SubmittedProposal -
SubmittedProposal
public SubmittedProposal(ObservingProposal proposal, Date submissionDate, Boolean successful, Date reviewsCompleteDate, List<ProposalReview> reviews) full parameter constructor.- Parameters:
proposal
- the proposal that was submitted.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.
-
SubmittedProposal
Copy Constructor. Note that references will remain as is rather than be copied.- Parameters:
other
- the object to be copied.
-
-
Method Details
-
getId
- Specified by:
getId
in interfaceorg.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
- Returns:
- the id
-
getXmlId
getter for XMLID- Specified by:
getXmlId
in interfaceorg.ivoa.vodml.jaxb.XmlIdManagement
-
setXmlId
- Specified by:
setXmlId
in interfaceorg.ivoa.vodml.jaxb.XmlIdManagement
-
hasNaturalKey
public boolean hasNaturalKey()- Specified by:
hasNaturalKey
in interfaceorg.ivoa.vodml.jaxb.XmlIdManagement
-
updateUsing
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.
-
getProposal
Returns proposal Reference- Returns:
- proposal Reference
-
setProposal
Defines proposal Reference- Parameters:
pProposal
- reference to set
-
getSubmissionDate
Returns submissionDate Attribute- Returns:
- submissionDate Attribute
-
setSubmissionDate
Defines submissionDate Attribute- Parameters:
pSubmissionDate
- value to set
-
withSubmissionDate
-
getSuccessful
Returns successful Attribute- Returns:
- successful Attribute
-
setSuccessful
Defines successful Attribute- Parameters:
pSuccessful
- value to set
-
withSuccessful
-
getReviewsCompleteDate
Returns reviewsCompleteDate Attribute- Returns:
- reviewsCompleteDate Attribute
-
setReviewsCompleteDate
Defines reviewsCompleteDate Attribute- Parameters:
pReviewsCompleteDate
- value to set
-
withReviewsCompleteDate
-
getReviews
Returns reviews composition as an immutable list.- Returns:
- reviews composition
-
setReviews
Defines whole reviews composition.- Parameters:
pReviews
- composition to set
-
addToReviews
Add a org.ivoa.dm.proposal.management.ProposalReview to the composition.- Parameters:
p
- org.ivoa.dm.proposal.management.ProposalReview to add
-
removeFromReviews
Remove a org.ivoa.dm.proposal.management.ProposalReview from the composition.- Parameters:
p
- org.ivoa.dm.proposal.management.ProposalReview to remove
-
replaceInReviews
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 interfaceorg.ivoa.vodml.jpa.JPAManipulations
-
jpaClone
public void jpaClone(jakarta.persistence.EntityManager em) - Specified by:
jpaClone
in interfaceorg.ivoa.vodml.jpa.JPAManipulations
-
persistRefs
public void persistRefs(jakarta.persistence.EntityManager _em) - Specified by:
persistRefs
in interfaceorg.ivoa.vodml.jpa.JPAManipulations
-