com.ning.billing.subscription.engine.dao.SubscriptionEventSqlDao.sql.stg Maven / Gradle / Ivy
The newest version!
group EventSqlDao: EntitySqlDao;
tableName() ::= "subscription_events"
andCheckSoftDeletionWithComma(prefix) ::= "and is_active"
extraTableFieldsWithComma(prefix) ::= <<
, record_id as total_ordering
>>
defaultOrderBy(prefix) ::= <<
order by effective_date ASC, ASC
>>
tableFields(prefix) ::= <<
event_type
, user_type
, requested_date
, effective_date
, subscription_id
, plan_name
, phase_name
, price_list_name
, current_version
, is_active
, created_by
, created_date
, updated_by
, updated_date
>>
tableValues() ::= <<
:eventType
, :userType
, :requestedDate
, :effectiveDate
, :subscriptionId
, :planName
, :phaseName
, :priceListName
, :currentVersion
, :isActive
, :createdBy
, :createdDate
, :updatedBy
, :updatedDate
>>
updateVersion() ::= <<
update
set
current_version = :currentVersion
, updated_by = :createdBy
, updated_date = :createdDate
where
id = :id
;
>>
unactiveEvent() ::= <<
update
set
is_active = 0
, updated_by = :createdBy
, updated_date = :createdDate
where
id = :id
;
>>
reactiveEvent() ::= <<
update
set
is_active = 1
, updated_by = :createdBy
, updated_date = :createdDate
where
event_id = :eventId
;
>>
getFutureActiveEventForSubscription() ::= <<
select
, record_id as total_ordering
from
where
subscription_id = :subscriptionId
and is_active = 1
and effective_date > :now
;
>>
getEventsForSubscription() ::= <<
select
, record_id as total_ordering
from
where
subscription_id = :subscriptionId
and is_active = 1
;
>>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy