Class AbstractModelFactory

java.lang.Object
org.adempiere.base.AbstractModelFactory
All Implemented Interfaces:
IModelFactory
Direct Known Subclasses:
DefaultModelFactory

public abstract class AbstractModelFactory extends Object implements IModelFactory
Provides basic functionality for PO resolution and instantiation. Based on legacy code in MTable.
Author:
Jorg Janke, hengsin
  • Constructor Details

    • AbstractModelFactory

      public AbstractModelFactory()
  • Method Details

    • getPO

      public PO getPO(String tableName, int Record_ID, String trxName)
      Get PO Class Instance
      Specified by:
      getPO in interface IModelFactory
      Record_ID - record
      Returns:
      PO for Record or null
    • getPO

      public static PO getPO(Class<?> clazz, String tableName, int Record_ID, String trxName)
      Parameters:
      clazz -
      tableName -
      Record_ID -
      trxName -
      Returns:
      new PO instance
    • getPO

      public PO getPO(String tableName, String Record_UU, String trxName)
      Get PO Class Instance
      Specified by:
      getPO in interface IModelFactory
      Record_UU - record UUID
      Returns:
      PO for Record or null
    • getPO

      public static PO getPO(Class<?> clazz, String tableName, String Record_UU, String trxName)
      Parameters:
      clazz -
      tableName -
      Record_UU -
      trxName -
      Returns:
      new PO instance
    • getPO

      public PO getPO(String tableName, ResultSet rs, String trxName)
      Get PO Class Instance
      Specified by:
      getPO in interface IModelFactory
      rs - result set
      trxName - transaction
      Returns:
      PO for Record or null
    • getPO

      public static PO getPO(Class<?> clazz, String tableName, ResultSet rs, String trxName)
      Parameters:
      clazz -
      tableName -
      rs -
      trxName -
      Returns:
      new PO instance