@Test(expected = SQLException.class) public void testUpdateForeignCollection() throws Exception { UpdateBuilder<OurForeignCollection, Integer> stmtb = new UpdateBuilder<OurForeignCollection, Integer>( databaseType, new TableInfo<OurForeignCollection, Integer>(connectionSource, null, OurForeignCollection.class), null); stmtb.updateColumnValue(OurForeignCollection.FOOS_FIELD_NAME, null); }
public UpdateBuilder<T, ID> updateColumnValue(String columnName, Object value) throws SQLException { FieldType fieldType = verifyColumnName(columnName); if (fieldType.isForeignCollection()) { throw new SQLException("Can't update foreign colletion field: " + columnName); } addUpdateColumnToList(columnName, new SetValue(columnName, fieldType, value)); return this; }
UpdateBuilder extends StatementBuilder<T, ID> { public UpdateBuilder<T, ID> updateColumnValue(String columnName, Object value) throws SQLException { FieldType fieldType = verifyColumnName(columnName); if (fieldType.isForeignCollection()) { throw new SQLException("Can't update foreign colletion field: " + columnName); } addUpdateColumnToList(columnName, new SetValue(columnName, fieldType, value)); return this; } }
UpdateBuilder extends StatementBuilder<T, ID> { public UpdateBuilder<T, ID> updateColumnValue(String columnName, Object value) throws SQLException { FieldType fieldType = verifyColumnName(columnName); if (fieldType.isForeignCollection()) { throw new SQLException("Can't update foreign colletion field: " + columnName); } addUpdateColumnToList(columnName, new SetValue(columnName, fieldType, value)); return this; } UpdateBuilder(DatabaseType databaseType, TableInfo<T, ID> tableInfo, Dao<T, ID> dao); }
UpdateBuilder extends StatementBuilder<T, ID> { public UpdateBuilder<T, ID> updateColumnValue(String columnName, Object value) throws SQLException { FieldType fieldType = verifyColumnName(columnName); if (fieldType.isForeignCollection()) { throw new SQLException("Can't update foreign colletion field: " + columnName); } addUpdateColumnToList(columnName, new SetValue(columnName, fieldType, value)); return this; } UpdateBuilder(DatabaseType databaseType, TableInfo<T, ID> tableInfo, Dao<T, ID> dao); PreparedUpdate<T> prepare(); UpdateBuilder<T, ID> updateColumnValue(String columnName, Object value); UpdateBuilder<T, ID> updateColumnExpression(String columnName, String expression); void escapeColumnName(StringBuilder sb, String columnName); String escapeColumnName(String columnName); void escapeValue(StringBuilder sb, String value); String escapeValue(String value); int update(); @Override void reset(); }
UpdateBuilder extends StatementBuilder<T, ID> { public UpdateBuilder<T, ID> updateColumnValue(String columnName, Object value) throws SQLException { FieldType fieldType = verifyColumnName(columnName); if (fieldType.isForeignCollection()) { throw new SQLException("Can't update foreign colletion field: " + columnName); } addUpdateColumnToList(columnName, new SetValue(columnName, fieldType, value)); return this; } UpdateBuilder(DatabaseType databaseType, TableInfo<T, ID> tableInfo, Dao<T, ID> dao); PreparedUpdate<T> prepare(); UpdateBuilder<T, ID> updateColumnValue(String columnName, Object value); UpdateBuilder<T, ID> updateColumnExpression(String columnName, String expression); void escapeColumnName(StringBuilder sb, String columnName); String escapeColumnName(String columnName); void escapeValue(StringBuilder sb, String value); String escapeValue(String value); int update(); @Override void reset();  }