Package org.ivoa.dm.proposal.prop
Class Justification
java.lang.Object
org.ivoa.dm.proposal.prop.Justification
- All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations
,org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
@Entity
@VoDml(id="proposal:Justification",
role=objectType)
public class Justification
extends Object
implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
The justification for the proposal. Note that the justification is for reading by humans
and is not parsed to extract things like source lists - that sort of information
must be entered in the correct place in the model.
objectType: Justification
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A builder class for Justification, mainly for use in the functional builder pattern. -
Field Summary
-
Constructor Summary
ConstructorDescriptionCreates a new JustificationJustification
(String text, TextFormats format) full parameter constructor.Justification
(Justification other) Copy Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic Justification
create a Justification in functional builder style.void
Returns format Attribute.getId()
getText()
Returns text Attribute.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.void
setFormat
(TextFormats pFormat) Set format Attribute.void
Set text Attribute.void
updateUsing
(Justification other) Update this object with the content of the given object.withFormat
(TextFormats pFormat) fluent setter for format Attribute.fluent setter for text Attribute.
-
Field Details
-
_id
inserted database key -
text
@VoDml(id="proposal:Justification.text", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String textthe full text of the justification. : Attribute text : multiplicity 1 -
format
@VoDml(id="proposal:Justification.format", role=attribute, type="proposal:TextFormats", typeRole=enumeration) protected TextFormats formatthe format of the text. : Attribute format : multiplicity 1
-
-
Constructor Details
-
Justification
public Justification()Creates a new Justification -
Justification
full parameter constructor.- Parameters:
text
- the full text of the justification.format
- the format of the text.
-
Justification
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.
-
getText
Returns text Attribute.- Returns:
- text Attribute
-
setText
Set text Attribute.- Parameters:
pText
- value to set
-
withText
fluent setter for text Attribute.- Parameters:
pText
- value to set- Returns:
- Justification
-
getFormat
Returns format Attribute.- Returns:
- format Attribute
-
setFormat
Set format Attribute.- Parameters:
pFormat
- value to set
-
withFormat
fluent setter for format Attribute.- Parameters:
pFormat
- value to set- Returns:
- Justification
-
createJustification
create a Justification 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
-