KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > compiere > model > MTest


1 /******************************************************************************
2  * The contents of this file are subject to the Compiere License Version 1.1
3  * ("License"); You may not use this file except in compliance with the License
4  * You may obtain a copy of the License at http://www.compiere.org/license.html
5  * Software distributed under the License is distributed on an "AS IS" basis,
6  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
7  * the specific language governing rights and limitations under the License.
8  * The Original Code is Compiere ERP & CRM Business Solution
9  * The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc.
10  * Portions created by Jorg Janke are Copyright (C) 1999-2003 Jorg Janke, parts
11  * created by ComPiere are Copyright (C) ComPiere, Inc.; All Rights Reserved.
12  * Contributor(s): ______________________________________.
13  *****************************************************************************/

14 package org.compiere.model;
15
16 import java.sql.ResultSet JavaDoc;
17 import java.util.Properties JavaDoc;
18
19 import org.compiere.Compiere;
20 import org.compiere.util.*;
21
22 /**
23  * Test Model
24  *
25  * @author Jorg Janke
26  * @version $Id: MTest.java,v 1.1 2003/11/06 07:09:09 jjanke Exp $
27  */

28 public class MTest extends X_Test
29 {
30     /**
31      * Constructor
32      * @param ctx context
33      * @param Test_ID
34      */

35     public MTest(Properties JavaDoc ctx, int Test_ID)
36     {
37         super (ctx, Test_ID);
38     } // MTest
39

40     /**
41      * Load Constructor
42      * @param ctx context
43      * @param rs result set
44      */

45     public MTest(Properties JavaDoc ctx, ResultSet JavaDoc rs)
46     {
47         super (ctx, rs);
48     } // MTest
49

50     /**
51      * Test
52      * @param args
53      */

54     public static void main(String JavaDoc[] args)
55     {
56         Compiere.startupClient();
57         MTest t1 = new MTest (Env.getCtx(), 0);
58         t1.setName("Test1");
59         System.out.println("->" + t1.getCharacterData() + "<-");
60         t1.save();
61         t1.setCharacterData("Long Text JJ");
62         t1.save();
63         int Test_ID = t1.getTest_ID();
64         //
65
MTest t2 = new MTest (Env.getCtx(), Test_ID);
66         System.out.println("->" + t2.getCharacterData() + "<-");
67     } // main
68

69 } // MTest
70
Popular Tags