Class AbstractOption

java.lang.Object
org.ivoa.dm.executionbroker.AbstractOption
All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations, org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
Direct Known Subclasses:
EnumValueOption, IntegerDeltaOption, IntegerValueOption, StringValueOption

@Entity @VoDml(id="execbroker:AbstractOption", role=objectType) public class AbstractOption extends Object implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
Abstract base class for describing options. This includes the `type` discriminator and the target `path` to update. objectType: AbstractOption
  • Field Details

    • _id

      protected Long _id
      inserted database key
    • kind

      @VoDml(id="execbroker:AbstractOption.kind", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String kind
      The kind of option. : Attribute kind : multiplicity 1
    • path

      @VoDml(id="execbroker:AbstractOption.path", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String path
      The path this option applies to. : Attribute path : multiplicity 1
  • Constructor Details

    • AbstractOption

      public AbstractOption()
      Creates a new AbstractOption
    • AbstractOption

      public AbstractOption(String kind, String path)
      full parameter constructor.
      Parameters:
      kind - The kind of option.
      path - The path this option applies to.
    • AbstractOption

      public AbstractOption(AbstractOption 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
    • copyMe

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

      public void updateUsing(AbstractOption 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.
    • getKind

      public String getKind()
      Returns kind Attribute.
      Returns:
      kind Attribute
    • setKind

      public void setKind(String pKind)
      Set kind Attribute.
      Parameters:
      pKind - value to set
    • withKind

      public AbstractOption withKind(String pKind)
      fluent setter for kind Attribute.
      Parameters:
      pKind - value to set
      Returns:
      AbstractOption
    • getPath

      public String getPath()
      Returns path Attribute.
      Returns:
      path Attribute
    • setPath

      public void setPath(String pPath)
      Set path Attribute.
      Parameters:
      pPath - value to set
    • withPath

      public AbstractOption withPath(String pPath)
      fluent setter for path Attribute.
      Parameters:
      pPath - value to set
      Returns:
      AbstractOption
    • createAbstractOption

      public static AbstractOption createAbstractOption(Consumer<AbstractOption.AbstractOptionBuilder> f)
      create a AbstractOption 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>