All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.killbill.billing.payment.dao.PaymentMethodSqlDao.sql.stg Maven / Gradle / Ivy

There is a newer version: 0.24.11
Show newest version
group PaymentMethodSqlDao: EntitySqlDao;



tableName() ::= "payment_methods"

historyTableName() ::= "payment_method_history"

andCheckSoftDeletionWithComma(prefix) ::= "and is_active"

tableFields(prefix) ::= <<
  external_key
, account_id
, plugin_name
, is_active
, created_by
, created_date
, updated_by
, updated_date
>>

tableValues() ::= <<
  :externalKey
, :accountId
, :pluginName
, :isActive
, :createdBy
, :createdDate
, :updatedBy
, :updatedDate
>>

markPaymentMethodAsDeleted(id) ::= <<
update 
set is_active = 0
, updated_by = :updatedBy
, updated_date = :createdDate
where  id = :id

;
>>

unmarkPaymentMethodAsDeleted(id) ::= <<
update 
set is_active = 1
, updated_by = :updatedBy
, updated_date = :createdDate
where  id = :id

;
>>

getByExternalKey() ::= <<
select 
from 
where external_key = :externalKey
and is_active = 1

;
>>

getPaymentMethodByExternalKeyIncludedDeleted() ::= <<
select 
from 
where external_key = :externalKey

;
>>

getPaymentMethodIncludedDelete(accountId) ::= <<
select 
from 
where id = :id
;
>>

getByAccountId(accountId) ::= <<
select

from 
where account_id = :accountId
and is_active = 1
;
>>

getByAccountIdIncludedDelete(accountId) ::= <<
select

from 
where account_id = :accountId
;
>>

searchQuery(prefix) ::= <<
      = :searchKey
  or external_key like :likeSearchKey
  or account_id = :searchKey
  or plugin_name like :likeSearchKey
>>

getByPluginName() ::= <<
select

from  t
where t.plugin_name = :pluginName
and t.is_active = 1
order by t.record_id
limit :offset, :rowCount
;
>>

getCountByPluginName() ::= <<
select
  count(1) as count
from  t
where t.plugin_name = :pluginName
and t.is_active = 1
;
>>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy