Class Operator
java.lang.Object
ru.bitel.bgbilling.modules.phone.server.bean.oper.Operator
public abstract class Operator
extends java.lang.Object
Общий класс для каждого оператора (в каждом может быть несколько отчётов).
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
ABONENT_SNAPSHOT_TABLE_PREFIX
protected java.util.Map<java.lang.Integer,java.lang.Integer>
billingToOperServiceMap
protected int
id
protected java.lang.String
incorrectOperatorMessage
protected static org.apache.logging.log4j.Logger
log
protected int
mid
protected Preferences
moduleSetup
protected Preferences
operatorSetup
protected java.util.Map<java.lang.Integer,java.lang.Integer>
operToBillingServiceMap
protected java.util.List<java.lang.Integer>
serviceList
protected java.util.List<java.lang.Integer>
tariffList
-
Constructor Summary
Constructors Constructor Description Operator()
-
Method Summary
Modifier and Type Method Description abstract void
checkCorrectOperator()
Оператор должен проверить свои настройки и если что-то не так - кинуть экзепшен.protected void
clearSnapshot(java.sql.Connection con, java.util.Date month)
abstract void
createAbonentSnapshot(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)
int
getContractId()
int
getId()
protected java.sql.PreparedStatement
getInsertSnapshotPs(java.sql.Connection con, java.util.Date month)
java.util.Date
getLastPrevSnapshot(java.sql.Connection con, java.util.Date month)
int
getModuleId()
Preferences
getModuleSetup()
Preferences
getOperatorSetup()
java.util.Map<java.lang.Integer,java.lang.Integer>
getOperToBillingServiceMap()
Report
getReport(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.String
getTitle()
boolean
hasShapshot(java.sql.Connection con, java.util.Date month)
void
init(int id, int cid, java.lang.String title, int mid, Preferences moduleSetup, Preferences operatorSetup)
abstract boolean
needAbonentSnapshot()
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
- экзепшен с сообщением.
-