Class AbstractManager
java.lang.Object
ru.bitel.bgbilling.modules.bill.server.bean.AbstractManager
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
BillManager
,InvoiceManager
-
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 static final org.apache.logging.log4j.Logger
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) 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) final void
updatePositions
(int id, String posList, String identifierGovermentContract) final void
updatePositions
(int id, Element positions, int correction, String payDoc, String payDocDate, String identifierGovermentContract)
-
Field Details
-
log
protected static final org.apache.logging.log4j.Logger log -
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) throws ru.bitel.bgbilling.common.BGException - Throws:
ru.bitel.bgbilling.common.BGException
-
updatePositions
public final void updatePositions(int id, String posList, String identifierGovermentContract) throws ru.bitel.bgbilling.common.BGException - Throws:
ru.bitel.bgbilling.common.BGException
-
updatePositions
public final void updatePositions(int id, Element positions, int correction, String payDoc, String payDocDate, String identifierGovermentContract) throws ru.bitel.bgbilling.common.BGException - Throws:
ru.bitel.bgbilling.common.BGException
-
updateNumber
public String updateNumber(int id, int number, int numberYear, int numberMonth, Calendar date, int month, int year) throws ru.bitel.bgbilling.common.BGException - Throws:
ru.bitel.bgbilling.common.BGException
-
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 ru.bitel.bgbilling.common.BGException, SQLException - Throws:
ru.bitel.bgbilling.common.BGException
SQLException
-
addBillDocs
public void addBillDocs(int userId, InputStream billsXML, int yy, int mm, Date date, boolean checkPast) throws ru.bitel.bgbilling.common.BGException, SQLException - Throws:
ru.bitel.bgbilling.common.BGException
SQLException
-
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
-
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
-