Package org.ivoa.dm.pdl
Class ParameterOrGroup
java.lang.Object
org.ivoa.dm.pdl.ParameterOrGroup
- All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations,org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
@Entity
@VoDml(id="pdl:ParameterOrGroup",
role=objectType)
public class ParameterOrGroup
extends Object
implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
a 'choice' type .
objectType: ParameterOrGroup
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder class for ParameterOrGroup, mainly for use in the functional builder pattern. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Longinserted database keyprotected ParameterGroupReferenceObject group : .protected IntegerMaximum number of items allowed in the array.protected IntegerMinimum number of items allowed in the array.protected ParameterDefinitionReferenceObject param : .protected BooleanWhether this parameter/group must be provided by clients. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new ParameterOrGroupParameterOrGroup(ParameterDefinition param, ParameterGroup group, Boolean required, Integer minItems, Integer maxItems) full parameter constructor.ParameterOrGroup(ParameterOrGroup other) Copy Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic ParameterOrGroupcreate a ParameterOrGroup in functional builder style.voiddelete(jakarta.persistence.EntityManager em) voidgetGroup()Returns group ReferencegetId()Returns maxItems Attribute.Returns minItems Attribute.getParam()Returns param ReferenceReturns required Attribute.voidsetGroup(ParameterGroup pGroup) Defines group ReferencevoidsetMaxItems(Integer pMaxItems) Set maxItems Attribute.voidsetMinItems(Integer pMinItems) Set minItems Attribute.voidsetParam(ParameterDefinition pParam) Defines param ReferencevoidsetRequired(Boolean pRequired) Set required Attribute.voidupdates any cloned references that are contained within the hierarchy.voidupdateUsing(ParameterOrGroup other) Update this object with the content of the given object.withMaxItems(Integer pMaxItems) fluent setter for maxItems Attribute.withMinItems(Integer pMinItems) fluent setter for minItems Attribute.withRequired(Boolean pRequired) fluent setter for required Attribute.
-
Field Details
-
_id
inserted database key -
param
@VoDml(id="pdl:ParameterOrGroup.param", role=reference, type="pdl:ParameterDefinition", typeRole=objectType) protected ParameterDefinition paramReferenceObject param : . ( Multiplicity : 0..1 ) -
group
@VoDml(id="pdl:ParameterOrGroup.group", role=reference, type="pdl:ParameterGroup", typeRole=objectType) protected ParameterGroup groupReferenceObject group : . ( Multiplicity : 0..1 ) -
required
@VoDml(id="pdl:ParameterOrGroup.required", role=attribute, type="ivoa:boolean", typeRole=primitiveType) protected Boolean requiredWhether this parameter/group must be provided by clients. : Attribute required type ivoa:boolean : multiplicity 0..1 -
minItems
@VoDml(id="pdl:ParameterOrGroup.minItems", role=attribute, type="ivoa:integer", typeRole=primitiveType) protected Integer minItemsMinimum number of items allowed in the array. : Attribute minItems type ivoa:integer : multiplicity 0..1 -
maxItems
@VoDml(id="pdl:ParameterOrGroup.maxItems", role=attribute, type="ivoa:integer", typeRole=primitiveType) protected Integer maxItemsMaximum number of items allowed in the array. : Attribute maxItems type ivoa:integer : multiplicity 0..1
-
-
Constructor Details
-
ParameterOrGroup
public ParameterOrGroup()Creates a new ParameterOrGroup -
ParameterOrGroup
public ParameterOrGroup(ParameterDefinition param, ParameterGroup group, Boolean required, Integer minItems, Integer maxItems) full parameter constructor.- Parameters:
param- .group- .required- Whether this parameter/group must be provided by clients.minItems- Minimum number of items allowed in the array.maxItems- Maximum number of items allowed in the array.
-
ParameterOrGroup
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
-
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.
-
getParam
Returns param Reference- Returns:
- param Reference
-
setParam
Defines param Reference- Parameters:
pParam- reference to set
-
getGroup
Returns group Reference- Returns:
- group Reference
-
setGroup
Defines group Reference- Parameters:
pGroup- reference to set
-
getRequired
Returns required Attribute.- Returns:
- required Attribute
-
setRequired
Set required Attribute.- Parameters:
pRequired- value to set
-
withRequired
fluent setter for required Attribute.- Parameters:
pRequired- value to set- Returns:
- ParameterOrGroup
-
getMinItems
Returns minItems Attribute.- Returns:
- minItems Attribute
-
setMinItems
Set minItems Attribute.- Parameters:
pMinItems- value to set
-
withMinItems
fluent setter for minItems Attribute.- Parameters:
pMinItems- value to set- Returns:
- ParameterOrGroup
-
getMaxItems
Returns maxItems Attribute.- Returns:
- maxItems Attribute
-
setMaxItems
Set maxItems Attribute.- Parameters:
pMaxItems- value to set
-
withMaxItems
fluent setter for maxItems Attribute.- Parameters:
pMaxItems- value to set- Returns:
- ParameterOrGroup
-
createParameterOrGroup
public static ParameterOrGroup createParameterOrGroup(Consumer<ParameterOrGroup.ParameterOrGroupBuilder> f) create a ParameterOrGroup 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>
-