IDEMPIERE-4168 Move Webstore out of core

This commit is contained in:
Carlos Ruiz 2020-04-13 15:21:26 +02:00
parent 455ed28e92
commit 4966285971
2 changed files with 9 additions and 4 deletions

View File

@ -248,7 +248,6 @@ public class ModelClassGenerator
.append(" public String toString()").append(NL)
.append(" {").append(NL)
.append(" StringBuilder sb = new StringBuilder (\"").append(className).append("[\")").append(NL)
// TODO: generate getName if there is a Name column -- .append(",Name=").append(getName())
.append(" .append(get_ID())");
if (hasName)
start.append(".append(\",Name=\").append(getName())");
@ -905,6 +904,9 @@ public class ModelClassGenerator
if (tableLike.toString().contains("%")) {
filterViews = "AND (TableName IN ('RV_WarehousePrice','RV_BPartner') OR IsView='N')"; // special views
}
if (tableLike.toString().equals("'%'")) {
filterViews += " AND TableName NOT LIKE 'W|_%' ESCAPE '|'"; // exclude webstore from general model generator
}
StringBuilder sql = new StringBuilder();
sql.append("SELECT AD_Table_ID ")
.append("FROM AD_Table ")

View File

@ -775,9 +775,9 @@ public class ModelInterfaceGenerator
if (tableName == null || tableName.trim().length() == 0)
throw new IllegalArgumentException("Must specify table name");
String tableLike = tableName.trim();
if (!tableLike.startsWith("'") || !tableLike.endsWith("'"))
tableLike = "'" + tableLike + "'";
StringBuilder tableLike = new StringBuilder().append(tableName.trim());
if (!tableLike.toString().startsWith("'") || !tableLike.toString().endsWith("'"))
tableLike = new StringBuilder("'").append(tableLike).append("'");
StringBuilder entityTypeFilter = new StringBuilder();
if (entityType != null && entityType.trim().length() > 0)
@ -821,6 +821,9 @@ public class ModelInterfaceGenerator
if (tableLike.toString().contains("%")) {
filterViews = "AND (TableName IN ('RV_WarehousePrice','RV_BPartner') OR IsView='N')"; // special views
}
if (tableLike.toString().equals("'%'")) {
filterViews += " AND TableName NOT LIKE 'W|_%' ESCAPE '|'"; // exclude webstore from general model generator
}
StringBuilder sql = new StringBuilder();
sql.append("SELECT AD_Table_ID ")
.append("FROM AD_Table ")