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_GL_Budget extends PO 11 { 12 13 public X_GL_Budget (Properties ctx, int GL_Budget_ID) 14 { 15 super (ctx, GL_Budget_ID); 16 23 } 24 25 public X_GL_Budget (Properties ctx, ResultSet rs) 26 { 27 super (ctx, rs); 28 } 29 30 protected POInfo initPO (Properties ctx) 31 { 32 int AD_Table_ID = 271; 33 POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID); 34 return poi; 35 } 36 public String toString() 37 { 38 StringBuffer sb = new StringBuffer ("X_GL_Budget[").append(getID()).append("]"); 39 return sb.toString(); 40 } 41 public static final String BUDGETSTATUS_Draft = "D"; 42 public static final String BUDGETSTATUS_Approved = "A"; 43 public void setBudgetStatus (String BudgetStatus) 44 { 45 if (BudgetStatus.equals("D") || BudgetStatus.equals("A")); 46 else throw new IllegalArgumentException ("BudgetStatus Invalid value - Reference_ID=178 - D - A"); 47 setValue ("BudgetStatus", BudgetStatus); 48 } 49 public String getBudgetStatus() 50 { 51 return (String )getValue("BudgetStatus"); 52 } 53 public void setDescription (String Description) 54 { 55 setValue ("Description", Description); 56 } 57 public String getDescription() 58 { 59 return (String )getValue("Description"); 60 } 61 void setGL_Budget_ID (int GL_Budget_ID) 62 { 63 setValueNoCheck ("GL_Budget_ID", new Integer (GL_Budget_ID)); 64 } 65 public int getGL_Budget_ID() 66 { 67 Integer ii = (Integer )getValue("GL_Budget_ID"); 68 if (ii == null) return 0; 69 return ii.intValue(); 70 } 71 public void setIsPrimary (boolean IsPrimary) 72 { 73 setValue ("IsPrimary", new Boolean (IsPrimary)); 74 } 75 public boolean isPrimary() 76 { 77 Boolean bb = (Boolean )getValue("IsPrimary"); 78 if (bb != null) return bb.booleanValue(); 79 return false; 80 } 81 public void setName (String Name) 82 { 83 if (Name == null) throw new IllegalArgumentException ("Name is mandatory"); 84 setValue ("Name", Name); 85 } 86 public String getName() 87 { 88 return (String )getValue("Name"); 89 } 90 } 91 | Popular Tags |