Package org.compiere.model
Class MLookupFactory
java.lang.Object
org.compiere.model.MLookupFactory
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic MLookup
get
(Properties ctx, int WindowNo, int TabNo, int Column_ID, int AD_Reference_ID) Create MLookupstatic 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) Create MLookupstatic MLookupInfo
getLookup_List
(Language language, int AD_Reference_Value_ID) Get Lookup Info for List display typestatic String
getLookup_ListEmbed
(Language language, int AD_Reference_Value_ID, String linkColumnName) Get Lookup SQL for List (for use as embedded query in SELECT)static String
getLookup_TableDirEmbed
(Language language, String ColumnName, String BaseTable) Get embedded SQL for TableDir Lookup display typestatic String
getLookup_TableDirEmbed
(Language language, String ColumnName, String BaseTable, String BaseColumn) Get embedded SQL for TableDir Lookup display typestatic String
getLookup_TableEmbed
(Language language, String BaseColumn, String BaseTable, int AD_Reference_Value_ID) Get Embedded Lookup SQL for Table Lookup display typestatic MLookupInfo
getLookupInfo
(Properties ctx, int WindowNo, int Column_ID, int AD_Reference_ID) static MLookupInfo
getLookupInfo
(Properties ctx, int WindowNo, int TabNo, int Column_ID, int AD_Reference_ID) 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.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.
-
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 accessWindowNo
- window noAD_Reference_ID
- lookup display typeColumn_ID
- AD_Column_ID or AD_Process_Para_IDlanguage
- languageColumnName
- key column nameAD_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 accessWindowNo
- window noTabNo
- TabNoColumn_ID
- AD_Column_ID or AD_Process_Para_IDAD_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 accesslanguage
- report languageWindowNo
- window noColumn_ID
- AD_Column_ID or AD_Process_Para_IDColumnName
- key column nameAD_Reference_ID
- display typeAD_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 accesslanguage
- report languageWindowNo
- window notabNo
- tab noColumn_ID
- AD_Column_ID or AD_Process_Para_IDColumnName
- key column nameAD_Reference_ID
- display typeAD_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
Get Lookup Info for List display type- Parameters:
language
- languageAD_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
- LanguageAD_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
- languageBaseColumn
- base column nameBaseTable
- base table nameAD_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
- languageColumnName
- column nameBaseTable
- 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
- languageColumnName
- column nameBaseTable
- base tableBaseColumn
- base column- Returns:
- SELECT Column FROM TableName WHERE BaseTable.BaseColumn=TableName.ColumnName
-