Here are the examples of the java api @com.agnitas.dao.DaoUpdateReturnValueCheck taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
236 Examples
19
Source : UserAgentDao.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@DaoUpdateReturnValueCheck
public void deleteUserAgent(int id) {
update(logger, "delete from user_agent_tbl where user_agent_id=?", id);
}
19
Source : DynamicTagDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@DaoUpdateReturnValueCheck
protected void setDynNameDeletionMark(int mailingID, boolean setDeleted, List<String> nameList) {
if (nameList.isEmpty()) {
return;
}
String updateSql;
if (setDeleted) {
updateSql = "UPDATE dyn_name_tbl SET change_date = current_timestamp, deleted = 1, deletion_date = CURRENT_TIMESTAMP";
} else {
updateSql = "UPDATE dyn_name_tbl SET change_date = current_timestamp, deleted = 0, deletion_date = null";
}
updateSql += " WHERE mailing_id = ? AND " + makeBulkInClauseForString("dyn_name", nameList);
update(logger, updateSql, mailingID);
}
19
Source : ComTrackableLinkDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@DaoUpdateReturnValueCheck
public boolean setDeeptracking(int deepTracking, @VelocityCheck int companyID, int mailingID) {
try {
String sql = "UPDATE rdir_url_tbl SET deep_tracking = ? WHERE company_id = ? AND mailing_id = ?";
update(logger, sql, deepTracking, companyID, mailingID);
return true;
} catch (Exception e) {
return false;
}
}
19
Source : ComTrackableLinkDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@DaoUpdateReturnValueCheck
public boolean deleteTrackableLink(int linkID, @VelocityCheck int companyID) {
return update(logger, "UPDATE rdir_url_tbl SET deleted = 1 WHERE url_id = ? AND company_id = ?", linkID, companyID) > 0;
}
18
Source : AbstractLoginTrackDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@Override
@DaoUpdateReturnValueCheck
public int deleteOldRecords(int holdBackDays, int maxRecords) {
if (holdBackDays < 0)
throw new IllegalArgumentException("holdBackDays must be >= 0");
if (maxRecords < 0)
throw new IllegalArgumentException("maxRecords must be >= 0");
final String sql = isOracleDB() ? String.format("DELETE FROM %s WHERE (sysdate - creation_date) > ? AND ROWNUM <= ?", getTrackingTableName()) : String.format("DELETE FROM %s WHERE DATE_SUB(CURRENT_TIMESTAMP, INTERVAL ? DAY) > creation_date LIMIT ?", getTrackingTableName());
return update(getLogger(), sql, Math.max(holdBackDays, 0), Math.max(maxRecords, 0));
}
18
Source : AbstractLoginTrackDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@Override
@DaoUpdateReturnValueCheck
public int deleteOldRecordsHours(int holdBackHours, int maxRecords) {
if (holdBackHours < 0)
throw new IllegalArgumentException("holdBackHours must be >= 0");
if (maxRecords < 0)
throw new IllegalArgumentException("maxRecords must be >= 0");
final String sql = isOracleDB() ? String.format("DELETE FROM %s WHERE creation_date < sysdate - ? / 24.0 AND ROWNUM <= ?", getTrackingTableName()) : String.format("DELETE FROM %s WHERE DATE_SUB(CURRENT_TIMESTAMP, INTERVAL ? HOUR) > creation_date LIMIT ?", getTrackingTableName());
return update(getLogger(), sql, Math.max(holdBackHours, 0), Math.max(maxRecords, 0));
}
18
Source : OnepixelDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@Override
@DaoUpdateReturnValueCheck
public void deleteAdminAndTestOpenings(int mailingId, @VelocityCheck int companyId) {
// remove from onepixellog_X_tbl
String query = createDeleteAdminAndTestOpeningsQuery(getOnepixellogTableName(companyId), companyId);
update(logger, query, mailingId, mailingId);
// remove from onepixellog_device_X_tbl
query = createDeleteAdminAndTestOpeningsQuery(getOnepixellogDeviceTableName(companyId), companyId);
update(logger, query, mailingId, mailingId);
}
18
Source : MailinglistDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@Override
@DaoUpdateReturnValueCheck
public boolean deleteMailinglist(int listID, @VelocityCheck int companyId) {
// Always keep the mailinglist with the lowest mailinglist_id. Should be the "Standard ... NICHT LÖSCHEN!!!" mailinglist
// This must be done in two steps because mysql doesn't allow to update same table as used in a subquery
Integer alwaysKeepMailinglistID = select(logger, "SELECT MIN(mailinglist_id) FROM mailinglist_tbl WHERE company_id = ? AND deleted = 0", Integer.clreplaced, companyId);
if (alwaysKeepMailinglistID != null && alwaysKeepMailinglistID != listID) {
return update(logger, "UPDATE mailinglist_tbl SET deleted = 1, binding_clean = 1, change_date = CURRENT_TIMESTAMP WHERE mailinglist_id = ? AND company_id = ? AND deleted = 0", listID, companyId) > 0;
} else {
return false;
}
}
18
Source : MailinglistDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
/**
* Even deletes the last mailinglist wich would not be deleted by deleteMailinglist(int listID, @VelocityCheck int companyId)
*/
@Override
@DaoUpdateReturnValueCheck
public boolean deleteAllMailinglist(@VelocityCheck int companyId) {
int result = update(logger, "UPDATE mailinglist_tbl SET deleted = 1, binding_clean = 1, change_date = CURRENT_TIMESTAMP WHERE company_id = ? AND deleted = 0", companyId);
if (result > 0) {
return true;
} else {
return selectIntWithDefaultValue(logger, "SELECT COUNT(*) FROM mailinglist_tbl WHERE company_id = ? AND deleted = 0", 0, companyId) == 0;
}
}
18
Source : MailinglistDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
/**
* deletes the bindings for this mailinglist (invocated before the mailinglist is deleted to avoid orphaned mailinglist bindings)
*
* @return return code
*/
@Override
@DaoUpdateReturnValueCheck
public boolean deleteBindings(int id, @VelocityCheck int companyId) {
try {
return update(logger, "DELETE FROM customer_" + companyId + "_binding_tbl WHERE mailinglist_id = ?", id) > 0;
} catch (Exception e) {
// logging was already done
return false;
}
}
18
Source : ImportRecipientsDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@Override
@DaoUpdateReturnValueCheck
public int importInBlackList(String temporaryImportTableName, @VelocityCheck final int companyId) {
String updateBlacklist = "INSERT INTO cust" + companyId + "_ban_tbl (email) (SELECT DISTINCT email FROM " + temporaryImportTableName + " temp WHERE email IS NOT NULL" + " AND NOT EXISTS (SELECT email FROM cust" + companyId + "_ban_tbl ban WHERE ban.email = temp.email))";
return update(logger, updateBlacklist);
}
18
Source : ImportRecipientsDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@Override
@DaoUpdateReturnValueCheck
public void removeFromBlackListNotIncludedInTempData(String temporaryImportTableName, @VelocityCheck final int companyId) {
String updateBlacklist = "DELETE FROM cust" + companyId + "_ban_tbl WHERE email NOT IN (SELECT DISTINCT email FROM " + temporaryImportTableName + " temp WHERE email IS NOT NULL)";
update(logger, updateBlacklist);
}
18
Source : ImportProfileDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@Override
@DaoUpdateReturnValueCheck
public boolean deleteImportProfileById(int profileId) {
try {
update(logger, "DELETE FROM import_profile_mlist_bind_tbl WHERE import_profile_id = ?", profileId);
update(logger, "DELETE FROM import_profile_tbl WHERE id = ?", profileId);
update(logger, "DELETE FROM import_column_mapping_tbl WHERE profile_id = ?", profileId);
update(logger, "DELETE FROM import_gender_mapping_tbl WHERE profile_id = ?", profileId);
} catch (Exception e) {
return false;
}
return true;
}
18
Source : EmmActionDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@Override
@DaoUpdateReturnValueCheck
public boolean deleteEmmActionReally(int actionID, @VelocityCheck int companyID) {
try {
int touchedLines = update(logger, "DELETE FROM rdir_action_tbl WHERE action_id = ? AND company_id = ?", actionID, companyID);
return touchedLines > 0;
} catch (Exception e) {
return false;
}
}
18
Source : EmmActionDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@Override
@DaoUpdateReturnValueCheck
public boolean deleteEmmAction(int actionID, @VelocityCheck int companyID) {
try {
int touchedLines = update(logger, "UPDATE rdir_action_tbl SET deleted = 1 WHERE action_id = ? AND company_id = ?", actionID, companyID);
return touchedLines > 0;
} catch (Exception e) {
return false;
}
}
18
Source : DynamicTagContentDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@Override
@DaoUpdateReturnValueCheck
public boolean deleteContent(@VelocityCheck int companyID, int contentID) {
String deleteContentSQL = "DELETE from dyn_content_tbl WHERE dyn_content_id = ? AND company_id = ?";
return update(logger, deleteContentSQL, contentID, companyID) > 0;
}
18
Source : UserAgentDao.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@DaoUpdateReturnValueCheck
public void traceAgentForClient(String userAgent, int amount) {
if (userAgent != null) {
// Try to update an existing useragent entry. This is the standard case which should update 1 entry only
int touchedLines = update(logger, "UPDATE user_agent_for_client_tbl SET change_date = CURRENT_TIMESTAMP, req_counter = req_counter + ? WHERE user_agent = ?", amount, userAgent);
if (touchedLines == 0) {
// If nothing was updated, try to insert this new useragent, what can go wrong, if meanwhile the useragent was inserted by another process.
// More than 1 entry cannot be updated here because useragent is an unique key in this table.
try {
if (isOracleDB()) {
int newId = selectInt(logger, "SELECT user_agent_for_client_tbl_seq.NEXTVAL FROM DUAL");
update(logger, "INSERT INTO user_agent_for_client_tbl (user_agent_id, user_agent, req_counter, creation_date) VALUES (?, ?, ?, CURRENT_TIMESTAMP)", newId, userAgent, 0);
} else {
update(logger, "INSERT INTO user_agent_for_client_tbl (user_agent, req_counter, creation_date) VALUES (?, ?, CURRENT_TIMESTAMP)", userAgent, 0);
}
} catch (DataIntegrityViolationException e) {
// do nothing, because meanwhile the useragent was inserted by another process.
}
// Update the existing useragent entry, which must exist because this process or another process created by now
touchedLines = update(logger, "UPDATE user_agent_for_client_tbl SET change_date = CURRENT_TIMESTAMP, req_counter = req_counter + ? WHERE user_agent = ?", amount, userAgent);
if (touchedLines > 1) {
// Too many rows so remove duplicates. This may only happen if there is no unique key on user_agent
if (isOracleDB()) {
update(logger, "DELETE FROM user_agent_for_client_tbl a WHERE a.user_agent = ? AND a.user_agent_id > (SELECT MIN(user_agent_id) FROM user_agent_for_client_tbl b WHERE b.user_agent = a.user_agent);", userAgent);
} else {
int minId = selectInt(logger, "SELECT MIN(user_agent_id) FROM user_agent_for_client_tbl WHERE user_agent = ?", userAgent);
update(logger, "DELETE FROM user_agent_for_client_tbl WHERE user_agent = ? AND user_agent_id > ?", userAgent, minId);
}
} else if (touchedLines < 1) {
logger.error("Error writing UserAgent: " + userAgent);
}
}
}
}
18
Source : UserAgentDao.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@DaoUpdateReturnValueCheck
public void traceAgent(String userAgent) {
if (userAgent != null) {
// Try to update an existing useragent entry. This is the standard case which should update 1 entry only
int touchedLines = update(logger, "UPDATE user_agent_tbl SET change_date = CURRENT_TIMESTAMP, req_counter = req_counter + 1 WHERE user_agent = ?", userAgent);
if (touchedLines == 0) {
// If nothing was updated, try to insert this new useragent, what can go wrong, if meanwhile the useragent was inserted by another process.
// More than 1 entry cannot be updated here because useragent is an unique key in this table.
try {
if (isOracleDB()) {
int newId = selectInt(logger, "SELECT user_agent_tbl_seq.NEXTVAL FROM DUAL");
update(logger, "INSERT INTO user_agent_tbl (user_agent_id, user_agent, req_counter, creation_date) VALUES (?, ?, ?, CURRENT_TIMESTAMP)", newId, userAgent, 0);
} else {
update(logger, "INSERT INTO user_agent_tbl (user_agent, req_counter, creation_date) VALUES (?, ?, CURRENT_TIMESTAMP)", userAgent, 0);
}
} catch (DataIntegrityViolationException e) {
// do nothing, because meanwhile the useragent was inserted by another process.
}
// Update the existing useragent entry, which must exist because this process or another process created by now
touchedLines = update(logger, "UPDATE user_agent_tbl SET change_date = CURRENT_TIMESTAMP, req_counter = req_counter + 1 WHERE user_agent = ?", userAgent);
if (touchedLines > 1) {
// Too many rows so remove duplicates. This may only happen if there is no unique key on user_agent
if (isOracleDB()) {
update(logger, "DELETE FROM user_agent_tbl a WHERE a.user_agent = ? AND a.user_agent_id > (SELECT MIN(user_agent_id) FROM user_agent_tbl b WHERE b.user_agent = a.user_agent);", userAgent);
} else {
int minId = selectInt(logger, "SELECT MIN(user_agent_id) FROM user_agent_tbl WHERE user_agent = ?", userAgent);
update(logger, "DELETE FROM user_agent_tbl WHERE user_agent = ? AND user_agent_id > ?", userAgent, minId);
}
} else if (touchedLines < 1) {
logger.error("Error writing UserAgent: " + userAgent);
}
}
}
}
18
Source : MailingURLClicksDataSet.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@DaoUpdateReturnValueCheck
private void updateRates(int tempTableID) throws Exception {
List<Tuple<Integer, Integer>> result = selectEmbedded(logger, "SELECT COALESCE(SUM(clicks_gross), 0) total_click_gross, COALESCE(SUM(clicks_net), 0) total_click_net FROM " + getTempTableName(tempTableID), (resultSet, i) -> {
int totalGross = resultSet.getBigDecimal("total_click_gross").intValue();
int totalNet = resultSet.getBigDecimal("total_click_net").intValue();
return new Tuple<>(totalGross, totalNet);
});
int totalGross = 0;
int totalNet = 0;
if (!result.isEmpty()) {
totalGross = result.get(0).getFirst();
totalNet = result.get(0).getSecond();
}
updateEmbedded(logger, "UPDATE " + getTempTableName(tempTableID) + " SET rate_gross = " + (totalGross > 0 ? "(" + "clicks_gross" + " * 1.0) / ?" : "?") + ", rate_net = " + (totalNet > 0 ? "(" + "clicks_net" + " * 1.0) / ?" : "?"), totalGross, totalNet);
}
18
Source : ComOptimizationDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@Override
@DaoUpdateReturnValueCheck
public int deleteByCompanyID(@VelocityCheck int companyID) {
String deleteQuery = "delete from auto_optimization_tbl where company_id = ?";
return update(logger, deleteQuery, companyID);
}
18
Source : ComWorkflowReportScheduleDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@Override
@DaoUpdateReturnValueCheck
public void markWorkflowReportsSent(List<Integer> reportIds) {
ArrayList<Object[]> updateList = new ArrayList<>();
for (Integer reportId : reportIds) {
updateList.add(new Object[] { reportId });
}
String sql = "UPDATE workflow_report_schedule_tbl SET sent = 1 WHERE report_id = ?";
batchupdate(logger, sql, updateList);
}
18
Source : ComWorkflowReactionDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@Override
@DaoUpdateReturnValueCheck
public void deleteReaction(int reactionId, @VelocityCheck int companyId) {
clearReactionLog(reactionId, companyId, false);
clearReactionLegacyLog(reactionId, companyId);
deleteReactionStepDeclarations(reactionId, companyId);
update(logger, "DELETE FROM workflow_reaction_tbl WHERE company_id = ? AND reaction_id = ?", companyId, reactionId);
}
18
Source : ComWorkflowReactionDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@Override
@DaoUpdateReturnValueCheck
public void deleteReactions(@VelocityCheck int companyId) {
update(logger, "DELETE FROM workflow_reaction_mailing_tbl WHERE company_id = ?", companyId);
update(logger, "DELETE FROM workflow_reaction_log_tbl WHERE company_id = ?", companyId);
update(logger, "DELETE FROM workflow_reaction_out_tbl WHERE company_id = ?", companyId);
update(logger, "DELETE FROM workflow_reaction_step_tbl WHERE company_id = ?", companyId);
update(logger, "DELETE FROM workflow_reaction_decl_tbl WHERE company_id = ?", companyId);
update(logger, "DELETE FROM workflow_def_mailing_tbl WHERE company_id = ?", companyId);
update(logger, "DELETE FROM workflow_reaction_tbl WHERE company_id = ?", companyId);
}
18
Source : ComWorkflowReactionDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@Override
@DaoUpdateReturnValueCheck
public void deactivateWorkflowReactions(int workflowId, @VelocityCheck int companyId) {
int reactionId = getReactionId(workflowId, companyId);
if (reactionId > 0) {
deactivateReaction(reactionId, companyId);
}
}
18
Source : ComWorkflowReactionDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@Override
@DaoUpdateReturnValueCheck
public void deactivateReaction(int reactionId, @VelocityCheck int companyId) {
update(logger, "UPDATE workflow_reaction_tbl SET active = 0 WHERE company_id = ? AND reaction_id = ?", companyId, reactionId);
clearReactionLog(reactionId, companyId, true);
clearReactionLegacyLog(reactionId, companyId);
}
18
Source : ComWorkflowReactionDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@Override
@DaoUpdateReturnValueCheck
public void deleteWorkflowReactions(int workflowId, @VelocityCheck int companyId) {
int reactionId = getReactionId(workflowId, companyId);
if (reactionId > 0) {
deleteReaction(reactionId, companyId);
}
}
18
Source : ComWorkflowDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@Override
@DaoUpdateReturnValueCheck
public void deleteWorkflow(int workflowId, @VelocityCheck int companyId) {
update(logger, "DELETE FROM workflow_tbl WHERE workflow_id = ? AND company_id = ?", workflowId, companyId);
}
18
Source : ComWorkflowDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@Override
@DaoUpdateReturnValueCheck
public void deleteWorkflow(@VelocityCheck int companyId) {
update(logger, "DELETE FROM workflow_tbl WHERE company_id = ?", companyId);
}
18
Source : ComUploadDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@Override
@DaoUpdateReturnValueCheck
public void deleteData(int uploadID) {
update(logger, "DELETE FROM upload_tbl WHERE upload_id = ?", uploadID);
}
18
Source : MailingStatJobDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@Override
@DaoUpdateReturnValueCheck
public void deleteMailingStatJob(int id) {
update(logger, "delete from mailing_statistic_job_tbl where mailing_stat_job_id=?", id);
}
18
Source : MailingStatJobDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@Override
@DaoUpdateReturnValueCheck
public void removeExpiredMailingStatJobs(int maxAgeSeconds) {
if (isOracleDB()) {
update(logger, "DELETE FROM mailing_statistic_job_tbl WHERE creation_date < SYSDATE - ?/24/60/60", maxAgeSeconds);
} else {
update(logger, "DELETE FROM mailing_statistic_job_tbl WHERE creation_date < (NOW() - INTERVAL ? SECOND)", maxAgeSeconds);
}
}
18
Source : MailingStatJobDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@Override
@DaoUpdateReturnValueCheck
public void updateMailingStatJob(int id, int status, String statusDescription) {
String descr = statusDescription.length() < 4000 ? statusDescription : statusDescription.substring(0, 4000);
update(logger, "UPDATE mailing_statistic_job_tbl SET job_status = ?, change_date = CURRENT_TIMESTAMP, job_status_descr = ? WHERE mailing_stat_job_id = ?", status, descr, id);
}
18
Source : ComFollowUpStatsDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@Override
@DaoUpdateReturnValueCheck
public void updateStatEntry(int resultID, long duration, int result) {
update(logger, "UPDATE followup_stat_result_tbl SET duration_time = ? WHERE result_id = ?", duration, resultID);
update(logger, "UPDATE followup_stat_result_tbl SET result_value = ? WHERE result_id = ?", result, resultID);
}
18
Source : ComCalendarCommentDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@Override
@DaoUpdateReturnValueCheck
public boolean deleteComment(int commentId, @VelocityCheck int companyId) {
String sqlDeleteComment = "DELETE FROM calendar_comment_tbl WHERE comment_id = ? AND company_id = ?";
int result = update(logger, sqlDeleteComment, commentId, companyId);
if (result > 0) {
update(logger, "DELETE FROM calendar_custom_recipients_tbl WHERE comment_id = ? AND company_id = ?", commentId, companyId);
return true;
} else {
return false;
}
}
18
Source : UserFormDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@Override
@DaoUpdateReturnValueCheck
public boolean deleteUserForm(int formID, @VelocityCheck int companyID) {
if (formID == 0 || companyID == 0) {
return false;
} else {
try {
update(logger, "DELETE FROM rdir_url_userform_param_tbl WHERE url_id IN (SELECT url_id FROM rdir_url_userform_tbl WHERE company_id = ? AND form_id = ?)", companyID, formID);
update(logger, "DELETE FROM rdir_url_userform_tbl WHERE company_id = ? AND form_id = ?", companyID, formID);
int deletedEntries = update(logger, "DELETE FROM userform_tbl WHERE company_id = ? AND form_id = ?", companyID, formID);
return deletedEntries == 1;
} catch (Exception e) {
return false;
}
}
}
18
Source : PasswordResetDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@Override
@DaoUpdateReturnValueCheck
public void riseErrorCount(int adminID) {
update(logger, "UPDATE admin_preplacedword_reset_tbl SET error_count = error_count + 1 WHERE admin_id = ?", adminID);
}
18
Source : PasswordResetDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@Override
@DaoUpdateReturnValueCheck
public void remove(int adminID) {
update(logger, "DELETE FROM admin_preplacedword_reset_tbl WHERE admin_id = ?", adminID);
}
18
Source : LayoutDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@Override
@DaoUpdateReturnValueCheck
public void saveLayoutData(int companyID, String itemName, byte[] data) throws Exception {
int existsCount = selectInt(logger, "SELECT COUNT(*) FROM layout_tbl WHERE company_id = ? AND item_name = ?", companyID, itemName);
if (existsCount == 0) {
update(logger, "INSERT INTO layout_tbl (company_id, item_name) VALUES (?, ?)", companyID, itemName);
}
updateBlob(logger, "UPDATE layout_tbl SET data = ? WHERE company_id = ? AND item_name = ?", data, companyID, itemName);
}
18
Source : ComUndoMailingDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@Override
@DaoUpdateReturnValueCheck
public void deleteOutdatedUndoData(int lastUndoId) {
update(logger, DELETE_OUTDATED_MAILING_STATEMENT, new Object[] { lastUndoId });
}
18
Source : ComUndoMailingDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@Override
@DaoUpdateReturnValueCheck
public void deleteUndoData(int undoId) {
update(logger, DELETE_MAILING_STATEMENT, new Object[] { undoId });
}
18
Source : ComUndoMailingDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@Override
@DaoUpdateReturnValueCheck
public void deleteUndoDataOverLimit(int mailingId, int undoId) {
if (undoId == 0) {
return;
}
update(logger, DELETE_UNDODATA_OVER_LIMIT_FOR_MAILING_STATEMENT, new Object[] { mailingId, undoId });
}
18
Source : ComUndoMailingDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@Override
@DaoUpdateReturnValueCheck
public void deleteUndoDataForMailing(int mailingID) {
update(logger, DELETE_UNDODATA_FOR_MAILING_STATEMENT, new Object[] { mailingID });
}
18
Source : ComUndoMailingComponentDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@Override
@DaoUpdateReturnValueCheck
public void deleteUndoDataOverLimit(int mailingId, int undoId) {
if (undoId == 0)
return;
update(logger, DELETE_UNDODATA_OVER_LIMIT_FOR_MAILING_STATEMENT, mailingId, undoId);
}
18
Source : ComUndoMailingComponentDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@Override
@DaoUpdateReturnValueCheck
public void deleteOutdatedUndoData(int lastUndoId) {
update(logger, DELETE_OUTDATED_COMPONENT_STATEMENT, lastUndoId);
}
18
Source : ComUndoMailingComponentDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@Override
@DaoUpdateReturnValueCheck
public boolean deleteByCompany(@VelocityCheck int companyId) {
return deleteByCompany(logger, "undo_component_tbl", companyId);
}
18
Source : ComUndoMailingComponentDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@Override
@DaoUpdateReturnValueCheck
public void deleteUndoDataForMailing(int mailingID) {
update(logger, DELETE_UNDODATA_FOR_MAILING_STATEMENT, mailingID);
}
18
Source : ComUndoMailingComponentDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@Override
@DaoUpdateReturnValueCheck
public void deleteUndoData(int undoId) {
update(logger, DELETE_COMPONENT_STATEMENT, undoId);
}
18
Source : ComUndoDynContentDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@Override
@DaoUpdateReturnValueCheck
public boolean deleteByCompany(@VelocityCheck int companyId) {
return deleteByCompany(logger, "undo_dyn_content_tbl", companyId);
}
18
Source : ComUndoDynContentDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@Override
@DaoUpdateReturnValueCheck
public void deleteUndoDataOverLimit(int mailingId, int undoId) {
if (undoId != 0) {
update(logger, DELETE_UNDODATA_OVER_LIMIT_FOR_MAILING_STATEMENT, mailingId, undoId);
}
}
18
Source : ComUndoDynContentDaoImpl.java
with GNU Affero General Public License v3.0
from agnitas-org
with GNU Affero General Public License v3.0
from agnitas-org
@Override
@DaoUpdateReturnValueCheck
public void deleteAddedDynContent(int mailingId, int undoId) {
update(logger, DELETE_ADDED_CONTENT, mailingId, mailingId, undoId);
}
See More Examples