java.lang.Object
es.kukenan.smartfi.microservice.communication.repository.entity.Message
All Implemented Interfaces:
Serializable

@Entity public class Message extends Object implements Serializable
Message database entity.
See Also:
  • Field Details

    • id

      private int id
      Message identifier.
    • name

      @NotBlank @Size(max=45) private @NotBlank @Size(max=45) String name
      Message name.
    • description

      @Size(max=255) private @Size(max=255) String description
      Message description.
    • company

      @NotNull private @NotNull Company company
      Message company. We do not need it because we already use it as a filter when finding the messages.
    • type

      @NotNull private @NotNull MessageType type
      Message type. We do not need the type for notification purposes, not marked for eager fetch.
    • sender

      private Sender sender
      Message sender. When we retrieve a message, we want the sender so fetch is marked as eager.
    • receivers

      private Set<Receiver> receivers
      Message receivers. When we retrieve a message, we want all its receivers so fetch is marked as eager.
    • events

      private Set<Event> events
      Event messages. We are not querying events directly at all.
  • Constructor Details

    • Message

      public Message()