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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMapping(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 documentvoidremoveMapping(String gaap, String tableName) Remove mappingMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.adempiere.base.IDocFactory
getDocument
-
Constructor Details
-
MappedDocumentFactory
public MappedDocumentFactory()default constructor
-
-
Method Details
-
getDocument
Description copied from interface:IDocFactoryCreate Posting document- Specified by:
getDocumentin 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:IMappedDocumentFactoryadd table name + gaap (optional) to Doc mapping- Specified by:
addMappingin interfaceIMappedDocumentFactory- Parameters:
gaap- map to c_acctschema.gaap (optional)
-
removeMapping
Description copied from interface:IMappedDocumentFactoryRemove mapping- Specified by:
removeMappingin interfaceIMappedDocumentFactory
-