Package org.ivoa.dm.proposal.management
Class AllocatedProposal
java.lang.Object
org.ivoa.dm.proposal.management.AllocatedProposal
- All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations,org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
@Entity
@VoDml(id="proposalManagement:AllocatedProposal",
role=objectType)
public class AllocatedProposal
extends Object
implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
an instance of a proposal that is allocated observing time.
objectType: AllocatedProposal
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder class for AllocatedProposal, mainly for use in the functional builder pattern. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Longinserted database keyprotected List<AllocatedBlock>what is allocated to the proposal.protected SubmittedProposalReferenceObject submitted : the proposal. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new AllocatedProposalCopy Constructor.AllocatedProposal(SubmittedProposal submitted, List<AllocatedBlock> allocation) full parameter constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a org.ivoa.dm.proposal.management.AllocatedBlock to the composition.static AllocatedProposalcreate a AllocatedProposal in functional builder style.voiddelete(jakarta.persistence.EntityManager em) voidReturns allocation composition as an immutable list.getId()Returns submitted ReferencevoidRemove a org.ivoa.dm.proposal.management.AllocatedBlock from the composition.voidupdate a org.ivoa.dm.proposal.management.AllocatedBlock in the composition.voidsetAllocation(List<AllocatedBlock> pAllocation) Defines whole allocation composition.voidsetSubmitted(SubmittedProposal pSubmitted) Defines submitted Referencevoidupdates any cloned references that are contained within the hierarchy.voidupdateUsing(AllocatedProposal other) Update this object with the content of the given object.
-
Field Details
-
_id
inserted database key -
submitted
@VoDml(id="proposalManagement:AllocatedProposal.submitted", role=reference, type="proposalManagement:SubmittedProposal", typeRole=objectType) protected SubmittedProposal submittedReferenceObject submitted : the proposal. ( Multiplicity : 1 ) -
allocation
@VoDml(id="proposalManagement:AllocatedProposal.allocation", role=composition, type="proposalManagement:AllocatedBlock", typeRole=objectType) protected List<AllocatedBlock> allocationwhat is allocated to the proposal. composition allocation : ( Multiplicity : 1..* )
-
-
Constructor Details
-
AllocatedProposal
public AllocatedProposal()Creates a new AllocatedProposal -
AllocatedProposal
full parameter constructor.- Parameters:
submitted- the proposal.allocation- what is allocated to the proposal.
-
AllocatedProposal
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:
getIdin interfaceorg.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>- Returns:
- the id
-
updateClonedReferences
public void updateClonedReferences()updates any cloned references that are contained within the hierarchy. -
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.
-
getSubmitted
Returns submitted Reference- Returns:
- submitted Reference
-
setSubmitted
Defines submitted Reference- Parameters:
pSubmitted- reference to set
-
getAllocation
Returns allocation composition as an immutable list.- Returns:
- allocation composition.
-
setAllocation
Defines whole allocation composition.- Parameters:
pAllocation- composition to set.
-
addToAllocation
Add a org.ivoa.dm.proposal.management.AllocatedBlock to the composition.- Parameters:
p- org.ivoa.dm.proposal.management.AllocatedBlock to add
-
removeFromAllocation
Remove a org.ivoa.dm.proposal.management.AllocatedBlock from the composition.- Parameters:
p- org.ivoa.dm.proposal.management.AllocatedBlock to remove
-
replaceInAllocation
update a org.ivoa.dm.proposal.management.AllocatedBlock in the composition.- Parameters:
_p- org.ivoa.dm.proposal.management.AllocatedBlock to update the match is done via the database key
-
createAllocatedProposal
public static AllocatedProposal createAllocatedProposal(Consumer<AllocatedProposal.AllocatedProposalBuilder> f) create a AllocatedProposal 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
-
delete
public void delete(jakarta.persistence.EntityManager em) - Specified by:
deletein interfaceorg.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
-