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_PA_ReportSource extends PO 11 { 12 13 public X_PA_ReportSource (Properties ctx, int PA_ReportSource_ID) 14 { 15 super (ctx, PA_ReportSource_ID); 16 23 } 24 25 public X_PA_ReportSource (Properties ctx, ResultSet rs) 26 { 27 super (ctx, rs); 28 } 29 30 protected POInfo initPO (Properties ctx) 31 { 32 int AD_Table_ID = 450; 33 POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID); 34 return poi; 35 } 36 public String toString() 37 { 38 StringBuffer sb = new StringBuffer ("X_PA_ReportSource[").append(getID()).append("]"); 39 return sb.toString(); 40 } 41 public void setC_Activity_ID (int C_Activity_ID) 42 { 43 if (C_Activity_ID == 0) setValue ("C_Activity_ID", null); 44 else 45 setValue ("C_Activity_ID", new Integer (C_Activity_ID)); 46 } 47 public int getC_Activity_ID() 48 { 49 Integer ii = (Integer )getValue("C_Activity_ID"); 50 if (ii == null) return 0; 51 return ii.intValue(); 52 } 53 public void setC_BPartner_ID (int C_BPartner_ID) 54 { 55 if (C_BPartner_ID == 0) setValue ("C_BPartner_ID", null); 56 else 57 setValue ("C_BPartner_ID", new Integer (C_BPartner_ID)); 58 } 59 public int getC_BPartner_ID() 60 { 61 Integer ii = (Integer )getValue("C_BPartner_ID"); 62 if (ii == null) return 0; 63 return ii.intValue(); 64 } 65 public void setC_Campaign_ID (int C_Campaign_ID) 66 { 67 if (C_Campaign_ID == 0) setValue ("C_Campaign_ID", null); 68 else 69 setValue ("C_Campaign_ID", new Integer (C_Campaign_ID)); 70 } 71 public int getC_Campaign_ID() 72 { 73 Integer ii = (Integer )getValue("C_Campaign_ID"); 74 if (ii == null) return 0; 75 return ii.intValue(); 76 } 77 public void setC_ElementValue_ID (int C_ElementValue_ID) 78 { 79 if (C_ElementValue_ID == 0) setValue ("C_ElementValue_ID", null); 80 else 81 setValue ("C_ElementValue_ID", new Integer (C_ElementValue_ID)); 82 } 83 public int getC_ElementValue_ID() 84 { 85 Integer ii = (Integer )getValue("C_ElementValue_ID"); 86 if (ii == null) return 0; 87 return ii.intValue(); 88 } 89 public void setC_Location_ID (int C_Location_ID) 90 { 91 if (C_Location_ID == 0) setValue ("C_Location_ID", null); 92 else 93 setValue ("C_Location_ID", new Integer (C_Location_ID)); 94 } 95 public int getC_Location_ID() 96 { 97 Integer ii = (Integer )getValue("C_Location_ID"); 98 if (ii == null) return 0; 99 return ii.intValue(); 100 } 101 public void setC_Project_ID (int C_Project_ID) 102 { 103 if (C_Project_ID == 0) setValue ("C_Project_ID", null); 104 else 105 setValue ("C_Project_ID", new Integer (C_Project_ID)); 106 } 107 public int getC_Project_ID() 108 { 109 Integer ii = (Integer )getValue("C_Project_ID"); 110 if (ii == null) return 0; 111 return ii.intValue(); 112 } 113 public void setC_SalesRegion_ID (int C_SalesRegion_ID) 114 { 115 if (C_SalesRegion_ID == 0) setValue ("C_SalesRegion_ID", null); 116 else 117 setValue ("C_SalesRegion_ID", new Integer (C_SalesRegion_ID)); 118 } 119 public int getC_SalesRegion_ID() 120 { 121 Integer ii = (Integer )getValue("C_SalesRegion_ID"); 122 if (ii == null) return 0; 123 return ii.intValue(); 124 } 125 public void setDescription (String Description) 126 { 127 setValue ("Description", Description); 128 } 129 public String getDescription() 130 { 131 return (String )getValue("Description"); 132 } 133 public static final String ELEMENTTYPE_LocationFrom = "LF"; 134 public static final String ELEMENTTYPE_LocationTo = "LT"; 135 public static final String ELEMENTTYPE_SalesRegion = "SR"; 136 public static final String ELEMENTTYPE_Project = "PJ"; 137 public static final String ELEMENTTYPE_Campaign = "MC"; 138 public static final String ELEMENTTYPE_User1 = "U1"; 139 public static final String ELEMENTTYPE_User2 = "U2"; 140 public static final String ELEMENTTYPE_Activity = "AY"; 141 public static final String ELEMENTTYPE_Organization = "OO"; 142 public static final String ELEMENTTYPE_Account = "AC"; 143 public static final String ELEMENTTYPE_Product = "PR"; 144 public static final String ELEMENTTYPE_BusPartner = "BP"; 145 public static final String ELEMENTTYPE_TrxOrg = "OT"; 146 public void setElementType (String ElementType) 147 { 148 if (ElementType.equals("LF") || ElementType.equals("LT") || ElementType.equals("SR") || ElementType.equals("PJ") || ElementType.equals("MC") || ElementType.equals("U1") || ElementType.equals("U2") || ElementType.equals("AY") || ElementType.equals("OO") || ElementType.equals("AC") || ElementType.equals("PR") || ElementType.equals("BP") || ElementType.equals("OT")); 149 else throw new IllegalArgumentException ("ElementType Invalid value - Reference_ID=181 - LF - LT - SR - PJ - MC - U1 - U2 - AY - OO - AC - PR - BP - OT"); 150 if (ElementType == null) throw new IllegalArgumentException ("ElementType is mandatory"); 151 setValue ("ElementType", ElementType); 152 } 153 public String getElementType() 154 { 155 return (String )getValue("ElementType"); 156 } 157 public void setM_Product_ID (int M_Product_ID) 158 { 159 if (M_Product_ID == 0) setValue ("M_Product_ID", null); 160 else 161 setValue ("M_Product_ID", new Integer (M_Product_ID)); 162 } 163 public int getM_Product_ID() 164 { 165 Integer ii = (Integer )getValue("M_Product_ID"); 166 if (ii == null) return 0; 167 return ii.intValue(); 168 } 169 public void setOrg_ID (int Org_ID) 170 { 171 if (Org_ID == 0) setValue ("Org_ID", null); 172 else 173 setValue ("Org_ID", new Integer (Org_ID)); 174 } 175 public int getOrg_ID() 176 { 177 Integer ii = (Integer )getValue("Org_ID"); 178 if (ii == null) return 0; 179 return ii.intValue(); 180 } 181 void setPA_ReportLine_ID (int PA_ReportLine_ID) 182 { 183 setValueNoCheck ("PA_ReportLine_ID", new Integer (PA_ReportLine_ID)); 184 } 185 public int getPA_ReportLine_ID() 186 { 187 Integer ii = (Integer )getValue("PA_ReportLine_ID"); 188 if (ii == null) return 0; 189 return ii.intValue(); 190 } 191 void setPA_ReportSource_ID (int PA_ReportSource_ID) 192 { 193 setValueNoCheck ("PA_ReportSource_ID", new Integer (PA_ReportSource_ID)); 194 } 195 public int getPA_ReportSource_ID() 196 { 197 Integer ii = (Integer )getValue("PA_ReportSource_ID"); 198 if (ii == null) return 0; 199 return ii.intValue(); 200 } 201 } 202 | Popular Tags |