Class AbstractManager
java.lang.Object
ru.bitel.bgbilling.kernel.base.server.logger.BGLogger
ru.bitel.bgbilling.modules.bill.server.bean.AbstractManager
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
BillManager
,InvoiceManager
public abstract class AbstractManager
extends ru.bitel.bgbilling.kernel.base.server.logger.BGLogger
implements AutoCloseable
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
protected Connection
protected final ContractManager
static final int
static final int
protected int
Deprecated.protected int
protected Preferences
protected Setup
protected String
static final int
static final int
static final int
static final int
static final int
static final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
addBillDoc
(int userId, BillDoc billDoc, List<PositionValue> posList, List<BillDoc> subList) abstract int
addBillDoc
(int userId, BillDoc billDoc, List<PositionValue> posList, List<BillDoc> subList, boolean checkPast) protected void
addBillDocData
(Connection con, BillDoc billDoc, List<PositionValue> posList, List<BillDoc> subList, XMLStreamWriter doc, Contract contract) void
addBillDocs
(int userId, InputStream billsXML, int yy, int mm, Date date) void
addBillDocs
(int userId, InputStream billsXML, int yy, int mm, Date date, boolean checkPast) protected void
addNameCol
(String nameSortParam, int sortMode, int secSortMode, StringBuffer query) protected void
addNameJoin
(String nameSortParam, int sortMode, int secSortMode, StringBuffer query) protected void
addPackageFilterJoin
(int packageParamId, int packageId, int sortMode, StringBuffer query) protected void
addSortMode
(int addressSortParam, String nameSortParam, int sortMode, int secondarySortMode, StringBuffer query) protected void
addStreetCol
(int addressSortParam, int sortMode, int secSortMode, StringBuffer query, boolean forRegister) protected void
addStreetJoin
(int addressSortParam, int sortMode, int secSortMode, StringBuffer query, boolean forRegister) void
close()
final void
delete
(int id) final void
Deprecated.use delete(Iterable ids)final void
delete
(Collection<?> ids) protected abstract BillDoc
getBillDoc
(Attributes attributes) protected abstract BillDoc
getBillDoc
(XMLUtils.BGXMLEventReader reader, StartElement element) getBillDocInfo
(int id) Возвращает подмножество общих полей из bill/invoice в виде родительского BillDoc.protected final int[]
getNextNumbers
(Connection con, int numberPoolId, int yy, int mm) final byte[]
getXMLData
(int id) Получение данных xml-ки документа по id.final byte[]
getXMLData
(int contractId, int id) Получение данных xml-ки документа по contractId и id.protected abstract void
publishEvent
(int userID, BillDoc billDoc, int billId) protected void
setBankAccount
(Bill bill, int bankAccountId) protected void
setOrganization
(BillDoc billDoc, int organizationId) updateNumber
(int id, int number, int numberYear, int numberMonth, Calendar date, int month, int year) final void
updatePositions
(int id, String posList, int correction, String payDocData, String identifierGovermentContract, String shipmentDocument) final void
updatePositions
(int id, String posList, String identifierGovermentContract, String shipmentDocument) final void
updatePositions
(int id, Element positions, int correction, String payDoc, String payDocDate, String identifierGovermentContract, String shipmentDocument) Methods inherited from class ru.bitel.bgbilling.kernel.base.server.logger.BGLogger
error, error, error, getLogger, logError, logError
-
Field Details
-
DT_CREATED
public static final int DT_CREATED- See Also:
-
DT_PAYED
public static final int DT_PAYED- See Also:
-
BILL_NEW
public static final int BILL_NEW- See Also:
-
BILL_PAYED
public static final int BILL_PAYED- See Also:
-
BILL_ALL
public static final int BILL_ALL- See Also:
-
USER_ALL
public static final int USER_ALL- See Also:
-
USER_ADMIN
public static final int USER_ADMIN- See Also:
-
USER_USER
public static final int USER_USER- See Also:
-
UT_NOTUNLOADED
public static final int UT_NOTUNLOADED- See Also:
-
UT_UNLOADED
public static final int UT_UNLOADED- See Also:
-
UT_ALL
public static final int UT_ALL- See Also:
-
con
-
mid
Deprecated. -
moduleId
protected int moduleId -
setup
-
moduleSetup
-
table
-
contractManager
-
-
Constructor Details
-
AbstractManager
-
-
Method Details
-
getXMLData
public final byte[] getXMLData(int contractId, int id) Получение данных xml-ки документа по contractId и id. Нужно учесть, что кодировка неизвестна. До перехода на utf-8 байты лежали в cp1251, оно же было прописано в хедере самой xml-ки. Потому работать надо только через parseDocument итд.- Returns:
- массив байтов - представление xml.
-
getXMLData
public final byte[] getXMLData(int id) Получение данных xml-ки документа по id. Нужно учесть, что кодировка неизвестна. До перехода на utf-8 байты лежали в cp1251, оно же было прописано в хедере самой xml-ки. Потому работать надо только через parseDocument итд.- Returns:
- массив байтов - представление xml.
-
delete
public final void delete(int id) -
delete
Deprecated.use delete(Iterable ids) -
delete
- Throws:
ru.bitel.bgbilling.common.BGException
-
updatePositions
public final void updatePositions(int id, String posList, int correction, String payDocData, String identifierGovermentContract, String shipmentDocument) throws Exception - Throws:
Exception
-
updatePositions
public final void updatePositions(int id, String posList, String identifierGovermentContract, String shipmentDocument) throws Exception - Throws:
Exception
-
updatePositions
public final void updatePositions(int id, Element positions, int correction, String payDoc, String payDocDate, String identifierGovermentContract, String shipmentDocument) throws Exception - Throws:
Exception
-
updateNumber
public String updateNumber(int id, int number, int numberYear, int numberMonth, Calendar date, int month, int year) throws Exception - Throws:
Exception
-
addPackageFilterJoin
protected void addPackageFilterJoin(int packageParamId, int packageId, int sortMode, StringBuffer query) -
addSortMode
protected void addSortMode(int addressSortParam, String nameSortParam, int sortMode, int secondarySortMode, StringBuffer query) -
addStreetCol
protected void addStreetCol(int addressSortParam, int sortMode, int secSortMode, StringBuffer query, boolean forRegister) -
addStreetJoin
protected void addStreetJoin(int addressSortParam, int sortMode, int secSortMode, StringBuffer query, boolean forRegister) -
addNameCol
-
addNameJoin
-
getNextNumbers
-
addBillDocs
public void addBillDocs(int userId, InputStream billsXML, int yy, int mm, Date date) throws Exception - Throws:
Exception
-
addBillDocs
public void addBillDocs(int userId, InputStream billsXML, int yy, int mm, Date date, boolean checkPast) throws Exception - Throws:
Exception
-
addBillDocData
protected void addBillDocData(Connection con, BillDoc billDoc, List<PositionValue> posList, List<BillDoc> subList, XMLStreamWriter doc, Contract contract) throws XMLStreamException - Throws:
XMLStreamException
-
addBillDoc
public int addBillDoc(int userId, BillDoc billDoc, List<PositionValue> posList, List<BillDoc> subList) - Returns:
- - id созданного счета
-
addBillDoc
public abstract int addBillDoc(int userId, BillDoc billDoc, List<PositionValue> posList, List<BillDoc> subList, boolean checkPast) -
getBillDoc
-
getBillDoc
-
setBankAccount
-
setOrganization
-
getBillDocInfo
Возвращает подмножество общих полей из bill/invoice в виде родительского BillDoc. Можно рассматривать как легковесную альтернативу для getBill/getInvoice, или если тип неизвестен.- Throws:
ru.bitel.bgbilling.common.BGException
-
publishEvent
protected abstract void publishEvent(int userID, BillDoc billDoc, int billId) throws ru.bitel.bgbilling.common.BGException - Throws:
ru.bitel.bgbilling.common.BGException
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-