Package org.ivoa.dm.proposal.prop
Class ScienceSpectralWindow
java.lang.Object
org.ivoa.dm.proposal.prop.ScienceSpectralWindow
- All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations
,org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
@Entity
@VoDml(id="proposal:ScienceSpectralWindow",
role=objectType)
public class ScienceSpectralWindow
extends Object
implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
A spectral window for science use.
objectType: ScienceSpectralWindow
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A builder class for ScienceSpectralWindow, mainly for use in the functional builder pattern. -
Field Summary
Modifier and TypeFieldDescriptionprotected Long
inserted database keyprotected List<ExpectedSpectralLine>
.protected SpectralWindowSetup
. -
Constructor Summary
ConstructorDescriptionCreates a new ScienceSpectralWindowCopy Constructor.ScienceSpectralWindow
(SpectralWindowSetup spectralWindowSetup, List<ExpectedSpectralLine> expectedSpectralLine) full parameter constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a org.ivoa.dm.proposal.prop.ExpectedSpectralLine to the composition.static ScienceSpectralWindow
create a ScienceSpectralWindow in functional builder style.void
Returns expectedSpectralLine composition as an immutable list.getId()
Returns spectralWindowSetup 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
Remove a org.ivoa.dm.proposal.prop.ExpectedSpectralLine from the composition.void
update a org.ivoa.dm.proposal.prop.ExpectedSpectralLine in the composition.void
setExpectedSpectralLine
(List<ExpectedSpectralLine> pExpectedSpectralLine) Defines whole expectedSpectralLine composition.void
setSpectralWindowSetup
(SpectralWindowSetup pSpectralWindowSetup) Set spectralWindowSetup Attribute.void
updateUsing
(ScienceSpectralWindow other) Update this object with the content of the given object.withSpectralWindowSetup
(SpectralWindowSetup pSpectralWindowSetup) fluent setter for spectralWindowSetup Attribute.
-
Field Details
-
_id
inserted database key -
spectralWindowSetup
@VoDml(id="proposal:ScienceSpectralWindow.spectralWindowSetup", role=attribute, type="proposal:SpectralWindowSetup", typeRole=dataType) protected SpectralWindowSetup spectralWindowSetup. : Attribute spectralWindowSetup : multiplicity 0..1 -
expectedSpectralLine
@VoDml(id="proposal:ScienceSpectralWindow.expectedSpectralLine", role=composition, type="proposal:ExpectedSpectralLine", typeRole=objectType) protected List<ExpectedSpectralLine> expectedSpectralLine. composition expectedSpectralLine : ( Multiplicity : 0..* )
-
-
Constructor Details
-
ScienceSpectralWindow
public ScienceSpectralWindow()Creates a new ScienceSpectralWindow -
ScienceSpectralWindow
public ScienceSpectralWindow(SpectralWindowSetup spectralWindowSetup, List<ExpectedSpectralLine> expectedSpectralLine) full parameter constructor.- Parameters:
spectralWindowSetup
- .expectedSpectralLine
- .
-
ScienceSpectralWindow
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.
-
getSpectralWindowSetup
Returns spectralWindowSetup Attribute.- Returns:
- spectralWindowSetup Attribute
-
setSpectralWindowSetup
Set spectralWindowSetup Attribute.- Parameters:
pSpectralWindowSetup
- value to set
-
withSpectralWindowSetup
fluent setter for spectralWindowSetup Attribute.- Parameters:
pSpectralWindowSetup
- value to set- Returns:
- ScienceSpectralWindow
-
getExpectedSpectralLine
Returns expectedSpectralLine composition as an immutable list.- Returns:
- expectedSpectralLine composition.
-
setExpectedSpectralLine
Defines whole expectedSpectralLine composition.- Parameters:
pExpectedSpectralLine
- composition to set.
-
addToExpectedSpectralLine
Add a org.ivoa.dm.proposal.prop.ExpectedSpectralLine to the composition.- Parameters:
p
- org.ivoa.dm.proposal.prop.ExpectedSpectralLine to add
-
removeFromExpectedSpectralLine
Remove a org.ivoa.dm.proposal.prop.ExpectedSpectralLine from the composition.- Parameters:
p
- org.ivoa.dm.proposal.prop.ExpectedSpectralLine to remove
-
replaceInExpectedSpectralLine
update a org.ivoa.dm.proposal.prop.ExpectedSpectralLine in the composition.- Parameters:
_p
- org.ivoa.dm.proposal.prop.ExpectedSpectralLine to update the match is done via the database key
-
createScienceSpectralWindow
public static ScienceSpectralWindow createScienceSpectralWindow(Consumer<ScienceSpectralWindow.ScienceSpectralWindowBuilder> f) create a ScienceSpectralWindow 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
-