Package org.ivoa.dm.proposal.prop
Class RelatedProposal
java.lang.Object
org.ivoa.dm.proposal.prop.RelatedProposal
- All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations
,org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
@Entity
@VoDml(id="proposal:RelatedProposal",
role=objectType)
public class RelatedProposal
extends Object
implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
a related proposal.
objectType: RelatedProposal
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A builder class for RelatedProposal, mainly for use in the functional builder pattern. -
Field Summary
Modifier and TypeFieldDescriptionprotected Long
inserted database keyprotected ObservingProposal
ReferenceObject proposal : the related proposal. -
Constructor Summary
ConstructorDescriptionCreates a new RelatedProposalRelatedProposal
(ObservingProposal proposal) full parameter constructor.RelatedProposal
(RelatedProposal other) Copy Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic RelatedProposal
create a RelatedProposal in functional builder style.void
getId()
Returns proposal Referencevoid
persistRefs
(jakarta.persistence.EntityManager _em) Deprecated.generally better to use the model level reference persistence as only this can deal with "contained" references properly.void
setProposal
(ObservingProposal pProposal) Defines proposal Referencevoid
updateUsing
(RelatedProposal other) Update this object with the content of the given object.
-
Field Details
-
_id
inserted database key -
proposal
@VoDml(id="proposal:RelatedProposal.proposal", role=reference, type="proposal:ObservingProposal", typeRole=objectType) protected ObservingProposal proposalReferenceObject proposal : the related proposal. ( Multiplicity : 1 )
-
-
Constructor Details
-
RelatedProposal
public RelatedProposal()Creates a new RelatedProposal -
RelatedProposal
full parameter constructor.- Parameters:
proposal
- the related proposal.
-
RelatedProposal
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
-
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
-
createRelatedProposal
public static RelatedProposal createRelatedProposal(Consumer<RelatedProposal.RelatedProposalBuilder> f) create a RelatedProposal 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
-
persistRefs
Deprecated.generally better to use the model level reference persistence as only this can deal with "contained" references properly.- Specified by:
persistRefs
in interfaceorg.ivoa.vodml.jpa.JPAManipulations
-