Class SpiRawSql.ColumnMapping

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

public static final class SpiRawSql.ColumnMapping extends Object implements Serializable
Defines the column mapping for raw sql DB columns to bean properties.
See Also:
  • Method Details

    • equals

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

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

      public boolean contains(String property)
      Return true if the property is mapped.
    • isParsed

      public boolean isParsed()
      Returns true if the Columns where supplied by parsing the sql select clause.

      In the case where the columns where parsed then we can do extra checks on the column mapping such as, is the column a valid one in the sql and whether all the columns in the sql have been mapped.

    • size

      public int size()
      Return the number of columns in this column mapping.
    • getMapping

      public Map<String,String> getMapping()
      Return the mapping by DB column.
    • getIndexPosition

      public int getIndexPosition(String property)
      Return the index position by bean property name.
    • getColumns

      Return an iterator of the Columns.
    • tableAliasMapping

      public void tableAliasMapping(String tableAlias, String path)
      Modify any column mappings with the given table alias to have the path prefix.

      For example modify all mappings with table alias "c" to have the path prefix "customer".

      For the "Root type" you don't need to specify a tableAliasMapping.

    • mapToColumn

      public String mapToColumn(String property)