Package org.ivoa.dm.proposal.management
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder class for SubmittedProposal, mainly for use in the functional builder pattern. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<ObservationConfiguration>.protected Stringthe observatory's code for the proposal.protected List<ProposalReview>the reviews.protected Datethe date when all the proposals are due.protected Datethe date that the proposal was submitted.protected Booleanthe proposal can go on to allocation.Fields inherited from class org.ivoa.dm.proposal.prop.AbstractProposal
_id, fields, investigators, kind, observations, relatedProposals, scientificJustification, summary, supportingDocuments, targets, technicalGoals, technicalJustification, title -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new SubmittedProposalSubmittedProposal(String proposalCode, 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.Copy Constructor.SubmittedProposal(AbstractProposal superinstance, String proposalCode, List<ObservationConfiguration> config, Date submissionDate, Boolean successful, Date reviewsCompleteDate, List<ProposalReview> reviews) Constructor from supertype instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a org.ivoa.dm.proposal.management.ObservationConfiguration to the composition.voidAdd a org.ivoa.dm.proposal.management.ProposalReview to the composition.copyMe()make a clone of the object taking into account current polymorhic type.static SubmittedProposalcreate a SubmittedProposal in functional builder style.voiddelete(jakarta.persistence.EntityManager em) voidReturns config composition as an immutable list.Returns proposalCode Attribute.Returns reviews composition as an immutable list.Returns reviewsCompleteDate Attribute.Returns submissionDate Attribute.Returns successful Attribute.voidRemove a org.ivoa.dm.proposal.management.ObservationConfiguration from the composition.voidRemove a org.ivoa.dm.proposal.management.ProposalReview from the composition.voidupdate a org.ivoa.dm.proposal.management.ObservationConfiguration in the composition.voidupdate a org.ivoa.dm.proposal.management.ProposalReview in the composition.voidsetConfig(List<ObservationConfiguration> pConfig) Defines whole config composition.voidsetProposalCode(String pProposalCode) Set proposalCode Attribute.voidsetReviews(List<ProposalReview> pReviews) Defines whole reviews composition.voidsetReviewsCompleteDate(Date pReviewsCompleteDate) Set reviewsCompleteDate Attribute.voidsetSubmissionDate(Date pSubmissionDate) Set submissionDate Attribute.voidsetSuccessful(Boolean pSuccessful) Set successful Attribute.voidupdates any cloned references that are contained within the hierarchy.voidupdateUsing(SubmittedProposal other) Update this object with the content of the given object.withProposalCode(String pProposalCode) fluent setter for proposalCode Attribute.withReviewsCompleteDate(Date pReviewsCompleteDate) fluent setter for reviewsCompleteDate Attribute.withSubmissionDate(Date pSubmissionDate) fluent setter for submissionDate Attribute.withSuccessful(Boolean pSuccessful) fluent setter for successful Attribute.Methods inherited from class org.ivoa.dm.proposal.prop.AbstractProposal
addToFields, addToInvestigators, addToObservations, addToRelatedProposals, addToSupportingDocuments, addToTargets, addToTechnicalGoals, getFields, getId, getInvestigators, getKind, getObservations, getRelatedProposals, getScientificJustification, getSummary, getSupportingDocuments, getTargets, getTechnicalGoals, getTechnicalJustification, getTitle, getXmlId, hasNaturalKey, removeFromFields, removeFromInvestigators, removeFromObservations, removeFromRelatedProposals, removeFromSupportingDocuments, removeFromTargets, removeFromTechnicalGoals, replaceInFields, replaceInInvestigators, replaceInObservations, replaceInRelatedProposals, replaceInSupportingDocuments, replaceInTargets, replaceInTechnicalGoals, setFields, setInvestigators, setKind, setObservations, setRelatedProposals, setScientificJustification, setSummary, setSupportingDocuments, setTargets, setTechnicalGoals, setTechnicalJustification, setTitle, setXmlId, updateUsing, withKind, withScientificJustification, withSummary, withTechnicalJustification, withTitleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ivoa.vodml.jpa.JPAManipulationsForObjectType
getIdMethods inherited from interface org.ivoa.vodml.jaxb.XmlIdManagement
getXmlId, hasNaturalKey, setXmlId
-
Field Details
-
proposalCode
@VoDml(id="proposalManagement:SubmittedProposal.proposalCode", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String proposalCodethe observatory's code for the proposal. : Attribute proposalCode : multiplicity 1 -
config
@VoDml(id="proposalManagement:SubmittedProposal.config", role=composition, type="proposalManagement:ObservationConfiguration", typeRole=objectType) protected List<ObservationConfiguration> config. composition config : ( Multiplicity : 0..* ) -
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 : 0..* )
-
-
Constructor Details
-
SubmittedProposal
public SubmittedProposal()Creates a new SubmittedProposal -
SubmittedProposal
public SubmittedProposal(String proposalCode, 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:
proposalCode- the observatory's code for the proposal.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
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, String proposalCode, List<ObservationConfiguration> config, Date submissionDate, Boolean successful, Date reviewsCompleteDate, List<ProposalReview> reviews) Constructor from supertype instance.- Parameters:
superinstance- The supertype.proposalCode- the observatory's code for the proposal.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
make a clone of the object taking into account current polymorhic type.- Specified by:
copyMein classAbstractProposal- Returns:
- the cloned object.
-
updateClonedReferences
public void updateClonedReferences()updates any cloned references that are contained within the hierarchy.- Overrides:
updateClonedReferencesin classAbstractProposal
-
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.
-
getProposalCode
Returns proposalCode Attribute.- Returns:
- proposalCode Attribute
-
setProposalCode
Set proposalCode Attribute.- Parameters:
pProposalCode- value to set
-
withProposalCode
fluent setter for proposalCode Attribute.- Parameters:
pProposalCode- value to set- Returns:
- SubmittedProposal
-
getConfig
Returns config composition as an immutable list.- Returns:
- config composition.
-
setConfig
Defines whole config composition.- Parameters:
pConfig- composition to set.
-
addToConfig
Add a org.ivoa.dm.proposal.management.ObservationConfiguration to the composition.- Parameters:
p- org.ivoa.dm.proposal.management.ObservationConfiguration to add
-
removeFromConfig
Remove a org.ivoa.dm.proposal.management.ObservationConfiguration from the composition.- Parameters:
p- org.ivoa.dm.proposal.management.ObservationConfiguration to remove
-
replaceInConfig
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
Returns submissionDate Attribute.- Returns:
- submissionDate Attribute
-
setSubmissionDate
Set submissionDate Attribute.- Parameters:
pSubmissionDate- value to set
-
withSubmissionDate
fluent setter for submissionDate Attribute.- Parameters:
pSubmissionDate- value to set- Returns:
- SubmittedProposal
-
getSuccessful
Returns successful Attribute.- Returns:
- successful Attribute
-
setSuccessful
Set successful Attribute.- Parameters:
pSuccessful- value to set
-
withSuccessful
fluent setter for successful Attribute.- Parameters:
pSuccessful- value to set- Returns:
- SubmittedProposal
-
getReviewsCompleteDate
Returns reviewsCompleteDate Attribute.- Returns:
- reviewsCompleteDate Attribute
-
setReviewsCompleteDate
Set reviewsCompleteDate Attribute.- Parameters:
pReviewsCompleteDate- value to set
-
withReviewsCompleteDate
fluent setter for reviewsCompleteDate Attribute.- Parameters:
pReviewsCompleteDate- value to set- Returns:
- SubmittedProposal
-
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:
forceLoadin interfaceorg.ivoa.vodml.jpa.JPAManipulations- Overrides:
forceLoadin classAbstractProposal
-
delete
public void delete(jakarta.persistence.EntityManager em) - Specified by:
deletein interfaceorg.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
-