KickJava   Java API By Example, From Geeks To Geeks.

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


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 Smart 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.util.*;
17 import java.sql.*;
18
19 /**
20  * Natural Account
21  *
22  * @author Jorg Janke
23  * @version $Id: MElementValue.java,v 1.2 2003/08/08 16:14:35 jjanke Exp $
24  */

25 public class MElementValue extends X_C_ElementValue
26 {
27     /**
28      * Constructor
29      * @param ctx context
30      * @param C_ElementValue_ID ID or 0 for new
31      */

32     public MElementValue(Properties ctx, int C_ElementValue_ID)
33     {
34         super(ctx, C_ElementValue_ID);
35         if (C_ElementValue_ID == 0)
36         {
37         // setC_Element_ID (0); // Parenr
38
// setName (null);
39
// setValue (null);
40
setIsSummary (false);
41             setAccountSign (ACCOUNTSIGN_Natural);
42             setAccountType (ACCOUNTTYPE_Expense);
43             setIsDocControlled(false);
44             setIsForeignCurrency(false);
45             setIsBankAccount(false);
46             //
47
setPostActual (true);
48             setPostBudget (true);
49             setPostEncumbrance (true);
50             setPostStatistical (true);
51         }
52     } // MElementValue
53

54     /**
55      * Load Constructor
56      * @param ctx context
57      * @param rs result set
58      */

59     public MElementValue(Properties ctx, ResultSet rs)
60     {
61         super(ctx, rs);
62     } // MElementValue
63

64     /**
65      * Full Constructor
66      * @param ctx context
67      * @param Value value
68      * @param Name name
69      * @param Description description
70      * @param AccountType account type
71      * @param AccountSign account sign
72      * @param IsDocControlled doc controlled
73      * @param IsSummary summary
74      */

75     public MElementValue (Properties ctx, String JavaDoc Value, String JavaDoc Name, String JavaDoc Description,
76         String JavaDoc AccountType, String JavaDoc AccountSign,
77         boolean IsDocControlled, boolean IsSummary)
78     {
79         this (ctx, 0);
80         setValue(Value);
81         setName(Name);
82         setDescription(Description);
83         setAccountType(AccountType);
84         setAccountSign(AccountSign);
85         setIsDocControlled(IsDocControlled);
86         setIsSummary(IsSummary);
87     } // MElementValue
88

89
90
91 } // MElementValue
92
Popular Tags