Class Operator
java.lang.Object
ru.bitel.bgbilling.modules.voice.server.bean.operator.Operator
public abstract class Operator
extends java.lang.Object
Общий класс для каждого оператора (в каждом может быть несколько отчётов).
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringABONENT_SNAPSHOT_TABLE_PREFIXprotected java.util.Map<java.lang.Integer,java.lang.Integer>billingToOperServiceMapprotected intidprotected java.lang.StringincorrectOperatorMessageprotected static org.apache.logging.log4j.Loggerlogprotected intmidprotected PreferencesmoduleSetupprotected PreferencesoperatorSetupprotected java.util.Map<java.lang.Integer,java.lang.Integer>operToBillingServiceMapprotected java.util.List<java.lang.Integer>serviceListprotected java.util.List<java.lang.Integer>tariffList -
Constructor Summary
Constructors Constructor Description Operator() -
Method Summary
Modifier and Type Method Description abstract voidcheckCorrectOperator()Оператор должен проверить свои настройки и если что-то не так - кинуть экзепшен.protected voidclearSnapshot(java.sql.Connection con, java.util.Date month)abstract voidcreateAbonentSnapshot(java.sql.Connection con, java.util.Date month)java.util.Map<java.lang.Integer,java.lang.Integer>getBillingToOperServiceMap()java.util.Set<java.lang.Integer>getChangedAbonents(java.sql.Connection con, java.util.Date toMonth)intgetContractId()intgetId()protected java.sql.PreparedStatementgetInsertSnapshotPs(java.sql.Connection con, java.util.Date month)java.util.DategetLastPrevSnapshot(java.sql.Connection con, java.util.Date month)intgetModuleId()PreferencesgetModuleSetup()PreferencesgetOperatorSetup()java.util.Map<java.lang.Integer,java.lang.Integer>getOperToBillingServiceMap()ReportgetReport(int id, java.util.Date month)java.util.List<Report>getReportList(java.util.Date month)abstract java.util.List<Report>getReportList(java.util.Date month, boolean hasSnapshot)java.util.List<java.lang.Integer>getServiceList()java.util.List<java.lang.Integer>getTariffList()java.lang.StringgetTitle()booleanhasShapshot(java.sql.Connection con, java.util.Date month)voidinit(int id, int cid, java.lang.String title, int mid, Preferences moduleSetup, Preferences operatorSetup)abstract booleanneedAbonentSnapshot()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
log
protected static org.apache.logging.log4j.Logger log -
id
protected int id -
mid
protected int mid -
moduleSetup
-
operatorSetup
-
serviceList
protected java.util.List<java.lang.Integer> serviceList -
tariffList
protected java.util.List<java.lang.Integer> tariffList -
billingToOperServiceMap
protected java.util.Map<java.lang.Integer,java.lang.Integer> billingToOperServiceMap -
operToBillingServiceMap
protected java.util.Map<java.lang.Integer,java.lang.Integer> operToBillingServiceMap -
ABONENT_SNAPSHOT_TABLE_PREFIX
protected static final java.lang.String ABONENT_SNAPSHOT_TABLE_PREFIX- See Also:
- Constant Field Values
-
incorrectOperatorMessage
protected java.lang.String incorrectOperatorMessage
-
-
Constructor Details
-
Operator
public Operator()
-
-
Method Details
-
init
public void init(int id, int cid, java.lang.String title, int mid, Preferences moduleSetup, Preferences operatorSetup) -
getId
public int getId() -
getTitle
public java.lang.String getTitle() -
getModuleId
public int getModuleId() -
getContractId
public int getContractId() -
getServiceList
public java.util.List<java.lang.Integer> getServiceList() -
getBillingToOperServiceMap
public java.util.Map<java.lang.Integer,java.lang.Integer> getBillingToOperServiceMap() -
getOperatorSetup
-
getOperToBillingServiceMap
public java.util.Map<java.lang.Integer,java.lang.Integer> getOperToBillingServiceMap() -
getModuleSetup
-
hasShapshot
public boolean hasShapshot(java.sql.Connection con, java.util.Date month) -
getLastPrevSnapshot
public java.util.Date getLastPrevSnapshot(java.sql.Connection con, java.util.Date month) -
getInsertSnapshotPs
protected java.sql.PreparedStatement getInsertSnapshotPs(java.sql.Connection con, java.util.Date month) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
clearSnapshot
protected void clearSnapshot(java.sql.Connection con, java.util.Date month) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
getChangedAbonents
public java.util.Set<java.lang.Integer> getChangedAbonents(java.sql.Connection con, java.util.Date toMonth) -
getReport
-
needAbonentSnapshot
public abstract boolean needAbonentSnapshot() -
createAbonentSnapshot
public abstract void createAbonentSnapshot(java.sql.Connection con, java.util.Date month) -
getReportList
-
getReportList
-
getTariffList
public java.util.List<java.lang.Integer> getTariffList() -
checkCorrectOperator
public abstract void checkCorrectOperator() throws ru.bitel.bgbilling.common.BGExceptionОператор должен проверить свои настройки и если что-то не так - кинуть экзепшен.- Throws:
ru.bitel.bgbilling.common.BGException- экзепшен с сообщением.
-