
com.ning.billing.account.dao.AccountEmailSqlDao.sql.stg Maven / Gradle / Ivy
group account_emails;
fields(prefix) ::= <<
id,
account_id,
email,
created_by,
created_date,
updated_by,
updated_date
>>
insertFromTransaction() ::= <<
INSERT INTO account_emails()
VALUES (:id, :accountId, :email, :userName, :createdDate, :userName, :updatedDate);
>>
updateFromTransaction() ::= <<
UPDATE account_emails
SET email = :email, updated_by = :userName, updated_date = :updatedDate
WHERE id = :id;
>>
deleteFromTransaction() ::= <<
DELETE FROM account_emails
WHERE id = :id;
>>
addHistoryFromTransaction() ::= <<
INSERT INTO account_email_history(record_id, id, account_id, email, change_type, updated_by, date)
VALUES (:recordId, :id, :accountId, :email, :changeType, :userName, :updatedDate);
>>
load() ::= <<
SELECT FROM account_emails WHERE account_id = :objectId;
>>
getRecordIds() ::= <<
SELECT record_id, id
FROM account_emails
WHERE account_id = :objectId;
>>
getMaxHistoryRecordId() ::= <<
SELECT MAX(history_record_id)
FROM account_email_history;
>>
getHistoryRecordIds() ::= <<
SELECT history_record_id, record_id
FROM account_email_history
WHERE history_record_id > :maxHistoryRecordId;
>>
getById() ::= <<
SELECT FROM account_emails WHERE id = :id;
>>
get() ::= <<
SELECT FROM account_emails;
>>
getByAccountId() ::= <<
SELECT FROM account_emails WHERE account_id = :accountId;
>>
auditFields(prefix) ::= <<
table_name,
record_id,
change_type,
change_date,
changed_by,
reason_code,
comments,
user_token
>>
insertAuditFromTransaction() ::= <<
INSERT INTO audit_log()
VALUES(:tableName, :recordId, :changeType, :createdDate, :userName, :reasonCode, :comment, :userToken);
>>
test() ::= <<
SELECT 1 FROM account_emails;
>>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy