IDEMPIERE-308 / revert partially to fix NPE

This commit is contained in:
Carlos Ruiz 2012-10-08 22:24:23 -05:00
parent dba1c54c91
commit 6379097ac1
1 changed files with 10 additions and 10 deletions

View File

@ -634,13 +634,13 @@ public class ModelInterfaceGenerator
public static String getReferenceClassName(int AD_Table_ID, String columnName, int displayType, int AD_Reference_ID)
{
StringBuilder referenceClassName = null;
String referenceClassName = null;
//
if (displayType == DisplayType.TableDir
|| (displayType == DisplayType.Search && AD_Reference_ID == 0))
{
String refTableName = MQuery.getZoomTableName(columnName); // teo_sarca: BF [ 1817768 ] Isolate hardcoded table direct columns
referenceClassName = new StringBuilder("I_").append(refTableName);
referenceClassName = "I_"+refTableName;
MTable table = MTable.get(Env.getCtx(), refTableName);
if (table != null)
@ -649,7 +649,7 @@ public class ModelInterfaceGenerator
String modelpackage = getModelPackage(entityType) ;
if (modelpackage != null)
{
referenceClassName = new StringBuilder(modelpackage).append(".").append(referenceClassName);
referenceClassName = modelpackage+"."+referenceClassName;
}
if (!isGenerateModelGetterForEntity(AD_Table_ID, entityType))
{
@ -691,11 +691,11 @@ public class ModelInterfaceGenerator
final int refDisplayType = rs.getInt(3);
if (refDisplayType == DisplayType.ID)
{
referenceClassName = new StringBuilder("I_").append(refTableName);
referenceClassName = "I_"+refTableName;
String modelpackage = getModelPackage(entityType);
if (modelpackage != null)
{
referenceClassName = new StringBuilder(modelpackage).append(".").append(referenceClassName);
referenceClassName = modelpackage+"."+referenceClassName;
}
if (!isGenerateModelGetterForEntity(AD_Table_ID, entityType))
{
@ -716,19 +716,19 @@ public class ModelInterfaceGenerator
}
else if (displayType == DisplayType.Location)
{
referenceClassName = new StringBuilder("I_C_Location");
referenceClassName = "I_C_Location";
}
else if (displayType == DisplayType.Locator)
{
referenceClassName = new StringBuilder("I_M_Locator");
referenceClassName = "I_M_Locator";
}
else if (displayType == DisplayType.Account)
{
referenceClassName = new StringBuilder("I_C_ValidCombination");
referenceClassName = "I_C_ValidCombination";
}
else if (displayType == DisplayType.PAttribute)
{
referenceClassName = new StringBuilder("I_M_AttributeSetInstance");
referenceClassName = "I_M_AttributeSetInstance";
}
else
{
@ -736,7 +736,7 @@ public class ModelInterfaceGenerator
//sb.append("\tpublic I_"+columnName+" getI_").append(columnName).append("(){return null; };");
}
//
return referenceClassName.toString();
return referenceClassName;
}