Record Class ReportFormatEntry

java.lang.Object
java.lang.Record
org.idempiere.ui.zk.report.ReportFormatEntry
Record Components:
key - AD_PrintFormat_ID, or KEY_NEW / KEY_COPY for the create actions
name - translated display name
description - translated description of the print format, null if none or for the create actions
clientId - AD_Client_ID of the print format, 0 for System and for the create actions
kind - what the entry stands for

public record ReportFormatEntry(int key, String name, String description, int clientId, ReportFormatEntry.Kind kind) extends Record
Print format offered in the report viewer format selector. The viewer builds the entries after the role checks. A selector can reorder, group and decorate them but cannot add one.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    What an entry stands for
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Key of the entry that copies the current print format
    static final int
    Key of the entry that creates a new print format
    static final int
    Key reported when no entry is selected
  • Constructor Summary

    Constructors
    Constructor
    Description
    ReportFormatEntry(int key, String name, String description, int clientId, ReportFormatEntry.Kind kind)
    Creates an instance of a ReportFormatEntry record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the value of the clientId record component.
    Returns the value of the description record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    boolean
     
    int
    key()
    Returns the value of the key record component.
    Returns the value of the kind record component.
    Returns the value of the name record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

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

    • KEY_NONE

      public static final int KEY_NONE
      Key reported when no entry is selected
      See Also:
    • KEY_NEW

      public static final int KEY_NEW
      Key of the entry that creates a new print format
      See Also:
    • KEY_COPY

      public static final int KEY_COPY
      Key of the entry that copies the current print format
      See Also:
  • Constructor Details

    • ReportFormatEntry

      public ReportFormatEntry(int key, String name, String description, int clientId, ReportFormatEntry.Kind kind)
      Creates an instance of a ReportFormatEntry record class.
      Parameters:
      key - the value for the key record component
      name - the value for the name record component
      description - the value for the description record component
      clientId - the value for the clientId record component
      kind - the value for the kind record component
  • Method Details

    • isFormat

      public boolean isFormat()
      Returns:
      true if the entry is a print format the report can switch to
    • 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.
    • key

      public int key()
      Returns the value of the key record component.
      Returns:
      the value of the key record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • description

      public String description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • clientId

      public int clientId()
      Returns the value of the clientId record component.
      Returns:
      the value of the clientId record component
    • kind

      public ReportFormatEntry.Kind kind()
      Returns the value of the kind record component.
      Returns:
      the value of the kind record component