Package org.ivoa.dm.executionbroker
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder class for MessageItem, mainly for use in the functional builder pattern. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Longinserted database keyprotected StringThe message type identifier.protected StringThe message level.protected StringThe resulting message.protected StringThe message template.protected StringThe date and time of the message.protected NameValueMapA map of name->value properties. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new MessageItemMessageItem(String kind, String time, String level, String template, NameValueMap values, String message) full parameter constructor.MessageItem(MessageItem other) Copy Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic MessageItemcreate a MessageItem in functional builder style.voiddelete(jakarta.persistence.EntityManager em) voidgetId()getKind()Returns kind Attribute.getLevel()Returns level Attribute.Returns message Attribute.Returns template Attribute.getTime()Returns time Attribute.Returns values Attribute.voidSet kind Attribute.voidSet level Attribute.voidsetMessage(String pMessage) Set message Attribute.voidsetTemplate(String pTemplate) Set template Attribute.voidSet time Attribute.voidsetValues(NameValueMap pValues) Set values Attribute.voidupdateUsing(MessageItem other) Update this object with the content of the given object.fluent setter for kind Attribute.fluent setter for level Attribute.withMessage(String pMessage) fluent setter for message Attribute.withTemplate(String pTemplate) fluent setter for template Attribute.fluent setter for time Attribute.withValues(NameValueMap pValues) fluent setter for values Attribute.
-
Field Details
-
_id
inserted database key -
kind
@VoDml(id="execbroker:MessageItem.kind", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String kindThe 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 timeThe 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 levelThe message level. : Attribute level : multiplicity 1 -
template
@VoDml(id="execbroker:MessageItem.template", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String templateThe message template. : Attribute template : multiplicity 1 -
values
@VoDml(id="execbroker:MessageItem.values", role=attribute, type="execbroker:NameValueMap", typeRole=dataType) protected NameValueMap valuesA map of name->value properties. : Attribute values : multiplicity 1 -
message
@VoDml(id="execbroker:MessageItem.message", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String messageThe 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
Copy Constructor. Note that references will remain as is rather than be copied.- Parameters:
other- the object to be copied.
-
-
Method Details
-
getId
- Specified by:
getIdin interfaceorg.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>- Returns:
- the id
-
updateUsing
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
Returns kind Attribute.- Returns:
- kind Attribute
-
setKind
Set kind Attribute.- Parameters:
pKind- value to set
-
withKind
fluent setter for kind Attribute.- Parameters:
pKind- value to set- Returns:
- MessageItem
-
getTime
Returns time Attribute.- Returns:
- time Attribute
-
setTime
Set time Attribute.- Parameters:
pTime- value to set
-
withTime
fluent setter for time Attribute.- Parameters:
pTime- value to set- Returns:
- MessageItem
-
getLevel
Returns level Attribute.- Returns:
- level Attribute
-
setLevel
Set level Attribute.- Parameters:
pLevel- value to set
-
withLevel
fluent setter for level Attribute.- Parameters:
pLevel- value to set- Returns:
- MessageItem
-
getTemplate
Returns template Attribute.- Returns:
- template Attribute
-
setTemplate
Set template Attribute.- Parameters:
pTemplate- value to set
-
withTemplate
fluent setter for template Attribute.- Parameters:
pTemplate- value to set- Returns:
- MessageItem
-
getValues
Returns values Attribute.- Returns:
- values Attribute
-
setValues
Set values Attribute.- Parameters:
pValues- value to set
-
withValues
fluent setter for values Attribute.- Parameters:
pValues- value to set- Returns:
- MessageItem
-
getMessage
Returns message Attribute.- Returns:
- message Attribute
-
setMessage
Set message Attribute.- Parameters:
pMessage- value to set
-
withMessage
fluent setter for message Attribute.- Parameters:
pMessage- value to set- Returns:
- MessageItem
-
createMessageItem
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:
forceLoadin interfaceorg.ivoa.vodml.jpa.JPAManipulations
-
delete
public void delete(jakarta.persistence.EntityManager em) - Specified by:
deletein interfaceorg.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
-