KickJava   Java API By Example, From Geeks To Geeks.

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


1 /** Generated Model - DO NOT CHANGE - Copyright (C) 1999-2003 Jorg Janke **/
2 package org.compiere.model;
3 import java.util.*;
4 import java.sql.*;
5 import java.math.*;
6 import java.io.Serializable JavaDoc;
7 import org.compiere.util.*;
8 /** Generated Model for AD_Tree
9  ** @version $Id: X_AD_Tree.java,v 1.27 2003/10/31 05:30:54 jjanke Exp $ **/

10 public class X_AD_Tree extends PO
11 {
12 /** Standard Constructor **/
13 public X_AD_Tree (Properties ctx, int AD_Tree_ID)
14 {
15 super (ctx, AD_Tree_ID);
16 /** if (AD_Tree_ID == 0)
17 {
18 setAD_Tree_ID (0);
19 setIsAllNodes (false);
20 setName (null);
21 setTreeType (null);
22 }
23  **/

24 }
25 /** Load Constructor **/
26 public X_AD_Tree (Properties ctx, ResultSet rs)
27 {
28 super (ctx, rs);
29 }
30 /** Load Meta Data **/
31 protected POInfo initPO (Properties ctx)
32 {
33 int AD_Table_ID = 288;
34 POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID);
35 return poi;
36 }
37 public String JavaDoc toString()
38 {
39 StringBuffer JavaDoc sb = new StringBuffer JavaDoc ("X_AD_Tree[").append(getID()).append("]");
40 return sb.toString();
41 }
42 void setAD_Tree_ID (int AD_Tree_ID)
43 {
44 setValueNoCheck ("AD_Tree_ID", new Integer JavaDoc(AD_Tree_ID));
45 }
46 public int getAD_Tree_ID()
47 {
48 Integer JavaDoc ii = (Integer JavaDoc)getValue("AD_Tree_ID");
49 if (ii == null) return 0;
50 return ii.intValue();
51 }
52 public void setDescription (String JavaDoc Description)
53 {
54 setValue ("Description", Description);
55 }
56 public String JavaDoc getDescription()
57 {
58 return (String JavaDoc)getValue("Description");
59 }
60 public void setIsAllNodes (boolean IsAllNodes)
61 {
62 setValue ("IsAllNodes", new Boolean JavaDoc(IsAllNodes));
63 }
64 public boolean isAllNodes()
65 {
66 Boolean JavaDoc bb = (Boolean JavaDoc)getValue("IsAllNodes");
67 if (bb != null) return bb.booleanValue();
68 return false;
69 }
70 public void setName (String JavaDoc Name)
71 {
72 if (Name == null) throw new IllegalArgumentException JavaDoc ("Name is mandatory");
73 setValue ("Name", Name);
74 }
75 public String JavaDoc getName()
76 {
77 return (String JavaDoc)getValue("Name");
78 }
79 public static final String JavaDoc TREETYPE_Organization = "OO";
80 public static final String JavaDoc TREETYPE_BoM = "BB";
81 public static final String JavaDoc TREETYPE_Project = "PJ";
82 public static final String JavaDoc TREETYPE_SalesRegion = "SR";
83 public static final String JavaDoc TREETYPE_ProductCategory = "PC";
84 public static final String JavaDoc TREETYPE_Campaign = "MC";
85 public static final String JavaDoc TREETYPE_Activity = "AY";
86 public static final String JavaDoc TREETYPE_Menu = "MM";
87 public static final String JavaDoc TREETYPE_ElementValueAccountEtc = "EV";
88 public static final String JavaDoc TREETYPE_Product = "PR";
89 public static final String JavaDoc TREETYPE_BusPartner = "BP";
90 public void setTreeType (String JavaDoc TreeType)
91 {
92 if (TreeType.equals("OO") || TreeType.equals("BB") || TreeType.equals("PJ") || TreeType.equals("SR") || TreeType.equals("PC") || TreeType.equals("MC") || TreeType.equals("AY") || TreeType.equals("MM") || TreeType.equals("EV") || TreeType.equals("PR") || TreeType.equals("BP"));
93  else throw new IllegalArgumentException JavaDoc ("TreeType Invalid value - Reference_ID=120 - OO - BB - PJ - SR - PC - MC - AY - MM - EV - PR - BP");
94 if (TreeType == null) throw new IllegalArgumentException JavaDoc ("TreeType is mandatory");
95 setValue ("TreeType", TreeType);
96 }
97 public String JavaDoc getTreeType()
98 {
99 return (String JavaDoc)getValue("TreeType");
100 }
101 }
102
Popular Tags