Package org.idempiere.model
Class MappedModelFactory
java.lang.Object
org.idempiere.model.MappedModelFactory
- All Implemented Interfaces:
IModelFactory
,IMappedModelFactory
- Author:
- hengsin
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addMapping
(String tableName, Supplier<Class<?>> classSupplier, BiFunction<Integer, String, ? extends PO> recordIdFunction, BiFunction<String, String, ? extends PO> recordUUIDFunction, BiFunction<ResultSet, String, ? extends PO> resultSetFunction) add table name to class mappingvoid
addMapping
(String tableName, Supplier<Class<?>> classSupplier, BiFunction<Integer, String, ? extends PO> recordIdFunction, BiFunction<ResultSet, String, ? extends PO> resultSetFunction) add table name to class mappingClass<?>
Get Persistence Class for TableGet PO Class InstanceGet PO Class InstanceGet PO Class Instancevoid
removeMapping
(String tableName) remove table name to class mappingvoid
Scan packages for class withModel
annotation and add mapping for it
-
Constructor Details
-
MappedModelFactory
public MappedModelFactory()default constructor
-
-
Method Details
-
getClass
Description copied from interface:IModelFactory
Get Persistence Class for Table- Specified by:
getClass
in interfaceIModelFactory
- Parameters:
tableName
- table name- Returns:
- class or null
-
getPO
Description copied from interface:IModelFactory
Get PO Class Instance- Specified by:
getPO
in interfaceIModelFactory
Record_ID
- record- Returns:
- PO for Record or null
-
getPO
Description copied from interface:IModelFactory
Get PO Class Instance- Specified by:
getPO
in interfaceIModelFactory
Record_UU
- record UUID- Returns:
- PO for Record or null
-
getPO
Description copied from interface:IModelFactory
Get PO Class Instance- Specified by:
getPO
in interfaceIModelFactory
rs
- result settrxName
- transaction- Returns:
- PO for Record or null
-
addMapping
public void addMapping(String tableName, Supplier<Class<?>> classSupplier, BiFunction<Integer, String, ? extends PO> recordIdFunction, BiFunction<ResultSet, String, ? extends PO> resultSetFunction) Description copied from interface:IMappedModelFactory
add table name to class mapping- Specified by:
addMapping
in interfaceIMappedModelFactory
-
addMapping
public void addMapping(String tableName, Supplier<Class<?>> classSupplier, BiFunction<Integer, String, ? extends PO> recordIdFunction, BiFunction<String, String, ? extends PO> recordUUIDFunction, BiFunction<ResultSet, String, ? extends PO> resultSetFunction) Description copied from interface:IMappedModelFactory
add table name to class mapping- Specified by:
addMapping
in interfaceIMappedModelFactory
-
removeMapping
Description copied from interface:IMappedModelFactory
remove table name to class mapping- Specified by:
removeMapping
in interfaceIMappedModelFactory
-
scan
Description copied from interface:IMappedModelFactory
Scan packages for class withModel
annotation and add mapping for it- Specified by:
scan
in interfaceIMappedModelFactory
-