use of com.ctrip.platform.dal.dao.sqlbuilder.FreeUpdateSqlBuilder in project dal by ctripcorp.
the class DaoByFreeSql method deleteByProjectId.
public int deleteByProjectId(int projectId) throws SQLException {
FreeUpdateSqlBuilder builder = new FreeUpdateSqlBuilder(dbCategory);
builder.setTemplate("DELETE FROM task_sql WHERE project_id=?");
StatementParameters parameters = new StatementParameters();
int i = 1;
parameters.set(i++, "project_id", Types.INTEGER, projectId);
DalHints hints = DalHints.createIfAbsent(null);
return queryDao.update(builder, parameters, hints);
}
use of com.ctrip.platform.dal.dao.sqlbuilder.FreeUpdateSqlBuilder in project dal by ctripcorp.
the class DaoBySqlBuilder method deleteByProjectId.
public int deleteByProjectId(int projectId) throws SQLException {
FreeUpdateSqlBuilder builder = new FreeUpdateSqlBuilder(dbCategory);
builder.setTemplate("DELETE FROM task_auto WHERE project_id=?");
StatementParameters parameters = new StatementParameters();
int i = 1;
parameters.set(i++, "project_id", Types.INTEGER, projectId);
DalHints hints = DalHints.createIfAbsent(null);
return queryDao.update(builder, parameters, hints);
}
use of com.ctrip.platform.dal.dao.sqlbuilder.FreeUpdateSqlBuilder in project dal by ctripcorp.
the class DaoByTableViewSp method deleteByProjectId.
public int deleteByProjectId(int id) throws SQLException {
FreeUpdateSqlBuilder builder = new FreeUpdateSqlBuilder(dbCategory);
builder.setTemplate("DELETE FROM task_table WHERE project_id=?");
StatementParameters parameters = new StatementParameters();
int i = 1;
parameters.set(i++, "project_id", Types.INTEGER, id);
DalHints hints = DalHints.createIfAbsent(null);
return queryDao.update(builder, parameters, hints);
}
use of com.ctrip.platform.dal.dao.sqlbuilder.FreeUpdateSqlBuilder in project dal by ctripcorp.
the class DaoByTableViewSp method updateTask.
public int updateTask(int id, int approved, String approveMsg) throws SQLException {
FreeUpdateSqlBuilder builder = new FreeUpdateSqlBuilder(dbCategory);
builder.setTemplate("UPDATE task_table SET approved=?, approveMsg=? WHERE id=?");
StatementParameters parameters = new StatementParameters();
int i = 1;
parameters.set(i++, "approved", Types.INTEGER, approved);
parameters.set(i++, "approveMsg", Types.VARCHAR, approveMsg);
parameters.set(i++, "id", Types.INTEGER, id);
DalHints hints = DalHints.createIfAbsent(null);
return queryDao.update(builder, parameters, hints);
}
use of com.ctrip.platform.dal.dao.sqlbuilder.FreeUpdateSqlBuilder in project dal by ctripcorp.
the class DaoOfProject method updateProjectGroupById.
public int updateProjectGroupById(int groupId, int id) throws SQLException {
FreeUpdateSqlBuilder builder = new FreeUpdateSqlBuilder(dbCategory);
builder.setTemplate("UPDATE project SET dal_group_id = ? WHERE id = ?");
StatementParameters parameters = new StatementParameters();
int i = 1;
parameters.set(i++, "dal_group_id", Types.INTEGER, groupId);
parameters.set(i++, "id", Types.INTEGER, id);
DalHints hints = DalHints.createIfAbsent(null);
return queryDao.update(builder, parameters, hints);
}
Aggregations