Class MLookupFactory

java.lang.Object
org.compiere.model.MLookupFactory

public class MLookupFactory extends Object
Factory to create MLookup instance.
Version:
$Id: MLookupFactory.java,v 1.3 2006/07/30 00:58:04 jjanke Exp $
Author:
Jorg Janke, Teo Sarca, SC ARHIPAC SERVICE SRL
  • BF [ 1734394 ] MLookupFactory.getLookup_TableDirEmbed is not translated
  • BF [ 1714261 ] MLookupFactory: TableDirEmbed -> TableEmbed not supported
  • BF [ 1672820 ] Sorting should be language-sensitive
  • BF [ 1739530 ] getLookup_TableDirEmbed error when BaseColumn is sql query
  • BF [ 1739544 ] getLookup_TableEmbed error for self referencing references
  • BF [ 1817768 ] Isolate hardcoded table direct columns, Teo Sarca
  • BF [ 2933367 ] Virtual Column Identifiers are not working https://sourceforge.net/p/adempiere/bugs/2291/, Carlos Ruiz, GlobalQSS
  • BF [ 2561593 ] Multi-tenant problem with webui
    • Constructor Details

      • MLookupFactory

        public MLookupFactory()
    • Method Details

      • get

        public static MLookup get(Properties ctx, int WindowNo, int Column_ID, int AD_Reference_ID, Language language, String ColumnName, int AD_Reference_Value_ID, boolean IsParent, String ValidationCode) throws Exception
        Create MLookup
        Parameters:
        ctx - context for access
        WindowNo - window no
        AD_Reference_ID - lookup display type
        Column_ID - AD_Column_ID or AD_Process_Para_ID
        language - language
        ColumnName - key column name
        AD_Reference_Value_ID - AD_Reference (List - AD_Ref_List, Table - AD_Ref_Table)
        IsParent - parent (prevents query to directly access value)
        ValidationCode - optional SQL validation/filter
        Returns:
        MLookup
        Throws:
        Exception - if Lookup could not be created
      • getLookupInfo

        public static MLookupInfo getLookupInfo(Properties ctx, int WindowNo, int Column_ID, int AD_Reference_ID)
        Parameters:
        ctx -
        WindowNo -
        Column_ID -
        AD_Reference_ID -
        Returns:
        MLookupInfo
      • getLookupInfo

        public static MLookupInfo getLookupInfo(Properties ctx, int WindowNo, int TabNo, int Column_ID, int AD_Reference_ID)
        Parameters:
        ctx -
        WindowNo -
        TabNo -
        Column_ID -
        AD_Reference_ID -
        Returns:
        MLookupInfo
      • get

        public static MLookup get(Properties ctx, int WindowNo, int TabNo, int Column_ID, int AD_Reference_ID)
        Create MLookup
        Parameters:
        ctx - context for access
        WindowNo - window no
        TabNo - TabNo
        Column_ID - AD_Column_ID or AD_Process_Para_ID
        AD_Reference_ID - display type
        Returns:
        MLookup
      • getLookupInfo

        public static MLookupInfo getLookupInfo(Properties ctx, int WindowNo, int Column_ID, int AD_Reference_ID, Language language, String ColumnName, int AD_Reference_Value_ID, boolean IsParent, String ValidationCode)
        Get Information for Lookups based on Column_ID for Table Columns or Process Parameters.
        Parameters:
        ctx - context for access
        language - report language
        WindowNo - window no
        Column_ID - AD_Column_ID or AD_Process_Para_ID
        ColumnName - key column name
        AD_Reference_ID - display type
        AD_Reference_Value_ID - AD_Reference (List, Table)
        IsParent - parent (prevents query to directly access value)
        ValidationCode - optional SQL validation
        Returns:
        lookup info structure
      • getLookupInfo

        public static MLookupInfo getLookupInfo(Properties ctx, int WindowNo, int tabNo, int Column_ID, int AD_Reference_ID, Language language, String ColumnName, int AD_Reference_Value_ID, boolean IsParent, String ValidationCode)
        Get Information for Lookups based on Column_ID for Table Columns or Process Parameters.
        Parameters:
        ctx - context for access
        language - report language
        WindowNo - window no
        tabNo - tab no
        Column_ID - AD_Column_ID or AD_Process_Para_ID
        ColumnName - key column name
        AD_Reference_ID - display type
        AD_Reference_Value_ID - AD_Reference (List, Table)
        IsParent - parent (prevents query to directly access value)
        ValidationCode - optional SQL validation
        Returns:
        lookup info structure
      • getLookup_List

        public static MLookupInfo getLookup_List(Language language, int AD_Reference_Value_ID)
        Get Lookup Info for List display type
        Parameters:
        language - language
        AD_Reference_Value_ID - list reference id (AD_Ref_List)
        Returns:
        MLookupInfo
      • getLookup_ListEmbed

        public static String getLookup_ListEmbed(Language language, int AD_Reference_Value_ID, String linkColumnName)
        Get Lookup SQL for List (for use as embedded query in SELECT)
        Parameters:
        language - Language
        AD_Reference_Value_ID - list reference id (AD_Ref_List)
        linkColumnName - link column name
        Returns:
        SELECT Name FROM AD_Ref_List WHERE AD_Reference_ID=x AND Value=linkColumn
      • getLookup_TableEmbed

        public static String getLookup_TableEmbed(Language language, String BaseColumn, String BaseTable, int AD_Reference_Value_ID)
        Get Embedded Lookup SQL for Table Lookup display type
        Parameters:
        language - language
        BaseColumn - base column name
        BaseTable - base table name
        AD_Reference_Value_ID - table reference id (AD_Ref_Table)
        Returns:
        SELECT Name FROM Table
      • getLookup_TableDirEmbed

        public static String getLookup_TableDirEmbed(Language language, String ColumnName, String BaseTable)
        Get embedded SQL for TableDir Lookup display type
        Parameters:
        language - language
        ColumnName - column name
        BaseTable - base table
        Returns:
        SELECT Column FROM TableName WHERE BaseTable.ColumnName=TableName.ColumnName
        See Also:
      • getLookup_TableDirEmbed

        public static String getLookup_TableDirEmbed(Language language, String ColumnName, String BaseTable, String BaseColumn)
        Get embedded SQL for TableDir Lookup display type
        Parameters:
        language - language
        ColumnName - column name
        BaseTable - base table
        BaseColumn - base column
        Returns:
        SELECT Column FROM TableName WHERE BaseTable.BaseColumn=TableName.ColumnName