Class AbstractUpdate

java.lang.Object
org.ivoa.dm.executionbroker.AbstractUpdate
All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations, org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
Direct Known Subclasses:
EnumValueUpdate, IntegerDeltaUpdate, IntegerValueUpdate, StringValueUpdate

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

    • _id

      protected Long _id
      inserted database key
    • kind

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

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

    • AbstractUpdate

      public AbstractUpdate()
      Creates a new AbstractUpdate
    • AbstractUpdate

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

      public AbstractUpdate(AbstractUpdate 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 AbstractUpdate copyMe()
      make a clone of the object taking into account current polymorhic type.
      Returns:
      the cloned object.
    • updateUsing

      public void updateUsing(AbstractUpdate 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 AbstractUpdate withKind(String pKind)
      fluent setter for kind Attribute.
      Parameters:
      pKind - value to set
      Returns:
      AbstractUpdate
    • 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 AbstractUpdate withPath(String pPath)
      fluent setter for path Attribute.
      Parameters:
      pPath - value to set
      Returns:
      AbstractUpdate
    • createAbstractUpdate

      public static AbstractUpdate createAbstractUpdate(Consumer<AbstractUpdate.AbstractUpdateBuilder> f)
      create a AbstractUpdate 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>