public static final class RawSql.ColumnMapping extends Object implements Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
RawSql.ColumnMapping.Column
A Column of the RawSql that is mapped to a bean property (or ignored).
|
| Modifier | Constructor and Description |
|---|---|
protected |
RawSql.ColumnMapping()
Construct for unparsed sql.
|
protected |
RawSql.ColumnMapping(boolean parsed,
LinkedHashMap<String,RawSql.ColumnMapping.Column> dbColumnMap)
Construct an immutable ColumnMapping based on collected information.
|
protected |
RawSql.ColumnMapping(List<RawSql.ColumnMapping.Column> columns)
Construct from parsed sql where the columns have been identified.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
columnMapping(String dbColumn,
String propertyName) |
protected RawSql.ColumnMapping |
createImmutableCopy()
Creates an immutable copy of this ColumnMapping.
|
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.
|
protected Map<String,RawSql.ColumnMapping.Column> |
mapping()
Return the column mapping.
|
int |
queryHash()
Return the query hash for this column mapping.
|
int |
size()
Return the number of columns in this column mapping.
|
protected RawSql.ColumnMapping(List<RawSql.ColumnMapping.Column> columns)
protected RawSql.ColumnMapping()
protected RawSql.ColumnMapping(boolean parsed,
LinkedHashMap<String,RawSql.ColumnMapping.Column> dbColumnMap)
protected RawSql.ColumnMapping createImmutableCopy()
IllegalStateException - when a propertyName has not been defined for a column.public int queryHash()
public boolean isParsed()
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.
public int size()
protected Map<String,RawSql.ColumnMapping.Column> mapping()
public int getIndexPosition(String property)
public Iterator<RawSql.ColumnMapping.Column> getColumns()
Copyright © 2014. All Rights Reserved.