Package io.surati.gap.payment.base.db
Class DbPaymentOrderGroup
- java.lang.Object
-
- io.surati.gap.payment.base.db.DbPaymentOrderGroup
-
- All Implemented Interfaces:
PaymentOrderGroup
public final class DbPaymentOrderGroup extends Object implements PaymentOrderGroup
-
-
Field Summary
-
Fields inherited from interface io.surati.gap.payment.base.api.PaymentOrderGroup
EMPTY
-
-
Constructor Summary
Constructors Constructor Description DbPaymentOrderGroup(DataSource source, Long id)
Ctor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BankAccount
accountToUse()
ThirdParty
beneficiary()
void
cancelExecution(io.surati.gap.admin.base.api.User author, boolean sentbackinpayment)
void
changeBeneficiary(ThirdParty tp)
Long
count()
LocalDate
dueDate()
void
execute()
PaymentOrder
get(Long id)
boolean
has(PaymentOrder item)
Long
id()
boolean
isHetero()
Can accept orders of different beneficiaries.Iterable<PaymentOrder>
iterate()
PaymentMeanType
meanType()
void
sendBackInPreparation()
PaymentOrderStatus
status()
Double
totalAmount()
void
update(PaymentMeanType meantype, LocalDate duedate)
void
useAccount(BankAccount account)
void
validate(io.surati.gap.admin.base.api.User author)
-
-
-
Constructor Detail
-
DbPaymentOrderGroup
public DbPaymentOrderGroup(DataSource source, Long id)
Ctor.- Parameters:
source
- Data source
-
-
Method Detail
-
iterate
public Iterable<PaymentOrder> iterate()
- Specified by:
iterate
in interfacePaymentOrderGroup
-
get
public PaymentOrder get(Long id)
- Specified by:
get
in interfacePaymentOrderGroup
-
has
public boolean has(PaymentOrder item)
- Specified by:
has
in interfacePaymentOrderGroup
-
count
public Long count()
- Specified by:
count
in interfacePaymentOrderGroup
-
totalAmount
public Double totalAmount()
- Specified by:
totalAmount
in interfacePaymentOrderGroup
-
accountToUse
public BankAccount accountToUse()
- Specified by:
accountToUse
in interfacePaymentOrderGroup
-
beneficiary
public ThirdParty beneficiary()
- Specified by:
beneficiary
in interfacePaymentOrderGroup
-
useAccount
public void useAccount(BankAccount account)
- Specified by:
useAccount
in interfacePaymentOrderGroup
-
validate
public void validate(io.surati.gap.admin.base.api.User author)
- Specified by:
validate
in interfacePaymentOrderGroup
-
sendBackInPreparation
public void sendBackInPreparation()
- Specified by:
sendBackInPreparation
in interfacePaymentOrderGroup
-
status
public PaymentOrderStatus status()
- Specified by:
status
in interfacePaymentOrderGroup
-
id
public Long id()
- Specified by:
id
in interfacePaymentOrderGroup
-
execute
public void execute()
- Specified by:
execute
in interfacePaymentOrderGroup
-
cancelExecution
public void cancelExecution(io.surati.gap.admin.base.api.User author, boolean sentbackinpayment)
- Specified by:
cancelExecution
in interfacePaymentOrderGroup
-
meanType
public PaymentMeanType meanType()
- Specified by:
meanType
in interfacePaymentOrderGroup
-
dueDate
public LocalDate dueDate()
- Specified by:
dueDate
in interfacePaymentOrderGroup
-
update
public void update(PaymentMeanType meantype, LocalDate duedate)
- Specified by:
update
in interfacePaymentOrderGroup
-
isHetero
public boolean isHetero()
Description copied from interface:PaymentOrderGroup
Can accept orders of different beneficiaries.- Specified by:
isHetero
in interfacePaymentOrderGroup
- Returns:
-
changeBeneficiary
public void changeBeneficiary(ThirdParty tp)
- Specified by:
changeBeneficiary
in interfacePaymentOrderGroup
-
-