1 2 package org.compiere.model; 3 import java.util.*; 4 import java.sql.*; 5 import java.math.*; 6 import java.io.Serializable ; 7 import org.compiere.util.*; 8 10 public class X_AD_Tree extends PO 11 { 12 13 public X_AD_Tree (Properties ctx, int AD_Tree_ID) 14 { 15 super (ctx, AD_Tree_ID); 16 24 } 25 26 public X_AD_Tree (Properties ctx, ResultSet rs) 27 { 28 super (ctx, rs); 29 } 30 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 toString() 38 { 39 StringBuffer sb = new StringBuffer ("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 (AD_Tree_ID)); 45 } 46 public int getAD_Tree_ID() 47 { 48 Integer ii = (Integer )getValue("AD_Tree_ID"); 49 if (ii == null) return 0; 50 return ii.intValue(); 51 } 52 public void setDescription (String Description) 53 { 54 setValue ("Description", Description); 55 } 56 public String getDescription() 57 { 58 return (String )getValue("Description"); 59 } 60 public void setIsAllNodes (boolean IsAllNodes) 61 { 62 setValue ("IsAllNodes", new Boolean (IsAllNodes)); 63 } 64 public boolean isAllNodes() 65 { 66 Boolean bb = (Boolean )getValue("IsAllNodes"); 67 if (bb != null) return bb.booleanValue(); 68 return false; 69 } 70 public void setName (String Name) 71 { 72 if (Name == null) throw new IllegalArgumentException ("Name is mandatory"); 73 setValue ("Name", Name); 74 } 75 public String getName() 76 { 77 return (String )getValue("Name"); 78 } 79 public static final String TREETYPE_Organization = "OO"; 80 public static final String TREETYPE_BoM = "BB"; 81 public static final String TREETYPE_Project = "PJ"; 82 public static final String TREETYPE_SalesRegion = "SR"; 83 public static final String TREETYPE_ProductCategory = "PC"; 84 public static final String TREETYPE_Campaign = "MC"; 85 public static final String TREETYPE_Activity = "AY"; 86 public static final String TREETYPE_Menu = "MM"; 87 public static final String TREETYPE_ElementValueAccountEtc = "EV"; 88 public static final String TREETYPE_Product = "PR"; 89 public static final String TREETYPE_BusPartner = "BP"; 90 public void setTreeType (String 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 ("TreeType Invalid value - Reference_ID=120 - OO - BB - PJ - SR - PC - MC - AY - MM - EV - PR - BP"); 94 if (TreeType == null) throw new IllegalArgumentException ("TreeType is mandatory"); 95 setValue ("TreeType", TreeType); 96 } 97 public String getTreeType() 98 { 99 return (String )getValue("TreeType"); 100 } 101 } 102 | Popular Tags |