Class AbstractRow<K extends Comparable<? super K>,R extends AbstractRow<K,?> & Comparable<? super R>>

java.lang.Object
com.aoapps.dao.base.AbstractRow<K,R>
All Implemented Interfaces:
Row<K,R>

public abstract class AbstractRow<K extends Comparable<? super K>,R extends AbstractRow<K,?> & Comparable<? super R>> extends Object implements Row<K,R>
Base for Row implementations.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    AbstractRow(Model model, Class<R> clazz)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    The default ordering is based on key comparison.
    boolean
    By default equality is based on same model, compatible class, and equal canonical key objects.
    protected Model
     
    int
    The default hashCode is based on the key value.
    The default String representation is the key value.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.aoapps.dao.Row

    getKey, getTable
  • Constructor Details

    • AbstractRow

      protected AbstractRow(Model model, Class<R> clazz)
  • Method Details

    • toString

      public String toString()
      The default String representation is the key value.
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      The default hashCode is based on the key value.
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      By default equality is based on same model, compatible class, and equal canonical key objects.
      Overrides:
      equals in class Object
    • compareTo

      public int compareTo(R o)
      The default ordering is based on key comparison. If both keys are Strings, will use the model comparator.
    • getModel

      protected Model getModel()