Package org.compiere.model
Class MLookupFactory
- java.lang.Object
-
- org.compiere.model.MLookupFactory
-
public class MLookupFactory extends Object
Create MLookups- 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
Constructors Constructor Description MLookupFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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 SQL for Listsstatic String
getLookup_ListEmbed(Language language, int AD_Reference_Value_ID, String linkColumnName)
Get Lookup SQL for Liststatic String
getLookup_TableDirEmbed(Language language, String ColumnName, String BaseTable)
Get embedded SQL for TableDir Lookupstatic String
getLookup_TableDirEmbed(Language language, String ColumnName, String BaseTable, String BaseColumn)
Get embedded SQL for TableDir Lookupstatic String
getLookup_TableEmbed(Language language, String BaseColumn, String BaseTable, int AD_Reference_Value_ID)
Get Embedded Lookup SQL for Table Lookupstatic 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.
-
-
-
Method Detail
-
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
- display typeColumn_ID
- AD_Column_ID or AD_Process_Para_IDlanguage
- report languageColumnName
- key column nameAD_Reference_Value_ID
- AD_Reference (List, Table)IsParent
- parent (prevents query to directly access value)ValidationCode
- optional SQL validation- 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)
-
getLookupInfo
public static MLookupInfo getLookupInfo(Properties ctx, int WindowNo, int TabNo, int Column_ID, int AD_Reference_ID)
-
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. The SQL returns three columns:Key, Value, Name, IsActive (where either key or value is null)
- 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. The SQL returns three columns:Key, Value, Name, IsActive (where either key or value is null)
- 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
public static MLookupInfo getLookup_List(Language language, int AD_Reference_Value_ID)
Get Lookup SQL for Lists- Parameters:
language
- report languageAD_Reference_Value_ID
- reference value- Returns:
- SELECT NULL, Value, Name, IsActive FROM AD_Ref_List
-
getLookup_ListEmbed
public static String getLookup_ListEmbed(Language language, int AD_Reference_Value_ID, String linkColumnName)
Get Lookup SQL for List- Parameters:
language
- report LanguageAD_Reference_Value_ID
- reference valuelinkColumnName
- 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- Parameters:
language
- report languageBaseColumn
- base column nameBaseTable
- base table nameAD_Reference_Value_ID
- reference value- Returns:
- SELECT Name FROM Table
-
getLookup_TableDirEmbed
public static String getLookup_TableDirEmbed(Language language, String ColumnName, String BaseTable)
Get embedded SQL for TableDir Lookup- Parameters:
language
- report languageColumnName
- column nameBaseTable
- base table- Returns:
- SELECT Column FROM TableName WHERE BaseTable.ColumnName=TableName.ColumnName
- See Also:
getLookup_TableDirEmbed(Language, String, String, String)
-
getLookup_TableDirEmbed
public static String getLookup_TableDirEmbed(Language language, String ColumnName, String BaseTable, String BaseColumn)
Get embedded SQL for TableDir Lookup- Parameters:
language
- report languageColumnName
- column nameBaseTable
- base tableBaseColumn
- base column- Returns:
- SELECT Column FROM TableName WHERE BaseTable.BaseColumn=TableName.ColumnName
-
-