Package org.ivoa.dm.proposal.prop
Class ObservingMode
java.lang.Object
org.ivoa.dm.proposal.prop.ObservingMode
- All Implemented Interfaces:
org.ivoa.vodml.jaxb.XmlIdManagement
,org.ivoa.vodml.jpa.JPAManipulations
,org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
@Entity
@VoDml(id="proposal:ObservingMode",
role=objectType)
public class ObservingMode
extends Object
implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>, org.ivoa.vodml.jaxb.XmlIdManagement
a collection of configs that can be chosen to observe with.
objectType: ObservingMode
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A builder class for ObservingMode, mainly for use in the functional builder pattern. -
Field Summary
Modifier and TypeFieldDescriptionprotected Long
inserted database keyprotected List<ObservingConfiguration>
.protected String
.protected String
. -
Constructor Summary
ConstructorDescriptionCreates a new ObservingModeObservingMode
(String name, String description, List<ObservingConfiguration> configurations) full parameter constructor.ObservingMode
(ObservingMode other) Copy Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a org.ivoa.dm.proposal.prop.ObservingConfiguration to the composition.static ObservingMode
create a ObservingMode in functional builder style.void
Returns configurations composition as an immutable list.Returns description AttributegetId()
getName()
Returns name AttributegetXmlId()
getter for XMLIDboolean
void
jpaClone
(jakarta.persistence.EntityManager em) void
persistRefs
(jakarta.persistence.EntityManager _em) void
Remove a org.ivoa.dm.proposal.prop.ObservingConfiguration from the composition.void
update a org.ivoa.dm.proposal.prop.ObservingConfiguration in the composition.void
setConfigurations
(List<ObservingConfiguration> pConfigurations) Defines whole configurations composition.void
setDescription
(String pDescription) Defines description Attributevoid
Defines name Attributevoid
void
updates any cloned references that are contained within the hierarchy.void
updateUsing
(ObservingMode other) Update this object with the content of the given object.withDescription
(String pDescription)
-
Field Details
-
_id
inserted database key -
name
@VoDml(id="proposal:ObservingMode.name", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String name. : Attribute name : multiplicity 1 -
description
@VoDml(id="proposal:ObservingMode.description", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String description. : Attribute description : multiplicity 1 -
configurations
@VoDml(id="proposal:ObservingMode.configurations", role=composition, type="proposal:ObservingConfiguration", typeRole=objectType) protected List<ObservingConfiguration> configurations. composition configurations : ( Multiplicity : 1..* )
-
-
Constructor Details
-
ObservingMode
public ObservingMode()Creates a new ObservingMode -
ObservingMode
full parameter constructor.- Parameters:
name
- .description
- .configurations
- .
-
ObservingMode
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
-
getXmlId
getter for XMLID- Specified by:
getXmlId
in interfaceorg.ivoa.vodml.jaxb.XmlIdManagement
-
setXmlId
- Specified by:
setXmlId
in interfaceorg.ivoa.vodml.jaxb.XmlIdManagement
-
hasNaturalKey
public boolean hasNaturalKey()- Specified by:
hasNaturalKey
in interfaceorg.ivoa.vodml.jaxb.XmlIdManagement
-
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.
-
getName
Returns name Attribute- Returns:
- name Attribute
-
setName
Defines name Attribute- Parameters:
pName
- value to set
-
withName
-
getDescription
Returns description Attribute- Returns:
- description Attribute
-
setDescription
Defines description Attribute- Parameters:
pDescription
- value to set
-
withDescription
-
getConfigurations
Returns configurations composition as an immutable list.- Returns:
- configurations composition
-
setConfigurations
Defines whole configurations composition.- Parameters:
pConfigurations
- composition to set
-
addToConfigurations
Add a org.ivoa.dm.proposal.prop.ObservingConfiguration to the composition.- Parameters:
p
- org.ivoa.dm.proposal.prop.ObservingConfiguration to add
-
removeFromConfigurations
Remove a org.ivoa.dm.proposal.prop.ObservingConfiguration from the composition.- Parameters:
p
- org.ivoa.dm.proposal.prop.ObservingConfiguration to remove
-
replaceInConfigurations
update a org.ivoa.dm.proposal.prop.ObservingConfiguration in the composition.- Parameters:
_p
- org.ivoa.dm.proposal.prop.ObservingConfiguration to update the match is done via the database key
-
createObservingMode
create a ObservingMode 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
-
jpaClone
public void jpaClone(jakarta.persistence.EntityManager em) - Specified by:
jpaClone
in interfaceorg.ivoa.vodml.jpa.JPAManipulations
-
persistRefs
public void persistRefs(jakarta.persistence.EntityManager _em) - Specified by:
persistRefs
in interfaceorg.ivoa.vodml.jpa.JPAManipulations
-