Class EnumValueOption

java.lang.Object
org.ivoa.dm.executionbroker.AbstractOption
org.ivoa.dm.executionbroker.EnumValueOption
All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations, org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>

@Entity @VoDml(id="execbroker:EnumValueOption", role=objectType) public class EnumValueOption extends AbstractOption implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
A simple enum value option. This option enables the client to set an enum value pointed to by the path. objectType: EnumValueOption
  • Field Details

    • values

      @VoDml(id="execbroker:EnumValueOption.values", role=attribute, type="ivoa:string", typeRole=primitiveType) protected List<String> values
      The list of available options. : Attribute values : multiplicity 1..*
  • Constructor Details

    • EnumValueOption

      public EnumValueOption()
      Creates a new EnumValueOption
    • EnumValueOption

      public EnumValueOption(List<String> values, String kind, String path)
      full parameter constructor.
      Parameters:
      values - The list of available options.
      kind - The kind of option.
      path - The path this option applies to.
    • EnumValueOption

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

      public EnumValueOption(AbstractOption superinstance, List<String> values)
      Constructor from supertype instance.
      Parameters:
      superinstance - The supertype.
      values - The list of available options.
  • Method Details

    • copyMe

      public AbstractOption copyMe()
      make a clone of the object taking into account current polymorhic type.
      Overrides:
      copyMe in class AbstractOption
      Returns:
      the cloned object.
    • updateUsing

      public void updateUsing(EnumValueOption 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.
    • getValues

      public List<String> getValues()
      Returns values Attribute.
      Returns:
      values Attribute
    • setValues

      public void setValues(List<String> pValues)
      Set values Attribute.
      Parameters:
      pValues - value to set
    • withValues

      public EnumValueOption withValues(List<String> pValues)
      fluent setter for values Attribute.
      Parameters:
      pValues - value to set
      Returns:
      EnumValueOption
    • createEnumValueOption

      public static EnumValueOption createEnumValueOption(Consumer<EnumValueOption.EnumValueOptionBuilder> f)
      create a EnumValueOption 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
      Overrides:
      forceLoad in class AbstractOption
    • delete

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