public interface RemoteDataMgr
extends javax.ejb.EJBObject
Modifier and Type | Method and Description |
---|---|
void |
changeBalance(java.lang.String subscriberID,
java.lang.String accountName,
long amount,
long date,
boolean writeBalanceChange,
java.lang.String description)
Add the given amount to the balance (decreasing it if the amount is negative) and optionally create a balance change for the account as part of one database transaction.
|
void |
changeStatus(java.lang.String subscriberID,
java.lang.String accountName,
java.lang.String status,
boolean writeBalanceChange,
java.lang.String description)
Change the status for a specified account and optionally create a balance change as part of one database transaction.
|
void |
cleanup(java.lang.String subscriberID,
long time)
Cleanup sessions, sessionBalanceChanges and balanceChanges whose last update time is early than the given time.
|
void |
cleanup(java.lang.String subscriberID,
long time,
java.lang.String status)
Clean up accounts whose last update time is earlier than the given time and whose status equal to the given status.
|
void |
closeAccount(java.lang.String subscriberID,
java.lang.String accountName,
boolean writeBalanceChange,
java.lang.String description)
Close an account and optionally records the change to the balance change table as part of one database transaction.
|
void |
closeAccountsByName(java.lang.String accountName,
boolean writeBalanceChange,
java.lang.String description)
Close the named accounts for all subscribers.
|
void |
closeAccountsOfSubscriber(java.lang.String subscriberID,
boolean writeBalanceChange,
java.lang.String description)
Close accounts for a subscriber and optionally create balance changes for the accounts as part of one database transaction.
|
void |
deleteAccount(java.lang.String subscriberID,
java.lang.String accountName)
Delete an account.
|
void |
deleteAccountsByName(java.lang.String accountName)
Delete named accounts for all subacribers.
|
void |
deleteAccountsOfSubscriber(java.lang.String subscriberID)
Delete accounts for a subscriber.
|
void |
deleteBalanceChanges(java.lang.String subscriberID,
java.lang.String[] accountNames,
long start,
long end)
Delete balance changes in a given period for a set of accounts.
|
void |
deleteSession(java.lang.String subscriberID,
java.lang.String sessionId,
short qualifier)
Given a sessionId and qualifier, delete the session.
|
void |
deleteSessionBalanceChanges(java.lang.String subscriberID,
java.lang.String[] accountNames,
long start,
long end)
Delete session balance changes in a given period for a set of accounts.
|
void |
deleteSessions(java.lang.String sessionId)
Given a sessionId, delete the related sessions.
|
void |
deleteSessions(java.lang.String subscriberID,
long start,
long end)
Delete sessions starting within a given period for a subscriber.
|
AccountData |
getAccount(java.lang.String subscriberID,
java.lang.String accountName)
Get the named account for the given subscriber.
|
java.util.Collection |
getAccountsByName(java.lang.String accountName,
java.lang.String status)
Search for accounts by name and status.
|
java.util.Collection |
getAccountsOfSubscriber(java.lang.String subscriberID,
java.lang.String status)
Search for accounts with the given status for a subscriber.
|
java.util.List |
getAllBalanceChanges(java.lang.String subscriberID,
java.lang.String accountName,
long start,
long end)
Search for balance changes and session balance changes in a given time period for an account.
|
java.util.Collection |
getBalanceChanges(java.lang.String subscriberID,
java.lang.String accountName,
long start,
long end)
Search for balance changes in a given time period for an account.
|
SessionData |
getSession(java.lang.String subscriberID,
java.lang.String sessionId,
short qualifier)
Given a subscriber id, session id and a qualifer, return the session value object.
|
java.util.Collection |
getSessionBalanceChange(java.lang.String sessionId,
short qualifier)
Given a session id and a qualifier, return the session balance change value objects.
|
SessionBalanceChangeData |
getSessionBalanceChange(java.lang.String subscriberID,
java.lang.String accountName,
java.lang.String sessionId,
short qualifier)
Given a session id and a qualifier, return the session balance change record on a named account.
|
java.util.Map |
getSessionBalanceChanges(java.lang.String sessionId,
short qualifier,
java.lang.String subscriberID,
java.lang.String[] accountNames)
Given a sessionId and qualifier, get the related session balance changes on the named accounts.
|
java.util.Collection |
getSessionBalanceChanges(java.lang.String subscriberID,
java.lang.String accountName,
long start,
long end)
Search for session balance changes in a given time period for an account.
|
java.util.Collection |
getSessions(java.lang.String subscriberID,
long start,
long end,
java.lang.String status)
Get sessions with the given status starting within a given time period for a subscriber.
|
java.util.Collection |
getSessions(java.lang.String sessionId,
java.lang.String status)
Given the session id and status, return a collection of session value objects.
|
void |
openAccount(AccountData accountData,
boolean writeBalanceChange,
java.lang.String description)
Open an account and optionally create a balance change for the account as part of one database transaction.
|
void |
terminateSessions(java.lang.String[] subscriberIDs)
Terminates sessions for the subscriber.
|
void |
topUpBalance(java.lang.String[] subscriberIDs,
java.lang.String accountName,
long amount,
long date,
boolean writeBalanceChange,
java.lang.String description)
Top up the named accounts with the given amount for all subscribers.
|
void |
topUpBalance(java.lang.String[] subscriberIDs,
java.lang.String accountName,
java.lang.String status,
long amount,
long date,
boolean writeBalanceChange,
java.lang.String description)
Top up the named accounts with the given status to the given amount for subscribers.
|
java.lang.String |
updateAccounts(java.lang.String subscriberId,
java.lang.String accountName,
java.lang.String accountStatus,
java.lang.String newStatus,
long balanceAmount,
boolean amountIsDelta,
java.lang.String balanceChangeDescription,
boolean terminateSessions)
This method modifies accounts selected by subscriberId, accountName, and accountStatus arguments.
|
java.lang.String updateAccounts(java.lang.String subscriberId, java.lang.String accountName, java.lang.String accountStatus, java.lang.String newStatus, long balanceAmount, boolean amountIsDelta, java.lang.String balanceChangeDescription, boolean terminateSessions) throws javax.ejb.FinderException, javax.ejb.CreateException, java.rmi.RemoteException
FinderException
CreateException
java.lang.IllegalArgumentException
- If accountName is nulljava.rmi.RemoteException
void openAccount(AccountData accountData, boolean writeBalanceChange, java.lang.String description) throws javax.ejb.CreateException, java.rmi.RemoteException
accountData
- AccountData object carrying account informationwriteBalanceChange
- If true, an account balance change record will be written to the databasedescription
- description of account balance change recordCreateException
java.rmi.RemoteException
void closeAccount(java.lang.String subscriberID, java.lang.String accountName, boolean writeBalanceChange, java.lang.String description) throws javax.ejb.FinderException, javax.ejb.CreateException, java.rmi.RemoteException
subscriberID
- ID of the subscriber that the account belongs toaccountName
- name of the account to be closedwriteBalanceChange
- If true, an account balance change record will be written to the databasedescription
- description of account balance change recordCreateException
FinderException
java.rmi.RemoteException
void closeAccountsOfSubscriber(java.lang.String subscriberID, boolean writeBalanceChange, java.lang.String description) throws javax.ejb.FinderException, javax.ejb.CreateException, java.rmi.RemoteException
subscriberID
- ID of the subscriber whose accounts will be closedwriteBalanceChange
- If true, an account balance change record will be written to the databasedescription
- description of account balance change recordCreateException
FinderException
java.rmi.RemoteException
void closeAccountsByName(java.lang.String accountName, boolean writeBalanceChange, java.lang.String description) throws javax.ejb.FinderException, javax.ejb.CreateException, java.rmi.RemoteException
accountName
- name of the account to be closedwriteBalanceChange
- If true, an account balance change record will be written to the databasedescription
- description of account balance change recordCreateException
FinderException
java.rmi.RemoteException
void changeStatus(java.lang.String subscriberID, java.lang.String accountName, java.lang.String status, boolean writeBalanceChange, java.lang.String description) throws javax.ejb.FinderException, javax.ejb.CreateException, ChangeAccountException, java.rmi.RemoteException
subscriberID
- ID of the subscriberaccountName
- name of the accountstatus
- new status of the accountwriteBalanceChange
- If true, an account balance change record will be written to the databasedescription
- description of account balance change recordCreateException
FinderException
ChangeAccountException
java.rmi.RemoteException
void changeBalance(java.lang.String subscriberID, java.lang.String accountName, long amount, long date, boolean writeBalanceChange, java.lang.String description) throws javax.ejb.CreateException, javax.ejb.FinderException, ChangeAccountException, java.rmi.RemoteException
subscriberID
- ID of the subscriberaccountName
- name of the accountamount
- amount to be added to the balance of the accountdate
- account lastupdatetime field, in milliseconds since January 1, 1970 UTC, to be set towriteBalanceChange
- If true, an account balance change record will be written to the databasedescription
- description of account balance change recordCreateException
FinderException
ChangeAccountException
- if the account has been closedjava.rmi.RemoteException
void topUpBalance(java.lang.String[] subscriberIDs, java.lang.String accountName, long amount, long date, boolean writeBalanceChange, java.lang.String description) throws javax.ejb.CreateException, javax.ejb.FinderException, ChangeAccountException, java.rmi.RemoteException
subscriberIDs
- ID of subscribers to be topped upaccountName
- name of the account to be topped upamount
- amount to be added to the balance of each accountdate
- account lastupdatetime field, in milliseconds since January 1, 1970 UTC, to be set towriteBalanceChange
- If true, an account balance change record will be written to the databasedescription
- description of account balance change recordCreateException
FinderException
ChangeAccountException
- if the account has been closedjava.rmi.RemoteException
void topUpBalance(java.lang.String[] subscriberIDs, java.lang.String accountName, java.lang.String status, long amount, long date, boolean writeBalanceChange, java.lang.String description) throws javax.ejb.CreateException, javax.ejb.FinderException, ChangeAccountException, java.rmi.RemoteException
subscriberIDs
- ID of subscribers to be topped upaccountName
- name of the account to be topped upstatus
- status of account to be topped upamount
- amount to be added to the balance of each accountdate
- account lastupdatetime field, in milliseconds since January 1, 1970 UTC, to be set towriteBalanceChange
- If true, an account balance change record will be written to the databasedescription
- description of account balance change recordCreateException
FinderException
ChangeAccountException
- if the account has been closedjava.rmi.RemoteException
AccountData getAccount(java.lang.String subscriberID, java.lang.String accountName) throws javax.ejb.FinderException, java.rmi.RemoteException
subscriberID
- ID of the subscriberaccountName
- name of the accountFinderException
java.rmi.RemoteException
java.util.Collection getAccountsOfSubscriber(java.lang.String subscriberID, java.lang.String status) throws javax.ejb.FinderException, java.rmi.RemoteException
subscriberID
- ID of the subscriberstatus
- account status. If no status specified, it will return all accounts for the subscriber regardless their statuses.FinderException
java.rmi.RemoteException
java.util.Collection getAccountsByName(java.lang.String accountName, java.lang.String status) throws javax.ejb.FinderException, java.rmi.RemoteException
accountName
- name of the accountstatus
- status of the account. If no status specified, it will return all the named accounts regardless their status.FinderException
java.rmi.RemoteException
java.util.Collection getBalanceChanges(java.lang.String subscriberID, java.lang.String accountName, long start, long end) throws javax.ejb.FinderException, java.rmi.RemoteException
subscriberID
- ID of the subscriberaccountName
- name of the accountstart
- start time of the period to queryend
- end time of the period to queryFinderException
java.rmi.RemoteException
SessionBalanceChangeData getSessionBalanceChange(java.lang.String subscriberID, java.lang.String accountName, java.lang.String sessionId, short qualifier) throws javax.ejb.FinderException, java.rmi.RemoteException
subscriberID
- ID of the subscriberaccountName
- name of the accountsessionId
- ID of the session to queryqualifier
- qualifier of the session to queryFinderException
java.rmi.RemoteException
java.util.Collection getSessionBalanceChange(java.lang.String sessionId, short qualifier) throws javax.ejb.FinderException, java.rmi.RemoteException
sessionId
- ID of the session to queryqualifier
- qualifier of the session to queryFinderException
java.rmi.RemoteException
java.util.Collection getSessionBalanceChanges(java.lang.String subscriberID, java.lang.String accountName, long start, long end) throws javax.ejb.FinderException, java.rmi.RemoteException
subscriberID
- ID of the subscriberaccountName
- name of the accountstart
- start time of the period to queryend
- end time of the period to queryFinderException
java.rmi.RemoteException
java.util.Map getSessionBalanceChanges(java.lang.String sessionId, short qualifier, java.lang.String subscriberID, java.lang.String[] accountNames) throws javax.ejb.FinderException, java.rmi.RemoteException
sessionId
- ID of the session record to queryqualifier
- qualifier of the session record to querysubscriberID
- ID of the subscriberaccountNames
- name of the accountsFinderException
java.rmi.RemoteException
java.util.List getAllBalanceChanges(java.lang.String subscriberID, java.lang.String accountName, long start, long end) throws javax.ejb.FinderException, java.rmi.RemoteException
subscriberID
- ID of the subscriberaccountName
- name of the accountstart
- start time of the period to queryend
- end time of the period to queryFinderException
java.rmi.RemoteException
void terminateSessions(java.lang.String[] subscriberIDs) throws java.rmi.RemoteException
subscriberIDs
- ID of subscribers whose sessions will be terminatedjava.rmi.RemoteException
SessionData getSession(java.lang.String subscriberID, java.lang.String sessionId, short qualifier) throws javax.ejb.FinderException, java.rmi.RemoteException
subscriberID
- ID of the subscribersessionId
- ID of the session to queryqualifier
- qualifier of the session to queryFinderException
java.rmi.RemoteException
java.util.Collection getSessions(java.lang.String sessionId, java.lang.String status) throws javax.ejb.FinderException, java.rmi.RemoteException
sessionId
- ID of the session to querystatus
- status of the session to queryFinderException
java.rmi.RemoteException
java.util.Collection getSessions(java.lang.String subscriberID, long start, long end, java.lang.String status) throws javax.ejb.FinderException, java.rmi.RemoteException
subscriberID
- ID of the subscriberstatus
- status of session record to querystart
- start time of the period to queryend
- end time of the period to queryFinderException
java.rmi.RemoteException
void deleteAccount(java.lang.String subscriberID, java.lang.String accountName) throws javax.ejb.FinderException, javax.ejb.RemoveException, DeleteAccountException, java.rmi.RemoteException
subscriberID
- ID of the subscriberaccountName
- name of the accountFinderException
RemoveException
DeleteAccountException
- if the specified account is not closed.java.rmi.RemoteException
void deleteAccountsOfSubscriber(java.lang.String subscriberID) throws javax.ejb.FinderException, javax.ejb.RemoveException, java.rmi.RemoteException
subscriberID
- ID of the subscriberFinderException
RemoveException
java.rmi.RemoteException
void deleteAccountsByName(java.lang.String accountName) throws javax.ejb.FinderException, javax.ejb.RemoveException, java.rmi.RemoteException
accountName
- name of account to deleteFinderException
RemoveException
java.rmi.RemoteException
void deleteBalanceChanges(java.lang.String subscriberID, java.lang.String[] accountNames, long start, long end) throws javax.ejb.FinderException, javax.ejb.RemoveException, java.rmi.RemoteException
subscriberID
- ID of the subscriberaccountNames
- name of accountsstart
- start time of the period to queryend
- end time of the period to queryFinderException
RemoveException
java.rmi.RemoteException
void deleteSessionBalanceChanges(java.lang.String subscriberID, java.lang.String[] accountNames, long start, long end) throws javax.ejb.FinderException, javax.ejb.RemoveException, java.rmi.RemoteException
subscriberID
- ID of the subscriberaccountNames
- name of accountsstart
- start time of the period to queryend
- end time of the period to queryFinderException
RemoveException
java.rmi.RemoteException
void deleteSession(java.lang.String subscriberID, java.lang.String sessionId, short qualifier) throws javax.ejb.FinderException, javax.ejb.RemoveException, DeleteSessionException, java.rmi.RemoteException
Only stopped sessions, or closed sessions for which there is a subsequent stopped session, may be deleted. If the specified session may not be deleted, a DeleteSessionException will be thrown.
subscriberID
- ID of the subscribersessionId
- ID of session recordqualifier
- qualifier of session record to deleteDeleteSessionException
- if the specified session is not closedFinderException
RemoveException
java.rmi.RemoteException
void deleteSessions(java.lang.String sessionId) throws javax.ejb.FinderException, javax.ejb.RemoveException, DeleteSessionException, java.rmi.RemoteException
Only stopped sessions, or closed sessions for which there is a subsequent stopped session, may be deleted. If the specified sessions may not be deleted, a DeleteSessionException will be thrown.
sessionId
- ID of a sessionFinderException
RemoveException
DeleteSessionException
java.rmi.RemoteException
void deleteSessions(java.lang.String subscriberID, long start, long end) throws javax.ejb.FinderException, javax.ejb.RemoveException, java.rmi.RemoteException
Only stopped sessions, or closed sessions for which there is a subsequent stopped session, may be deleted. Sessions that satisfy this condition will be deleted. If any of the specified sessions do not satisfy this condition they will not be deleted. Instead, they will be listed in a message in the debug log.
subscriberID
- ID of the subscriberstart
- start time of the period to queryend
- end time of the period to queryFinderException
RemoveException
java.rmi.RemoteException
void cleanup(java.lang.String subscriberID, long time, java.lang.String status) throws javax.ejb.FinderException, javax.ejb.RemoveException, java.rmi.RemoteException
subscriberID
- ID of the subscribertime
- the earliest lastupdatetime of accounts to clean upstatus
- status of accounts to clean upFinderException
RemoveException
java.rmi.RemoteException
void cleanup(java.lang.String subscriberID, long time) throws javax.ejb.FinderException, javax.ejb.RemoveException, java.rmi.RemoteException
Only stopped sessions, or closed sessions for which there is a subsequent stopped session, may be deleted. Sessions that satisfy this condition will be deleted. If any of the specified sessions do not satisfy this condition they will not be deleted. Instead, they will be listed in a message in the debug log.
subscriberID
- ID of the subscribertime
- the earliest lastupdatetime of accounts to clean upFinderException
RemoveException
java.rmi.RemoteException