Package org.adempiere.base
Class MappedDocumentFactory
java.lang.Object
org.adempiere.base.MappedDocumentFactory
- All Implemented Interfaces:
IDocFactory
,IMappedDocumentFactory
Document factory backed by map between tablename + gaap and lambda function object.
If you create a subclass of this and register it as osgi service, don't register for the IMappedDocumentFactory interface.
If you create a subclass of this and register it as osgi service, don't register for the IMappedDocumentFactory interface.
- Author:
- hengsin
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.adempiere.base.IMappedDocumentFactory
IMappedDocumentFactory.Parameter
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addMapping
(String gaap, String tableName, Function<IMappedDocumentFactory.Parameter, ? extends Doc> supplier) add table name + gaap (optional) to Doc mappinggetDocument
(MAcctSchema as, int AD_Table_ID, ResultSet rs, String trxName) Create Posting documentvoid
removeMapping
(String gaap, String tableName) Remove mappingMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.adempiere.base.IDocFactory
getDocument
-
Constructor Details
-
MappedDocumentFactory
public MappedDocumentFactory()default constructor
-
-
Method Details
-
getDocument
Description copied from interface:IDocFactory
Create Posting document- Specified by:
getDocument
in interfaceIDocFactory
- Parameters:
as
- accounting schemaAD_Table_ID
- Table ID of Documentsrs
- ResultSettrxName
- transaction name- Returns:
- Document
-
addMapping
public void addMapping(String gaap, String tableName, Function<IMappedDocumentFactory.Parameter, ? extends Doc> supplier) Description copied from interface:IMappedDocumentFactory
add table name + gaap (optional) to Doc mapping- Specified by:
addMapping
in interfaceIMappedDocumentFactory
- Parameters:
gaap
- map to c_acctschema.gaap (optional)
-
removeMapping
Description copied from interface:IMappedDocumentFactory
Remove mapping- Specified by:
removeMapping
in interfaceIMappedDocumentFactory
-