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_C_Element extends PO 11 { 12 13 public X_C_Element (Properties ctx, int C_Element_ID) 14 { 15 super (ctx, C_Element_ID); 16 26 } 27 28 public X_C_Element (Properties ctx, ResultSet rs) 29 { 30 super (ctx, rs); 31 } 32 33 protected POInfo initPO (Properties ctx) 34 { 35 int AD_Table_ID = 142; 36 POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID); 37 return poi; 38 } 39 public String toString() 40 { 41 StringBuffer sb = new StringBuffer ("X_C_Element[").append(getID()).append("]"); 42 return sb.toString(); 43 } 44 void setAD_Tree_ID (int AD_Tree_ID) 45 { 46 setValueNoCheck ("AD_Tree_ID", new Integer (AD_Tree_ID)); 47 } 48 public int getAD_Tree_ID() 49 { 50 Integer ii = (Integer )getValue("AD_Tree_ID"); 51 if (ii == null) return 0; 52 return ii.intValue(); 53 } 54 public void setAdd1Tree_ID (int Add1Tree_ID) 55 { 56 if (Add1Tree_ID == 0) setValue ("Add1Tree_ID", null); 57 else 58 setValue ("Add1Tree_ID", new Integer (Add1Tree_ID)); 59 } 60 public int getAdd1Tree_ID() 61 { 62 Integer ii = (Integer )getValue("Add1Tree_ID"); 63 if (ii == null) return 0; 64 return ii.intValue(); 65 } 66 public void setAdd2Tree_ID (int Add2Tree_ID) 67 { 68 if (Add2Tree_ID == 0) setValue ("Add2Tree_ID", null); 69 else 70 setValue ("Add2Tree_ID", new Integer (Add2Tree_ID)); 71 } 72 public int getAdd2Tree_ID() 73 { 74 Integer ii = (Integer )getValue("Add2Tree_ID"); 75 if (ii == null) return 0; 76 return ii.intValue(); 77 } 78 void setC_Element_ID (int C_Element_ID) 79 { 80 setValueNoCheck ("C_Element_ID", new Integer (C_Element_ID)); 81 } 82 public int getC_Element_ID() 83 { 84 Integer ii = (Integer )getValue("C_Element_ID"); 85 if (ii == null) return 0; 86 return ii.intValue(); 87 } 88 public void setDescription (String Description) 89 { 90 setValue ("Description", Description); 91 } 92 public String getDescription() 93 { 94 return (String )getValue("Description"); 95 } 96 public static final String ELEMENTTYPE_Account = "A"; 97 public static final String ELEMENTTYPE_UserDefined = "U"; 98 public void setElementType (String ElementType) 99 { 100 if (ElementType.equals("A") || ElementType.equals("U")); 101 else throw new IllegalArgumentException ("ElementType Invalid value - Reference_ID=116 - A - U"); 102 if (ElementType == null) throw new IllegalArgumentException ("ElementType is mandatory"); 103 setValue ("ElementType", ElementType); 104 } 105 public String getElementType() 106 { 107 return (String )getValue("ElementType"); 108 } 109 public void setIsBalancing (boolean IsBalancing) 110 { 111 setValue ("IsBalancing", new Boolean (IsBalancing)); 112 } 113 public boolean isBalancing() 114 { 115 Boolean bb = (Boolean )getValue("IsBalancing"); 116 if (bb != null) return bb.booleanValue(); 117 return false; 118 } 119 public void setIsNaturalAccount (boolean IsNaturalAccount) 120 { 121 setValue ("IsNaturalAccount", new Boolean (IsNaturalAccount)); 122 } 123 public boolean isNaturalAccount() 124 { 125 Boolean bb = (Boolean )getValue("IsNaturalAccount"); 126 if (bb != null) return bb.booleanValue(); 127 return false; 128 } 129 public void setName (String Name) 130 { 131 if (Name == null) throw new IllegalArgumentException ("Name is mandatory"); 132 setValue ("Name", Name); 133 } 134 public String getName() 135 { 136 return (String )getValue("Name"); 137 } 138 public void setVFormat (String VFormat) 139 { 140 setValue ("VFormat", VFormat); 141 } 142 public String getVFormat() 143 { 144 return (String )getValue("VFormat"); 145 } 146 } 147 | Popular Tags |