com.avaje.ebean
Class RawSql.ColumnMapping

java.lang.Object
  extended by com.avaje.ebean.RawSql.ColumnMapping
Enclosing class:
RawSql

public static final class RawSql.ColumnMapping
extends Object

    

Defines the column mapping for raw sql DB columns to bean properties.


Nested Class Summary
static class RawSql.ColumnMapping.Column
          A Column of the RawSql that is mapped to a bean property (or ignored).
 
Method Summary
 Iterator<RawSql.ColumnMapping.Column> getColumns()
          Return an iterator of the Columns.
 int getIndexPosition(String property)
          Return the index position by bean property name.
 Map<String,String> getMapping()
          Return the mapping by DB column.
 boolean isParsed()
          Returns true if the Columns where supplied by parsing the sql select clause.
 int queryHash()
          Return the query hash for this column mapping.
 int size()
          Return the number of columns in this column mapping.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

queryHash

public int queryHash()
Return the query hash for this column mapping.


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

public Iterator<RawSql.ColumnMapping.Column> getColumns()
Return an iterator of the Columns.



Copyright © 2010. All Rights Reserved.