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_M_Transaction extends PO 11 { 12 13 public X_M_Transaction (Properties ctx, int M_Transaction_ID) 14 { 15 super (ctx, M_Transaction_ID); 16 27 } 28 29 public X_M_Transaction (Properties ctx, ResultSet rs) 30 { 31 super (ctx, rs); 32 } 33 34 protected POInfo initPO (Properties ctx) 35 { 36 int AD_Table_ID = 329; 37 POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID); 38 return poi; 39 } 40 public String toString() 41 { 42 StringBuffer sb = new StringBuffer ("X_M_Transaction[").append(getID()).append("]"); 43 return sb.toString(); 44 } 45 void setC_ProjectIssue_ID (int C_ProjectIssue_ID) 46 { 47 if (C_ProjectIssue_ID == 0) setValueNoCheck ("C_ProjectIssue_ID", null); 48 else 49 setValueNoCheck ("C_ProjectIssue_ID", new Integer (C_ProjectIssue_ID)); 50 } 51 public int getC_ProjectIssue_ID() 52 { 53 Integer ii = (Integer )getValue("C_ProjectIssue_ID"); 54 if (ii == null) return 0; 55 return ii.intValue(); 56 } 57 void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID) 58 { 59 setValueNoCheck ("M_AttributeSetInstance_ID", new Integer (M_AttributeSetInstance_ID)); 60 } 61 public int getM_AttributeSetInstance_ID() 62 { 63 Integer ii = (Integer )getValue("M_AttributeSetInstance_ID"); 64 if (ii == null) return 0; 65 return ii.intValue(); 66 } 67 void setM_InOutLine_ID (int M_InOutLine_ID) 68 { 69 if (M_InOutLine_ID == 0) setValueNoCheck ("M_InOutLine_ID", null); 70 else 71 setValueNoCheck ("M_InOutLine_ID", new Integer (M_InOutLine_ID)); 72 } 73 public int getM_InOutLine_ID() 74 { 75 Integer ii = (Integer )getValue("M_InOutLine_ID"); 76 if (ii == null) return 0; 77 return ii.intValue(); 78 } 79 void setM_InventoryLine_ID (int M_InventoryLine_ID) 80 { 81 if (M_InventoryLine_ID == 0) setValueNoCheck ("M_InventoryLine_ID", null); 82 else 83 setValueNoCheck ("M_InventoryLine_ID", new Integer (M_InventoryLine_ID)); 84 } 85 public int getM_InventoryLine_ID() 86 { 87 Integer ii = (Integer )getValue("M_InventoryLine_ID"); 88 if (ii == null) return 0; 89 return ii.intValue(); 90 } 91 void setM_Locator_ID (int M_Locator_ID) 92 { 93 setValueNoCheck ("M_Locator_ID", new Integer (M_Locator_ID)); 94 } 95 public int getM_Locator_ID() 96 { 97 Integer ii = (Integer )getValue("M_Locator_ID"); 98 if (ii == null) return 0; 99 return ii.intValue(); 100 } 101 void setM_MovementLine_ID (int M_MovementLine_ID) 102 { 103 if (M_MovementLine_ID == 0) setValueNoCheck ("M_MovementLine_ID", null); 104 else 105 setValueNoCheck ("M_MovementLine_ID", new Integer (M_MovementLine_ID)); 106 } 107 public int getM_MovementLine_ID() 108 { 109 Integer ii = (Integer )getValue("M_MovementLine_ID"); 110 if (ii == null) return 0; 111 return ii.intValue(); 112 } 113 void setM_Product_ID (int M_Product_ID) 114 { 115 setValueNoCheck ("M_Product_ID", new Integer (M_Product_ID)); 116 } 117 public int getM_Product_ID() 118 { 119 Integer ii = (Integer )getValue("M_Product_ID"); 120 if (ii == null) return 0; 121 return ii.intValue(); 122 } 123 void setM_ProductionLine_ID (int M_ProductionLine_ID) 124 { 125 if (M_ProductionLine_ID == 0) setValueNoCheck ("M_ProductionLine_ID", null); 126 else 127 setValueNoCheck ("M_ProductionLine_ID", new Integer (M_ProductionLine_ID)); 128 } 129 public int getM_ProductionLine_ID() 130 { 131 Integer ii = (Integer )getValue("M_ProductionLine_ID"); 132 if (ii == null) return 0; 133 return ii.intValue(); 134 } 135 void setM_Transaction_ID (int M_Transaction_ID) 136 { 137 setValueNoCheck ("M_Transaction_ID", new Integer (M_Transaction_ID)); 138 } 139 public int getM_Transaction_ID() 140 { 141 Integer ii = (Integer )getValue("M_Transaction_ID"); 142 if (ii == null) return 0; 143 return ii.intValue(); 144 } 145 void setMovementDate (Timestamp MovementDate) 146 { 147 if (MovementDate == null) throw new IllegalArgumentException ("MovementDate is mandatory"); 148 setValueNoCheck ("MovementDate", MovementDate); 149 } 150 public Timestamp getMovementDate() 151 { 152 return (Timestamp)getValue("MovementDate"); 153 } 154 void setMovementQty (BigDecimal MovementQty) 155 { 156 if (MovementQty == null) throw new IllegalArgumentException ("MovementQty is mandatory"); 157 setValueNoCheck ("MovementQty", MovementQty); 158 } 159 public BigDecimal getMovementQty() 160 { 161 BigDecimal bd = (BigDecimal)getValue("MovementQty"); 162 if (bd == null) return Env.ZERO; 163 return bd; 164 } 165 public static final String MOVEMENTTYPE_ProductionPlus = "P+"; 166 public static final String MOVEMENTTYPE_ProductionMinus = "P-"; 167 public static final String MOVEMENTTYPE_CustomerShipment = "C-"; 168 public static final String MOVEMENTTYPE_CustomerReturns = "C+"; 169 public static final String MOVEMENTTYPE_VendorReceipts = "V+"; 170 public static final String MOVEMENTTYPE_VendorReturns = "V-"; 171 public static final String MOVEMENTTYPE_InventoryOut = "I-"; 172 public static final String MOVEMENTTYPE_InventoryIn = "I+"; 173 public static final String MOVEMENTTYPE_MovementFrom = "M-"; 174 public static final String MOVEMENTTYPE_MovementTo = "M+"; 175 public static final String MOVEMENTTYPE_WorkOrderPlus = "W+"; 176 public static final String MOVEMENTTYPE_WorkOrderMinus = "W-"; 177 void setMovementType (String MovementType) 178 { 179 if (MovementType.equals("P+") || MovementType.equals("P-") || MovementType.equals("C-") || MovementType.equals("C+") || MovementType.equals("V+") || MovementType.equals("V-") || MovementType.equals("I-") || MovementType.equals("I+") || MovementType.equals("M-") || MovementType.equals("M+") || MovementType.equals("W+") || MovementType.equals("W-")); 180 else throw new IllegalArgumentException ("MovementType Invalid value - Reference_ID=189 - P+ - P- - C- - C+ - V+ - V- - I- - I+ - M- - M+ - W+ - W-"); 181 if (MovementType == null) throw new IllegalArgumentException ("MovementType is mandatory"); 182 setValueNoCheck ("MovementType", MovementType); 183 } 184 public String getMovementType() 185 { 186 return (String )getValue("MovementType"); 187 } 188 } 189
| Popular Tags
|