Class SpiRawSql.ColumnMapping.Column

java.lang.Object
io.ebeaninternal.server.rawsql.SpiRawSql.ColumnMapping.Column
All Implemented Interfaces:
Serializable
Enclosing class:
SpiRawSql.ColumnMapping

public static class SpiRawSql.ColumnMapping.Column extends Object implements Serializable
A Column of the RawSql that is mapped to a bean property (or ignored).
See Also:
  • Constructor Details

    • Column

      public Column(int indexPos, String dbColumn, String dbAlias)
      Construct a Column.
  • Method Details

    • derivePropertyName

      protected static String derivePropertyName(String dbAlias, String dbColumn)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getIndexPos

      public int getIndexPos()
      Return the index position of this column.
    • getDbColumnKey

      public String getDbColumnKey()
      Return the DB column alias if specified otherwise DB column. This is used as the key for mapping a column to a logical property.
    • getDbColumn

      public String getDbColumn()
      Return the DB column name including table alias (if it has one).
    • getPropertyName

      public String getPropertyName()
      Return the bean property this column is mapped to.
    • tableAliasMapping

      public void tableAliasMapping(String path)
      Prepend the path to the property name.

      For example if path is "customer" then "name" becomes "customer.name".