From 26bafb5d0bd26d384b6b8d8f2c8bcd6379fec55f Mon Sep 17 00:00:00 2001 From: trifonnt Date: Sat, 11 Aug 2007 01:12:25 +0000 Subject: [PATCH] Updated to work with latest trunk. --- .../util/GenerateInterfaceTrifon.java | 48 +++++++++++++++---- 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/base/src/org/adempiere/util/GenerateInterfaceTrifon.java b/base/src/org/adempiere/util/GenerateInterfaceTrifon.java index f10b4a651a..ba14cea7a5 100644 --- a/base/src/org/adempiere/util/GenerateInterfaceTrifon.java +++ b/base/src/org/adempiere/util/GenerateInterfaceTrifon.java @@ -51,6 +51,44 @@ public class GenerateInterfaceTrifon { private String packageName = ""; + /** File Header */ + public static final String COPY = + "/**********************************************************************\n" + + " * This file is part of Adempiere ERP Bazaar *\n" + + " * http://www.adempiere.org *\n" + + " * *\n" + + " * Copyright (C) Trifon Trifonov. *\n" + + " * Copyright (C) Contributors *\n" + + " * *\n" + + " * This program is free software; you can redistribute it and/or *\n" + + " * modify it under the terms of the GNU General Public License *\n" + + " * as published by the Free Software Foundation; either version 2 *\n" + + " * of the License, or (at your option) any later version. *\n" + + " * *\n" + + " * This program is distributed in the hope that it will be useful, *\n" + + " * but WITHOUT ANY WARRANTY; without even the implied warranty of *\n" + + " * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *\n" + + " * GNU General Public License for more details. *\n" + + " * *\n" + + " * You should have received a copy of the GNU General Public License *\n" + + " * along with this program; if not, write to the Free Software *\n" + + " * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *\n" + + " * MA 02110-1301, USA. *\n" + + " * *\n" + + " * Contributors: *\n" + + " * - Trifon Trifonov (trifonnt@users.sourceforge.net) *\n" + + " * *\n" + + " * Sponsors: *\n" + + " * - Company (http://www.site.com) *\n" + + " **********************************************************************/\n"; + + /** Generated on */ + private Timestamp s_run = new Timestamp(System.currentTimeMillis()); + + /** Logger */ + private static CLogger log = CLogger.getCLogger(GenerateInterfaceTrifon.class); + + public GenerateInterfaceTrifon(int AD_Table_ID, String directory, String packageName) { this.packageName = packageName; // create column access methods @@ -70,12 +108,6 @@ public class GenerateInterfaceTrifon { writeToFile(sb, directory + tableName + ".java"); } - /** Generated on */ - private Timestamp s_run = new Timestamp(System.currentTimeMillis()); - - /** Logger */ - private static CLogger log = CLogger.getCLogger(GenerateInterfaceTrifon.class); - /** * Add Header info to buffer * @@ -126,7 +158,7 @@ public class GenerateInterfaceTrifon { String className = "I_" + tableName; // StringBuffer start = new StringBuffer() - .append("/** Generated Model - DO NOT CHANGE - Copyright (C) 2006-2007 Adempiere */\n") + .append (COPY) .append("package ").append(packageName).append(";").append(Env.NL) ; @@ -330,7 +362,7 @@ public class GenerateInterfaceTrifon { sb.append("();"); // return sb.toString(); - } // createColumnMethods + } // ****** Set/Get Comment ****** public void generateJavaComment(String startOfComment, String propertyName, String description, StringBuffer result) {