parameterize, indentation, imports
This commit is contained in:
parent
36d10d08fb
commit
9c1c4ea524
|
@ -18,14 +18,22 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package org.eevolution.tools;
|
package org.eevolution.tools;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.File;
|
||||||
import java.math.*;
|
import java.io.FileOutputStream;
|
||||||
import java.sql.*;
|
import java.io.OutputStreamWriter;
|
||||||
import java.util.logging.*;
|
import java.io.Writer;
|
||||||
import org.compiere.*;
|
import java.math.BigDecimal;
|
||||||
import org.compiere.dbPort.*;
|
import java.sql.PreparedStatement;
|
||||||
import org.compiere.db.*;
|
import java.sql.ResultSet;
|
||||||
import org.compiere.util.*;
|
import java.sql.Timestamp;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
|
||||||
|
import org.compiere.Adempiere;
|
||||||
|
import org.compiere.util.CLogMgt;
|
||||||
|
import org.compiere.util.CLogger;
|
||||||
|
import org.compiere.util.DB;
|
||||||
|
import org.compiere.util.DisplayType;
|
||||||
|
import org.compiere.util.Env;
|
||||||
/**
|
/**
|
||||||
* Generate Model Classes extending PO.
|
* Generate Model Classes extending PO.
|
||||||
* Base class for CMP interface - will be extended to create byte code directly
|
* Base class for CMP interface - will be extended to create byte code directly
|
||||||
|
@ -78,9 +86,6 @@ public class GenerateModel
|
||||||
+" * or via info@compiere.org or http://www.compiere.org/license.html *\n"
|
+" * or via info@compiere.org or http://www.compiere.org/license.html *\n"
|
||||||
+" *****************************************************************************/\n";
|
+" *****************************************************************************/\n";
|
||||||
|
|
||||||
/** Generated on */
|
|
||||||
private Timestamp s_run = new Timestamp(System.currentTimeMillis());
|
|
||||||
|
|
||||||
/** Logger */
|
/** Logger */
|
||||||
private static CLogger log = CLogger.getCLogger (GenerateModel.class);
|
private static CLogger log = CLogger.getCLogger (GenerateModel.class);
|
||||||
|
|
||||||
|
@ -170,11 +175,11 @@ public class GenerateModel
|
||||||
+ "{").append(mandatory).append("} */\n"
|
+ "{").append(mandatory).append("} */\n"
|
||||||
+ "}" // Constructor End
|
+ "}" // Constructor End
|
||||||
// Short Constructor
|
// Short Constructor
|
||||||
// + "/** Short Constructor */\n"
|
// + "/** Short Constructor */\n"
|
||||||
// + "public ").append(className).append(" (Properties ctx, int ").append(keyColumn).append(")"
|
// + "public ").append(className).append(" (Properties ctx, int ").append(keyColumn).append(")"
|
||||||
// + "{"
|
// + "{"
|
||||||
// + "this (ctx, ").append(keyColumn).append(", null);"
|
// + "this (ctx, ").append(keyColumn).append(", null);"
|
||||||
// + "}" // Constructor End
|
// + "}" // Constructor End
|
||||||
|
|
||||||
// Load Constructor
|
// Load Constructor
|
||||||
+ "/** Load Constructor \n@param ctx context\n@param rs result set \n@param trxName transaction\n*/\n"
|
+ "/** Load Constructor \n@param ctx context\n@param rs result set \n@param trxName transaction\n*/\n"
|
||||||
|
@ -346,7 +351,7 @@ public class GenerateModel
|
||||||
boolean virtualColumn, boolean IsEncrypted)
|
boolean virtualColumn, boolean IsEncrypted)
|
||||||
{
|
{
|
||||||
// Clazz
|
// Clazz
|
||||||
Class clazz = DisplayType.getClass(displayType, true);
|
Class<?> clazz = DisplayType.getClass(displayType, true);
|
||||||
if (defaultValue == null)
|
if (defaultValue == null)
|
||||||
defaultValue = "";
|
defaultValue = "";
|
||||||
if (DisplayType.isLOB(displayType)) // No length check for LOBs
|
if (DisplayType.isLOB(displayType)) // No length check for LOBs
|
||||||
|
|
Loading…
Reference in New Issue