private ColumnMapping parse() { ArrayList<ColumnMapping.Column> columns = new ArrayList<ColumnMapping.Column>(); while (pos <= end) { ColumnMapping.Column c = nextColumnInfo(); columns.add(c); } return new ColumnMapping(columns); }
/** * Creates an immutable copy of this ColumnMapping. * * @throws IllegalStateException when a propertyName has not been defined for a column. */ protected ColumnMapping createImmutableCopy() { for (Column c : dbColumnMap.values()) { c.checkMapping(); } return new ColumnMapping(parsed, dbColumnMap); }
private ColumnMapping parse() { ArrayList<ColumnMapping.Column> columns = new ArrayList<>(); while (pos <= end) { ColumnMapping.Column c = nextColumnInfo(); columns.add(c); } return new ColumnMapping(columns); }
/** * Construct with a ResultSet and properties that the columns map to. * <p> * The properties listed in the propertyNames must be in the same order as the columns in the * resultSet. * <p> * When a query executes this RawSql object then it will close the resultSet. */ public RawSql(ResultSet resultSet, String... propertyNames) { this.resultSet = resultSet; this.sql = null; this.columnMapping = new ColumnMapping(propertyNames); }
/** * Creates an immutable copy of this ColumnMapping. * * @throws IllegalStateException * when a propertyName has not been defined for a column. */ protected ColumnMapping createImmutableCopy() { for (Column c : dbColumnMap.values()) { c.checkMapping(); } return new ColumnMapping(parsed, dbColumnMap); }
/** * Return an unparsed RawSqlBuilder. Unlike a parsed one this query can not be * modified - so no additional WHERE or HAVING expressions can be added to * this query. */ public static RawSqlBuilder unparsed(String sql) { Sql s = new Sql(sql); return new RawSqlBuilder(s, new ColumnMapping()); }
/** * Creates an immutable copy of this ColumnMapping. * * @throws IllegalStateException * when a propertyName has not been defined for a column. */ protected ColumnMapping createImmutableCopy() { for (Column c : dbColumnMap.values()) { c.checkMapping(); } return new ColumnMapping(parsed, dbColumnMap); }
private ColumnMapping parse() { ArrayList<ColumnMapping.Column> columns = new ArrayList<ColumnMapping.Column>(); while (pos <= end) { ColumnMapping.Column c = nextColumnInfo(); columns.add(c); } return new ColumnMapping(columns); }
/** * Return an unparsed RawSqlBuilder. Unlike a parsed one this query can not be * modified - so no additional WHERE or HAVING expressions can be added to * this query. */ public static RawSqlBuilder unparsed(String sql) { Sql s = new Sql(sql); return new RawSqlBuilder(s, new ColumnMapping()); }
/** * Return an unparsed RawSqlBuilder. Unlike a parsed one this query can not be * modified - so no additional WHERE or HAVING expressions can be added to * this query. */ public static RawSqlBuilder unparsed(String sql) { Sql s = new Sql(sql); return new RawSqlBuilder(s, new ColumnMapping()); }