Record Class Transaction

java.lang.Object
java.lang.Record
no.priv.bang.handlereg.services.Transaction

public record Transaction(int transactionId, Date handletidspunkt, String butikk, int storeId, double belop) extends Record
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final double
    The field for the belop record component.
    private final String
    The field for the butikk record component.
    private final Date
    The field for the handletidspunkt record component.
    private final int
    The field for the storeId record component.
    private final int
    The field for the transactionId record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Transaction(int transactionId, Date handletidspunkt, String butikk, int storeId, double belop)
    Creates an instance of a Transaction record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Returns the value of the belop record component.
    Returns the value of the butikk record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    Returns the value of the handletidspunkt record component.
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the storeId record component.
    final String
    Returns a string representation of this record class.
    int
    Returns the value of the transactionId record component.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • transactionId

      private final int transactionId
      The field for the transactionId record component.
    • handletidspunkt

      private final Date handletidspunkt
      The field for the handletidspunkt record component.
    • butikk

      private final String butikk
      The field for the butikk record component.
    • storeId

      private final int storeId
      The field for the storeId record component.
    • belop

      private final double belop
      The field for the belop record component.
  • Constructor Details

    • Transaction

      public Transaction(int transactionId, Date handletidspunkt, String butikk, int storeId, double belop)
      Creates an instance of a Transaction record class.
      Parameters:
      transactionId - the value for the transactionId record component
      handletidspunkt - the value for the handletidspunkt record component
      butikk - the value for the butikk record component
      storeId - the value for the storeId record component
      belop - the value for the belop record component
  • Method Details

    • with

      public static Transaction.Builder with()
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • transactionId

      public int transactionId()
      Returns the value of the transactionId record component.
      Returns:
      the value of the transactionId record component
    • handletidspunkt

      public Date handletidspunkt()
      Returns the value of the handletidspunkt record component.
      Returns:
      the value of the handletidspunkt record component
    • butikk

      public String butikk()
      Returns the value of the butikk record component.
      Returns:
      the value of the butikk record component
    • storeId

      public int storeId()
      Returns the value of the storeId record component.
      Returns:
      the value of the storeId record component
    • belop

      public double belop()
      Returns the value of the belop record component.
      Returns:
      the value of the belop record component