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_ReportColumn extends PO 11 { 12 13 public X_PA_ReportColumn (Properties ctx, int PA_ReportColumn_ID) 14 { 15 super (ctx, PA_ReportColumn_ID); 16 27 } 28 29 public X_PA_ReportColumn (Properties ctx, ResultSet rs) 30 { 31 super (ctx, rs); 32 } 33 34 protected POInfo initPO (Properties ctx) 35 { 36 int AD_Table_ID = 446; 37 POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID); 38 return poi; 39 } 40 public String toString() 41 { 42 StringBuffer sb = new StringBuffer ("X_PA_ReportColumn[").append(getID()).append("]"); 43 return sb.toString(); 44 } 45 public static final String AMOUNTTYPE_TotalDebitOnly = "DT"; 46 public static final String AMOUNTTYPE_TotalCreditOnly = "CT"; 47 public static final String AMOUNTTYPE_TotalBalance = "BT"; 48 public static final String AMOUNTTYPE_PeriodBalance = "BP"; 49 public static final String AMOUNTTYPE_PeriodCreditOnly = "CP"; 50 public static final String AMOUNTTYPE_PeriodDebitOnly = "DP"; 51 public static final String AMOUNTTYPE_PeriodQuantity = "QP"; 52 public static final String AMOUNTTYPE_TotalQuantity = "QT"; 53 public static final String AMOUNTTYPE_YearBalance = "BY"; 54 public static final String AMOUNTTYPE_YearCreditOnly = "CY"; 55 public static final String AMOUNTTYPE_YearDebitOnly = "DY"; 56 public static final String AMOUNTTYPE_YearQuantity = "QY"; 57 public void setAmountType (String AmountType) 58 { 59 if (AmountType.equals("DT") || AmountType.equals("CT") || AmountType.equals("BT") || AmountType.equals("BP") || AmountType.equals("CP") || AmountType.equals("DP") || AmountType.equals("QP") || AmountType.equals("QT") || AmountType.equals("BY") || AmountType.equals("CY") || AmountType.equals("DY") || AmountType.equals("QY")); 60 else throw new IllegalArgumentException ("AmountType Invalid value - Reference_ID=235 - DT - CT - BT - BP - CP - DP - QP - QT - BY - CY - DY - QY"); 61 setValue ("AmountType", AmountType); 62 } 63 public String getAmountType() 64 { 65 return (String )getValue("AmountType"); 66 } 67 public void setC_Activity_ID (int C_Activity_ID) 68 { 69 if (C_Activity_ID == 0) setValue ("C_Activity_ID", null); 70 else 71 setValue ("C_Activity_ID", new Integer (C_Activity_ID)); 72 } 73 public int getC_Activity_ID() 74 { 75 Integer ii = (Integer )getValue("C_Activity_ID"); 76 if (ii == null) return 0; 77 return ii.intValue(); 78 } 79 public void setC_BPartner_ID (int C_BPartner_ID) 80 { 81 if (C_BPartner_ID == 0) setValue ("C_BPartner_ID", null); 82 else 83 setValue ("C_BPartner_ID", new Integer (C_BPartner_ID)); 84 } 85 public int getC_BPartner_ID() 86 { 87 Integer ii = (Integer )getValue("C_BPartner_ID"); 88 if (ii == null) return 0; 89 return ii.intValue(); 90 } 91 public void setC_Campaign_ID (int C_Campaign_ID) 92 { 93 if (C_Campaign_ID == 0) setValue ("C_Campaign_ID", null); 94 else 95 setValue ("C_Campaign_ID", new Integer (C_Campaign_ID)); 96 } 97 public int getC_Campaign_ID() 98 { 99 Integer ii = (Integer )getValue("C_Campaign_ID"); 100 if (ii == null) return 0; 101 return ii.intValue(); 102 } 103 public void setC_Currency_ID (int C_Currency_ID) 104 { 105 if (C_Currency_ID == 0) setValue ("C_Currency_ID", null); 106 else 107 setValue ("C_Currency_ID", new Integer (C_Currency_ID)); 108 } 109 public int getC_Currency_ID() 110 { 111 Integer ii = (Integer )getValue("C_Currency_ID"); 112 if (ii == null) return 0; 113 return ii.intValue(); 114 } 115 public void setC_ElementValue_ID (int C_ElementValue_ID) 116 { 117 if (C_ElementValue_ID == 0) setValue ("C_ElementValue_ID", null); 118 else 119 setValue ("C_ElementValue_ID", new Integer (C_ElementValue_ID)); 120 } 121 public int getC_ElementValue_ID() 122 { 123 Integer ii = (Integer )getValue("C_ElementValue_ID"); 124 if (ii == null) return 0; 125 return ii.intValue(); 126 } 127 public void setC_Location_ID (int C_Location_ID) 128 { 129 if (C_Location_ID == 0) setValue ("C_Location_ID", null); 130 else 131 setValue ("C_Location_ID", new Integer (C_Location_ID)); 132 } 133 public int getC_Location_ID() 134 { 135 Integer ii = (Integer )getValue("C_Location_ID"); 136 if (ii == null) return 0; 137 return ii.intValue(); 138 } 139 public void setC_Project_ID (int C_Project_ID) 140 { 141 if (C_Project_ID == 0) setValue ("C_Project_ID", null); 142 else 143 setValue ("C_Project_ID", new Integer (C_Project_ID)); 144 } 145 public int getC_Project_ID() 146 { 147 Integer ii = (Integer )getValue("C_Project_ID"); 148 if (ii == null) return 0; 149 return ii.intValue(); 150 } 151 public void setC_SalesRegion_ID (int C_SalesRegion_ID) 152 { 153 if (C_SalesRegion_ID == 0) setValue ("C_SalesRegion_ID", null); 154 else 155 setValue ("C_SalesRegion_ID", new Integer (C_SalesRegion_ID)); 156 } 157 public int getC_SalesRegion_ID() 158 { 159 Integer ii = (Integer )getValue("C_SalesRegion_ID"); 160 if (ii == null) return 0; 161 return ii.intValue(); 162 } 163 public static final String CALCULATIONTYPE_AddOp1PlusOp2 = "A"; 164 public static final String CALCULATIONTYPE_SubtractOp1MinusOp2 = "S"; 165 public static final String CALCULATIONTYPE_PercentageOp2OfOp1 = "P"; 166 public static final String CALCULATIONTYPE_AddRangeOp1ToOp2 = "R"; 167 public void setCalculationType (String CalculationType) 168 { 169 if (CalculationType.equals("A") || CalculationType.equals("S") || CalculationType.equals("P") || CalculationType.equals("R")); 170 else throw new IllegalArgumentException ("CalculationType Invalid value - Reference_ID=236 - A - S - P - R"); 171 setValue ("CalculationType", CalculationType); 172 } 173 public String getCalculationType() 174 { 175 return (String )getValue("CalculationType"); 176 } 177 public static final String COLUMNTYPE_RelativePeriod = "R"; 178 public static final String COLUMNTYPE_Calculation = "C"; 179 public static final String COLUMNTYPE_SegmentValue = "S"; 180 public void setColumnType (String ColumnType) 181 { 182 if (ColumnType.equals("R") || ColumnType.equals("C") || ColumnType.equals("S")); 183 else throw new IllegalArgumentException ("ColumnType Invalid value - Reference_ID=237 - R - C - S"); 184 if (ColumnType == null) throw new IllegalArgumentException ("ColumnType is mandatory"); 185 setValue ("ColumnType", ColumnType); 186 } 187 public String getColumnType() 188 { 189 return (String )getValue("ColumnType"); 190 } 191 public static final String CURRENCYTYPE_SourceCurrency = "S"; 192 public static final String CURRENCYTYPE_AccountingCurrency = "A"; 193 public void setCurrencyType (String CurrencyType) 194 { 195 if (CurrencyType.equals("S") || CurrencyType.equals("A")); 196 else throw new IllegalArgumentException ("CurrencyType Invalid value - Reference_ID=238 - S - A"); 197 setValue ("CurrencyType", CurrencyType); 198 } 199 public String getCurrencyType() 200 { 201 return (String )getValue("CurrencyType"); 202 } 203 public void setDescription (String Description) 204 { 205 setValue ("Description", Description); 206 } 207 public String getDescription() 208 { 209 return (String )getValue("Description"); 210 } 211 public static final String ELEMENTTYPE_LocationFrom = "LF"; 212 public static final String ELEMENTTYPE_LocationTo = "LT"; 213 public static final String ELEMENTTYPE_SalesRegion = "SR"; 214 public static final String ELEMENTTYPE_Project = "PJ"; 215 public static final String ELEMENTTYPE_Campaign = "MC"; 216 public static final String ELEMENTTYPE_User1 = "U1"; 217 public static final String ELEMENTTYPE_User2 = "U2"; 218 public static final String ELEMENTTYPE_Activity = "AY"; 219 public static final String ELEMENTTYPE_Organization = "OO"; 220 public static final String ELEMENTTYPE_Account = "AC"; 221 public static final String ELEMENTTYPE_Product = "PR"; 222 public static final String ELEMENTTYPE_BusPartner = "BP"; 223 public static final String ELEMENTTYPE_TrxOrg = "OT"; 224 public void setElementType (String ElementType) 225 { 226 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")); 227 else throw new IllegalArgumentException ("ElementType Invalid value - Reference_ID=181 - LF - LT - SR - PJ - MC - U1 - U2 - AY - OO - AC - PR - BP - OT"); 228 setValue ("ElementType", ElementType); 229 } 230 public String getElementType() 231 { 232 return (String )getValue("ElementType"); 233 } 234 public void setGL_Budget_ID (int GL_Budget_ID) 235 { 236 if (GL_Budget_ID == 0) setValue ("GL_Budget_ID", null); 237 else 238 setValue ("GL_Budget_ID", new Integer (GL_Budget_ID)); 239 } 240 public int getGL_Budget_ID() 241 { 242 Integer ii = (Integer )getValue("GL_Budget_ID"); 243 if (ii == null) return 0; 244 return ii.intValue(); 245 } 246 public void setIsAdhocConversion (boolean IsAdhocConversion) 247 { 248 setValue ("IsAdhocConversion", new Boolean (IsAdhocConversion)); 249 } 250 public boolean isAdhocConversion() 251 { 252 Boolean bb = (Boolean )getValue("IsAdhocConversion"); 253 if (bb != null) return bb.booleanValue(); 254 return false; 255 } 256 public void setIsPrinted (boolean IsPrinted) 257 { 258 setValue ("IsPrinted", new Boolean (IsPrinted)); 259 } 260 public boolean isPrinted() 261 { 262 Boolean bb = (Boolean )getValue("IsPrinted"); 263 if (bb != null) return bb.booleanValue(); 264 return false; 265 } 266 public void setM_Product_ID (int M_Product_ID) 267 { 268 if (M_Product_ID == 0) setValue ("M_Product_ID", null); 269 else 270 setValue ("M_Product_ID", new Integer (M_Product_ID)); 271 } 272 public int getM_Product_ID() 273 { 274 Integer ii = (Integer )getValue("M_Product_ID"); 275 if (ii == null) return 0; 276 return ii.intValue(); 277 } 278 public void setName (String Name) 279 { 280 if (Name == null) throw new IllegalArgumentException ("Name is mandatory"); 281 setValue ("Name", Name); 282 } 283 public String getName() 284 { 285 return (String )getValue("Name"); 286 } 287 public void setOper_1_ID (int Oper_1_ID) 288 { 289 if (Oper_1_ID == 0) setValue ("Oper_1_ID", null); 290 else 291 setValue ("Oper_1_ID", new Integer (Oper_1_ID)); 292 } 293 public int getOper_1_ID() 294 { 295 Integer ii = (Integer )getValue("Oper_1_ID"); 296 if (ii == null) return 0; 297 return ii.intValue(); 298 } 299 public void setOper_2_ID (int Oper_2_ID) 300 { 301 if (Oper_2_ID == 0) setValue ("Oper_2_ID", null); 302 else 303 setValue ("Oper_2_ID", new Integer (Oper_2_ID)); 304 } 305 public int getOper_2_ID() 306 { 307 Integer ii = (Integer )getValue("Oper_2_ID"); 308 if (ii == null) return 0; 309 return ii.intValue(); 310 } 311 public void setOrg_ID (int Org_ID) 312 { 313 if (Org_ID == 0) setValue ("Org_ID", null); 314 else 315 setValue ("Org_ID", new Integer (Org_ID)); 316 } 317 public int getOrg_ID() 318 { 319 Integer ii = (Integer )getValue("Org_ID"); 320 if (ii == null) return 0; 321 return ii.intValue(); 322 } 323 void setPA_ReportColumnSet_ID (int PA_ReportColumnSet_ID) 324 { 325 setValueNoCheck ("PA_ReportColumnSet_ID", new Integer (PA_ReportColumnSet_ID)); 326 } 327 public int getPA_ReportColumnSet_ID() 328 { 329 Integer ii = (Integer )getValue("PA_ReportColumnSet_ID"); 330 if (ii == null) return 0; 331 return ii.intValue(); 332 } 333 void setPA_ReportColumn_ID (int PA_ReportColumn_ID) 334 { 335 setValueNoCheck ("PA_ReportColumn_ID", new Integer (PA_ReportColumn_ID)); 336 } 337 public int getPA_ReportColumn_ID() 338 { 339 Integer ii = (Integer )getValue("PA_ReportColumn_ID"); 340 if (ii == null) return 0; 341 return ii.intValue(); 342 } 343 public static final String POSTINGTYPE_Actual = "A"; 344 public static final String POSTINGTYPE_Budget = "B"; 345 public static final String POSTINGTYPE_Encumbrance = "E"; 346 public static final String POSTINGTYPE_Statistical = "S"; 347 public void setPostingType (String PostingType) 348 { 349 if (PostingType.equals("A") || PostingType.equals("B") || PostingType.equals("E") || PostingType.equals("S")); 350 else throw new IllegalArgumentException ("PostingType Invalid value - Reference_ID=125 - A - B - E - S"); 351 if (PostingType == null) throw new IllegalArgumentException ("PostingType is mandatory"); 352 setValue ("PostingType", PostingType); 353 } 354 public String getPostingType() 355 { 356 return (String )getValue("PostingType"); 357 } 358 public void setRelativePeriod (BigDecimal RelativePeriod) 359 { 360 setValue ("RelativePeriod", RelativePeriod); 361 } 362 public BigDecimal getRelativePeriod() 363 { 364 BigDecimal bd = (BigDecimal)getValue("RelativePeriod"); 365 if (bd == null) return Env.ZERO; 366 return bd; 367 } 368 public void setSeqNo (int SeqNo) 369 { 370 setValue ("SeqNo", new Integer (SeqNo)); 371 } 372 public int getSeqNo() 373 { 374 Integer ii = (Integer )getValue("SeqNo"); 375 if (ii == null) return 0; 376 return ii.intValue(); 377 } 378 } 379 | Popular Tags |