Class JKEntity

java.lang.Object
com.jk.data.dataaccess.orm.JKEntity
All Implemented Interfaces:
Serializable

public class JKEntity extends Object implements Serializable
The Class JKEntity.
See Also:
  • Constructor Details

    • JKEntity

      public JKEntity()
      Instantiates a new JK entity.
  • Method Details

    • getTableName

      public String getTableName()
      Gets the table name.
      Returns:
      the table name
    • getIdValue

      public <T> T getIdValue()
      Gets the id value.
      Type Parameters:
      T - the generic type
      Returns:
      the id value
    • getFirstNonIdColumn

      public jakarta.persistence.Column getFirstNonIdColumn()
      Gets the first non id column.
      Returns:
      the first non id column
    • getColumns

      public static List<JKColumnWrapper> getColumns(Class<? extends JKEntity> clas)
      Gets the columns.
      Parameters:
      clas - the clas
      Returns:
      the columns
    • getIdColumn

      public JKColumnWrapper getIdColumn()
      Gets the id column.
      Returns:
      the id column
    • getIdColumn

      public static JKColumnWrapper getIdColumn(Class<? extends JKEntity> clas)
      Gets the id column.
      Parameters:
      clas - the clas
      Returns:
      the id column
    • printFieldsAnnotations

      public void printFieldsAnnotations()
      Prints the fields annotations.
    • printFieldAnnotations

      public static void printFieldAnnotations(Field field)
      Prints the field annotations.
      Parameters:
      field - the field
    • toString

      public String toString()
      To string.
      Overrides:
      toString in class Object
      Returns:
      the string
    • getSortInfo

      public static JKSortInfo getSortInfo(Class<? extends JKEntity> clas)
      Gets the sort info.
      Parameters:
      clas - the clas
      Returns:
      the sort info
    • equals

      public boolean equals(Object obj)
      Equals.
      Overrides:
      equals in class Object
      Parameters:
      obj - the obj
      Returns:
      true, if successful
    • hashCode

      public int hashCode()
      Hash code.
      Overrides:
      hashCode in class Object
      Returns:
      the int
    • getAliasName

      public String getAliasName()
      Gets the alias name.
      Returns:
      the alias name