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.12
Show newest version
import "org/killbill/billing/util/entity/dao/EntitySqlDao.sql.stg"

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 = false
, updated_by = :updatedBy
, updated_date = :updatedDate
where  id = :id

;
>>

unmarkPaymentMethodAsDeleted(id) ::= <<
update 
set is_active = true
, updated_by = :updatedBy
, updated_date = :updatedDate
where  id = :id

;
>>

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


;
>>

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

;
>>

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

;
>>

getForAccount() ::= <<
select

from 
where  = :accountRecordId


;
>>

getForAccountIncludedDelete() ::= <<
select

from 
where  = :accountRecordId

;
>>

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

getByPluginName(ordering) ::= <<
select

from  t
where t.plugin_name = :pluginName


order by t.record_id 
limit :rowCount offset :offset
;
>>

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


;
>>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy