Class MessageItem

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

@Entity @VoDml(id="execbroker:MessageItem", role=objectType) public class MessageItem extends Object implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
A log message based on the Message Templates standard. https://messagetemplates.org/. objectType: MessageItem
  • Field Details

    • _id

      protected Long _id
      inserted database key
    • kind

      @VoDml(id="execbroker:MessageItem.kind", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String kind
      The message type identifier. Typically a URL pointing to a human readable description of the message. : Attribute kind : multiplicity 1
    • time

      @VoDml(id="execbroker:MessageItem.time", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String time
      The date and time of the message. : Attribute time : multiplicity 1
    • level

      @VoDml(id="execbroker:MessageItem.level", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String level
      The message level. : Attribute level : multiplicity 1
    • template

      @VoDml(id="execbroker:MessageItem.template", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String template
      The message template. : Attribute template : multiplicity 1
    • values

      @VoDml(id="execbroker:MessageItem.values", role=attribute, type="execbroker:NameValueMap", typeRole=dataType) protected NameValueMap values
      A map of name->value properties. : Attribute values : multiplicity 1
    • message

      @VoDml(id="execbroker:MessageItem.message", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String message
      The resulting message. : Attribute message : multiplicity 1
  • Constructor Details

    • MessageItem

      public MessageItem()
      Creates a new MessageItem
    • MessageItem

      public MessageItem(String kind, String time, String level, String template, NameValueMap values, String message)
      full parameter constructor.
      Parameters:
      kind - The message type identifier. Typically a URL pointing to a human readable description of the message.
      time - The date and time of the message.
      level - The message level.
      template - The message template.
      values - A map of name->value properties.
      message - The resulting message.
    • MessageItem

      public MessageItem(MessageItem 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
    • updateUsing

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

      public String getTime()
      Returns time Attribute.
      Returns:
      time Attribute
    • setTime

      public void setTime(String pTime)
      Set time Attribute.
      Parameters:
      pTime - value to set
    • withTime

      public MessageItem withTime(String pTime)
      fluent setter for time Attribute.
      Parameters:
      pTime - value to set
      Returns:
      MessageItem
    • getLevel

      public String getLevel()
      Returns level Attribute.
      Returns:
      level Attribute
    • setLevel

      public void setLevel(String pLevel)
      Set level Attribute.
      Parameters:
      pLevel - value to set
    • withLevel

      public MessageItem withLevel(String pLevel)
      fluent setter for level Attribute.
      Parameters:
      pLevel - value to set
      Returns:
      MessageItem
    • getTemplate

      public String getTemplate()
      Returns template Attribute.
      Returns:
      template Attribute
    • setTemplate

      public void setTemplate(String pTemplate)
      Set template Attribute.
      Parameters:
      pTemplate - value to set
    • withTemplate

      public MessageItem withTemplate(String pTemplate)
      fluent setter for template Attribute.
      Parameters:
      pTemplate - value to set
      Returns:
      MessageItem
    • getValues

      public NameValueMap getValues()
      Returns values Attribute.
      Returns:
      values Attribute
    • setValues

      public void setValues(NameValueMap pValues)
      Set values Attribute.
      Parameters:
      pValues - value to set
    • withValues

      public MessageItem withValues(NameValueMap pValues)
      fluent setter for values Attribute.
      Parameters:
      pValues - value to set
      Returns:
      MessageItem
    • getMessage

      public String getMessage()
      Returns message Attribute.
      Returns:
      message Attribute
    • setMessage

      public void setMessage(String pMessage)
      Set message Attribute.
      Parameters:
      pMessage - value to set
    • withMessage

      public MessageItem withMessage(String pMessage)
      fluent setter for message Attribute.
      Parameters:
      pMessage - value to set
      Returns:
      MessageItem
    • createMessageItem

      public static MessageItem createMessageItem(Consumer<MessageItem.MessageItemBuilder> f)
      create a MessageItem 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>