@Override public final SQLUpdateClause update(RelationalPath<?> path) { return new SQLUpdateClause(connection, configuration, path); }
protected long executeBatch(Collection<PreparedStatement> stmts) throws SQLException { long rv = 0; for (PreparedStatement stmt : stmts) { rv += executeBatch(stmt); } return rv; }
@SuppressWarnings("unchecked") protected long executeCompositeMerge() { if (hasRow()) { // update SQLUpdateClause update = new SQLUpdateClause(connection(), configuration, entity); populate(update); addListeners(update); addKeyConditions(update); return update.execute(); } else { // insert SQLInsertClause insert = new SQLInsertClause(connection(), configuration, entity); addListeners(insert); populate(insert); return insert.execute(); } }
@Override public final SQLInsertClause insert(RelationalPath<?> path) { return new SQLInsertClause(connection, configuration, path); }
@Override protected SQLUpdateClause setOrdinal(SQLUpdateClause versionUpdateBatch, long ordinal) { return versionUpdateBatch.set(options.version.ordinal, ordinal); }
@Override public final SQLDeleteClause delete(RelationalPath<?> path) { return new SQLDeleteClause(connection, configuration, path); }
/** * Execute the clause and return the generated key cast to the given type. * If no rows were created, null is returned, otherwise the key of the first row is returned. * * @param <T> * @param type type of key * @return generated key */ public <T> T executeWithKey(Class<T> type) { return executeWithKey(type, null); }
/** * Execute the clause and return the generated key cast to the given type. * If no rows were created, null is returned, otherwise the key of the first * row is returned. * * @param <T> * @param type type of key * @return generated key */ public <T> T executeWithKey(Class<T> type) { return executeWithKey(type, null); }
@Override public final SQLMergeClause merge(RelationalPath<?> path) { return new SQLMergeClause(connection, configuration, path); }
public <T> List<T> executeWithKeys(Class<T> type) { return executeWithKeys(type, null); }
protected void close(Collection<? extends Statement> stmts) { for (Statement stmt : stmts) { close(stmt); } }
public <T> List<T> executeWithKeys(Class<T> type) { return executeWithKeys(type, null); }
protected void reset() { cleanupMDC(); }