Ability to generate interfaces and classes for specific tables.

This commit is contained in:
trifonnt 2008-10-21 09:57:44 +00:00
parent 9a05b3b91a
commit 3dd9e1f820
3 changed files with 8 additions and 1 deletions

View File

@ -107,7 +107,9 @@ public class GenerateModel
log.info(sql.toString());
log.info("----------------------------------");
String tableLike = "'%'"; // All tables
String tableLike = null;
tableLike = "'%'"; // All tables
// tableLike = "'AD_OrgInfo', 'AD_Role', 'C_CashLine', 'C_Currency', 'C_Invoice', 'C_Order', 'C_Payment', 'M_InventoryLine', 'M_PriceList', 'M_Product', 'U_POSTerminal'"; // Only specific tables
if (args.length > 3)
tableLike = args[3];
log.info("Table Like: " + tableLike);
@ -119,6 +121,7 @@ public class GenerateModel
+ " OR IsView='N')"
+ " AND IsActive = 'Y' AND TableName NOT LIKE '%_Trl' AND ");
sql.append(" AND TableName LIKE ").append(tableLike);
//sql.append(" AND TableName IN (").append(tableLike).append(")"); // only specific tables
sql.append(" ORDER BY TableName");

View File

@ -1002,6 +1002,7 @@ public class ModelClassGenerator
log.info("----------------------------------");
String tableLike = "'%'"; // All tables
//tableLike = "'AD_OrgInfo', 'AD_Role', 'C_CashLine', 'C_Currency', 'C_Invoice', 'C_Order', 'C_Payment', 'M_InventoryLine', 'M_PriceList', 'M_Product', 'U_POSTerminal'";
if (args.length > 3)
tableLike = args[3];
log.info("Table Like: " + tableLike);
@ -1013,6 +1014,7 @@ public class ModelClassGenerator
+ " OR IsView='N')"
+ " AND IsActive = 'Y' AND TableName NOT LIKE '%_Trl' AND ");
sql.append(" AND TableName LIKE ").append(tableLike);
//sql.append(" AND TableName IN (").append( tableLike ).append(")");
sql.append(" ORDER BY TableName");

View File

@ -581,6 +581,7 @@ public class ModelInterfaceGenerator {
// Table name like
String tableLike = "'%'"; // All tables
//tableLike = "'AD_OrgInfo', 'AD_Role', 'C_CashLine', 'C_Currency', 'C_Invoice', 'C_Order', 'C_Payment', 'M_InventoryLine', 'M_PriceList', 'M_Product', 'U_POSTerminal'"; // only specific tables
if (args.length > 3)
tableLike = args[3];
log.info("Table Like: " + tableLike);
@ -590,6 +591,7 @@ public class ModelInterfaceGenerator {
+ "WHERE (TableName IN ('RV_WarehousePrice','RV_BPartner')" // special views
+ " OR IsView='N') AND IsActive = 'Y' AND TableName NOT LIKE '%_Trl' AND ");
sql.append(" AND TableName LIKE ").append(tableLike);
//sql.append(" AND TableName IN (").append( tableLike ).append(")");
sql.append(" ORDER BY TableName");
//