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
  • Field Details

    • _id

      protected Long _id
      inserted database key
    • param

      @VoDml(id="pdl:ParameterOrGroup.param", role=reference, type="pdl:ParameterDefinition", typeRole=objectType) protected ParameterDefinition param
      ReferenceObject param : . ( Multiplicity : 0..1 )
    • group

      @VoDml(id="pdl:ParameterOrGroup.group", role=reference, type="pdl:ParameterGroup", typeRole=objectType) protected ParameterGroup group
      ReferenceObject group : . ( Multiplicity : 0..1 )
    • required

      @VoDml(id="pdl:ParameterOrGroup.required", role=attribute, type="ivoa:boolean", typeRole=primitiveType) protected Boolean required
      Whether 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 minItems
      Minimum 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 maxItems
      Maximum 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

      public ParameterOrGroup(ParameterOrGroup other)
      Copy Constructor. Note that references will remain as is rather than be copied.
      Parameters:
      other - the object to be copied.
  • Method Details

    • getId

      public Long getId()
      Specified by:
      getId in interface org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
      Returns:
      the id
    • updateClonedReferences

      public void updateClonedReferences()
      updates any cloned references that are contained within the hierarchy.
    • updateUsing

      public void updateUsing(ParameterOrGroup other)
      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

      public ParameterDefinition getParam()
      Returns param Reference
      Returns:
      param Reference
    • setParam

      public void setParam(ParameterDefinition pParam)
      Defines param Reference
      Parameters:
      pParam - reference to set
    • getGroup

      public ParameterGroup getGroup()
      Returns group Reference
      Returns:
      group Reference
    • setGroup

      public void setGroup(ParameterGroup pGroup)
      Defines group Reference
      Parameters:
      pGroup - reference to set
    • getRequired

      public Boolean getRequired()
      Returns required Attribute.
      Returns:
      required Attribute
    • setRequired

      public void setRequired(Boolean pRequired)
      Set required Attribute.
      Parameters:
      pRequired - value to set
    • withRequired

      public ParameterOrGroup withRequired(Boolean pRequired)
      fluent setter for required Attribute.
      Parameters:
      pRequired - value to set
      Returns:
      ParameterOrGroup
    • getMinItems

      public Integer getMinItems()
      Returns minItems Attribute.
      Returns:
      minItems Attribute
    • setMinItems

      public void setMinItems(Integer pMinItems)
      Set minItems Attribute.
      Parameters:
      pMinItems - value to set
    • withMinItems

      public ParameterOrGroup withMinItems(Integer pMinItems)
      fluent setter for minItems Attribute.
      Parameters:
      pMinItems - value to set
      Returns:
      ParameterOrGroup
    • getMaxItems

      public Integer getMaxItems()
      Returns maxItems Attribute.
      Returns:
      maxItems Attribute
    • setMaxItems

      public void setMaxItems(Integer pMaxItems)
      Set maxItems Attribute.
      Parameters:
      pMaxItems - value to set
    • withMaxItems

      public ParameterOrGroup withMaxItems(Integer pMaxItems)
      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:
      forceLoad in interface org.ivoa.vodml.jpa.JPAManipulations
    • delete

      public void delete(jakarta.persistence.EntityManager em)
      Specified by:
      delete in interface org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>