Package org.ivoa.dm.demodm
Class PhotometricSystem
java.lang.Object
org.ivoa.dm.demodm.PhotometricSystem
- All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations,org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
@Entity
@VoDml(id="DemoDM:PhotometricSystem",
role=objectType)
public class PhotometricSystem
extends Object
implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
.
objectType: PhotometricSystem
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder class for PhotometricSystem, mainly for use in the functional builder pattern. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Longinserted database keyprotected StringString representation Photometric system.protected IntegerType of detector (e.g energy or photon counter).protected List<PhotometryFilter>. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new PhotometricSystemPhotometricSystem(String description, Integer detectorType, List<PhotometryFilter> photometryFilter) full parameter constructor.Copy Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a org.ivoa.dm.demodm.PhotometryFilter to the composition.static PhotometricSystemcreate a PhotometricSystem in functional builder style.voiddelete(jakarta.persistence.EntityManager em) voidReturns description Attribute.Returns detectorType Attribute.getId()Returns photometryFilter composition as an immutable list.voidRemove a org.ivoa.dm.demodm.PhotometryFilter from the composition.voidupdate a org.ivoa.dm.demodm.PhotometryFilter in the composition.voidsetDescription(String pDescription) Set description Attribute.voidsetDetectorType(Integer pDetectorType) Set detectorType Attribute.voidsetPhotometryFilter(List<PhotometryFilter> pPhotometryFilter) Defines whole photometryFilter composition.voidupdateUsing(PhotometricSystem other) Update this object with the content of the given object.withDescription(String pDescription) fluent setter for description Attribute.withDetectorType(Integer pDetectorType) fluent setter for detectorType Attribute.
-
Field Details
-
_id
inserted database key -
description
@VoDml(id="DemoDM:PhotometricSystem.description", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String descriptionString representation Photometric system. : Attribute description : multiplicity 0..1 -
detectorType
@VoDml(id="DemoDM:PhotometricSystem.detectorType", role=attribute, type="ivoa:integer", typeRole=primitiveType) protected Integer detectorTypeType of detector (e.g energy or photon counter). : Attribute detectorType : multiplicity 1 -
photometryFilter
@VoDml(id="DemoDM:PhotometricSystem.photometryFilter", role=composition, type="DemoDM:PhotometryFilter", typeRole=objectType) protected List<PhotometryFilter> photometryFilter. composition photometryFilter : ( Multiplicity : 1..* )
-
-
Constructor Details
-
PhotometricSystem
public PhotometricSystem()Creates a new PhotometricSystem -
PhotometricSystem
public PhotometricSystem(String description, Integer detectorType, List<PhotometryFilter> photometryFilter) full parameter constructor.- Parameters:
description- String representation Photometric system.detectorType- Type of detector (e.g energy or photon counter).photometryFilter- .
-
PhotometricSystem
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
-
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.
-
getDescription
Returns description Attribute.- Returns:
- description Attribute
-
setDescription
Set description Attribute.- Parameters:
pDescription- value to set
-
withDescription
fluent setter for description Attribute.- Parameters:
pDescription- value to set- Returns:
- PhotometricSystem
-
getDetectorType
Returns detectorType Attribute.- Returns:
- detectorType Attribute
-
setDetectorType
Set detectorType Attribute.- Parameters:
pDetectorType- value to set
-
withDetectorType
fluent setter for detectorType Attribute.- Parameters:
pDetectorType- value to set- Returns:
- PhotometricSystem
-
getPhotometryFilter
Returns photometryFilter composition as an immutable list.- Returns:
- photometryFilter composition.
-
setPhotometryFilter
Defines whole photometryFilter composition.- Parameters:
pPhotometryFilter- composition to set.
-
addToPhotometryFilter
Add a org.ivoa.dm.demodm.PhotometryFilter to the composition.- Parameters:
p- org.ivoa.dm.demodm.PhotometryFilter to add
-
removeFromPhotometryFilter
Remove a org.ivoa.dm.demodm.PhotometryFilter from the composition.- Parameters:
p- org.ivoa.dm.demodm.PhotometryFilter to remove
-
replaceInPhotometryFilter
update a org.ivoa.dm.demodm.PhotometryFilter in the composition.- Parameters:
_p- org.ivoa.dm.demodm.PhotometryFilter to update the match is done via the database key
-
createPhotometricSystem
public static PhotometricSystem createPhotometricSystem(Consumer<PhotometricSystem.PhotometricSystemBuilder> f) create a PhotometricSystem 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>
-