Record Class AdminItem

Object
Record
AdminItem

public record AdminItem(Integer id, Long itemid, Integer containerid, Long containerdefid, String belongsto, Long room, Integer discriminator, String shopkeeper, String owner, LocalDateTime creation) extends Record
  • Field Details

    • GET_ITEMDEFS_QUERY

      public static final String GET_ITEMDEFS_QUERY
      Provides all item instances with this itemdefinition.
      See Also:
    • GET_PERSONS_QUERY

      public static final String GET_PERSONS_QUERY
      Provides all item instances belonging to a person.
      See Also:
    • GET_ROOMS_QUERY

      public static final String GET_ROOMS_QUERY
      Provides all item instances in a room.
      See Also:
  • Constructor Details

    • AdminItem

      public AdminItem(Integer id, Long itemid, Integer containerid, Long containerdefid, String belongsto, Long room, Integer discriminator, String shopkeeper, String owner, LocalDateTime creation)
      Creates an instance of a AdminItem record class.
      Parameters:
      id - the value for the id record component
      itemid - the value for the itemid record component
      containerid - the value for the containerid record component
      containerdefid - the value for the containerdefid record component
      belongsto - the value for the belongsto record component
      room - the value for the room record component
      discriminator - the value for the discriminator record component
      shopkeeper - the value for the shopkeeper record component
      owner - the value for the owner record component
      creation - the value for the creation record component
    • AdminItem

      public AdminItem(Item item)
  • Method Details

    • toJson

      public String toJson()
    • fromJson

      public static AdminItem fromJson(String json)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public Integer id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • itemid

      public Long itemid()
      Returns the value of the itemid record component.
      Returns:
      the value of the itemid record component
    • containerid

      public Integer containerid()
      Returns the value of the containerid record component.
      Returns:
      the value of the containerid record component
    • containerdefid

      public Long containerdefid()
      Returns the value of the containerdefid record component.
      Returns:
      the value of the containerdefid record component
    • belongsto

      public String belongsto()
      Returns the value of the belongsto record component.
      Returns:
      the value of the belongsto record component
    • room

      public Long room()
      Returns the value of the room record component.
      Returns:
      the value of the room record component
    • discriminator

      public Integer discriminator()
      Returns the value of the discriminator record component.
      Returns:
      the value of the discriminator record component
    • shopkeeper

      public String shopkeeper()
      Returns the value of the shopkeeper record component.
      Returns:
      the value of the shopkeeper record component
    • owner

      public String owner()
      Returns the value of the owner record component.
      Returns:
      the value of the owner record component
    • creation

      public LocalDateTime creation()
      Returns the value of the creation record component.
      Returns:
      the value of the creation record component