PageRenderTime 51ms CodeModel.GetById 15ms RepoModel.GetById 1ms app.codeStats 0ms

/projects/compiere-330/ad/src/org/compiere/model/X_M_WorkOrder.java

https://gitlab.com/essere.lab.public/qualitas.class-corpus
Java | 1026 lines | 508 code | 207 blank | 311 comment | 45 complexity | c74977111f153f821261b00d16f155c7 MD5 | raw file
  1. /******************************************************************************
  2. * Product: Compiere ERP & CRM Smart Business Solution *
  3. * Copyright (C) 1999-2008 Compiere, Inc. All Rights Reserved. *
  4. * This program is free software, you can redistribute it and/or modify it *
  5. * under the terms version 2 of the GNU General Public License as published *
  6. * by the Free Software Foundation. This program is distributed in the hope *
  7. * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
  8. * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
  9. * See the GNU General Public License for more details. *
  10. * You should have received a copy of the GNU General Public License along *
  11. * with this program, if not, write to the Free Software Foundation, Inc., *
  12. * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
  13. * For the text or an alternative of this public license, you may reach us at *
  14. * Compiere, Inc., 3600 Bridge Parkway #102, Redwood City, CA 94065, USA *
  15. * or via info@compiere.org or http://www.compiere.org/license.html *
  16. *****************************************************************************/
  17. package org.compiere.model;
  18. /** Generated Model - DO NOT CHANGE */
  19. import java.sql.*;
  20. import org.compiere.framework.*;
  21. import org.compiere.util.*;
  22. /** Generated Model for M_WorkOrder
  23. * @author Jorg Janke (generated)
  24. * @version Release 3.2.2_Dev - $Id$ */
  25. public class X_M_WorkOrder extends PO
  26. {
  27. /** Standard Constructor
  28. @param ctx context
  29. @param M_WorkOrder_ID id
  30. @param trx transaction
  31. */
  32. public X_M_WorkOrder (Ctx ctx, int M_WorkOrder_ID, Trx trx)
  33. {
  34. super (ctx, M_WorkOrder_ID, trx);
  35. /* The following are the mandatory fields for this object.
  36. if (M_WorkOrder_ID == 0)
  37. {
  38. setC_DocType_ID (0);
  39. setC_UOM_ID (0);
  40. setDateAcct (new Timestamp(System.currentTimeMillis())); // @#Date@
  41. setDocAction (null); // PR
  42. setDocStatus (null); // DR
  43. setDocumentNo (null);
  44. setIsApproved (false); // @IsApproved@
  45. setIsSOTrx (true); // Y
  46. setM_BOM_ID (0);
  47. setM_Locator_ID (0);
  48. setM_Product_ID (0);
  49. setM_Routing_ID (0); // 1
  50. setM_Warehouse_ID (0); // @#M_Warehouse_ID@
  51. setM_WorkOrderClass_ID (0);
  52. setM_WorkOrder_ID (0);
  53. setPosted (false); // N
  54. setPriorityRule (null); // 5
  55. setProcessed (false); // N
  56. setQtyAssembled (Env.ZERO); // 0
  57. setQtyAvailable (Env.ZERO); // 0
  58. setQtyEntered (Env.ZERO); // 1
  59. setSendEMail (false); // N
  60. setWOType (null); // S
  61. }
  62. */
  63. }
  64. /** Load Constructor
  65. @param ctx context
  66. @param rs result set
  67. @param trx transaction
  68. */
  69. public X_M_WorkOrder (Ctx ctx, ResultSet rs, Trx trx)
  70. {
  71. super (ctx, rs, trx);
  72. }
  73. /** Serial Version No */
  74. private static final long serialVersionUID = 27498790429789L;
  75. /** Last Updated Timestamp 2008-07-21 11:31:53.0 */
  76. public static final long updatedMS = 1216665113000L;
  77. /** AD_Table_ID=1026 */
  78. public static final int Table_ID=1026;
  79. /** TableName=M_WorkOrder */
  80. public static final String Table_Name="M_WorkOrder";
  81. protected static KeyNamePair Model = new KeyNamePair(Table_ID,"M_WorkOrder");
  82. /**
  83. * Get AD Table ID.
  84. * @return AD_Table_ID
  85. */
  86. @Override public int get_Table_ID()
  87. {
  88. return Table_ID;
  89. }
  90. /** AD_OrgTrx_ID AD_Reference_ID=130 */
  91. public static final int AD_ORGTRX_ID_AD_Reference_ID=130;
  92. /** Set Trx Organization.
  93. @param AD_OrgTrx_ID Performing or initiating organization */
  94. public void setAD_OrgTrx_ID (int AD_OrgTrx_ID)
  95. {
  96. if (AD_OrgTrx_ID <= 0) set_Value ("AD_OrgTrx_ID", null);
  97. else
  98. set_Value ("AD_OrgTrx_ID", Integer.valueOf(AD_OrgTrx_ID));
  99. }
  100. /** Get Trx Organization.
  101. @return Performing or initiating organization */
  102. public int getAD_OrgTrx_ID()
  103. {
  104. return get_ValueAsInt("AD_OrgTrx_ID");
  105. }
  106. /** Set User/Contact.
  107. @param AD_User_ID User within the system - Internal or Business Partner Contact */
  108. public void setAD_User_ID (int AD_User_ID)
  109. {
  110. if (AD_User_ID <= 0) set_Value ("AD_User_ID", null);
  111. else
  112. set_Value ("AD_User_ID", Integer.valueOf(AD_User_ID));
  113. }
  114. /** Get User/Contact.
  115. @return User within the system - Internal or Business Partner Contact */
  116. public int getAD_User_ID()
  117. {
  118. return get_ValueAsInt("AD_User_ID");
  119. }
  120. /** Set Activity.
  121. @param C_Activity_ID Business Activity */
  122. public void setC_Activity_ID (int C_Activity_ID)
  123. {
  124. if (C_Activity_ID <= 0) set_Value ("C_Activity_ID", null);
  125. else
  126. set_Value ("C_Activity_ID", Integer.valueOf(C_Activity_ID));
  127. }
  128. /** Get Activity.
  129. @return Business Activity */
  130. public int getC_Activity_ID()
  131. {
  132. return get_ValueAsInt("C_Activity_ID");
  133. }
  134. /** Set Business Partner.
  135. @param C_BPartner_ID Identifies a Business Partner */
  136. public void setC_BPartner_ID (int C_BPartner_ID)
  137. {
  138. if (C_BPartner_ID <= 0) set_Value ("C_BPartner_ID", null);
  139. else
  140. set_Value ("C_BPartner_ID", Integer.valueOf(C_BPartner_ID));
  141. }
  142. /** Get Business Partner.
  143. @return Identifies a Business Partner */
  144. public int getC_BPartner_ID()
  145. {
  146. return get_ValueAsInt("C_BPartner_ID");
  147. }
  148. /** Set Partner Location.
  149. @param C_BPartner_Location_ID Identifies the (ship to) address for this Business Partner */
  150. public void setC_BPartner_Location_ID (int C_BPartner_Location_ID)
  151. {
  152. if (C_BPartner_Location_ID <= 0) set_Value ("C_BPartner_Location_ID", null);
  153. else
  154. set_Value ("C_BPartner_Location_ID", Integer.valueOf(C_BPartner_Location_ID));
  155. }
  156. /** Get Partner Location.
  157. @return Identifies the (ship to) address for this Business Partner */
  158. public int getC_BPartner_Location_ID()
  159. {
  160. return get_ValueAsInt("C_BPartner_Location_ID");
  161. }
  162. /** Set Campaign.
  163. @param C_Campaign_ID Marketing Campaign */
  164. public void setC_Campaign_ID (int C_Campaign_ID)
  165. {
  166. if (C_Campaign_ID <= 0) set_Value ("C_Campaign_ID", null);
  167. else
  168. set_Value ("C_Campaign_ID", Integer.valueOf(C_Campaign_ID));
  169. }
  170. /** Get Campaign.
  171. @return Marketing Campaign */
  172. public int getC_Campaign_ID()
  173. {
  174. return get_ValueAsInt("C_Campaign_ID");
  175. }
  176. /** C_DocType_ID AD_Reference_ID=170 */
  177. public static final int C_DOCTYPE_ID_AD_Reference_ID=170;
  178. /** Set Document Type.
  179. @param C_DocType_ID Document type or rules */
  180. public void setC_DocType_ID (int C_DocType_ID)
  181. {
  182. if (C_DocType_ID < 0) throw new IllegalArgumentException ("C_DocType_ID is mandatory.");
  183. set_ValueNoCheck ("C_DocType_ID", Integer.valueOf(C_DocType_ID));
  184. }
  185. /** Get Document Type.
  186. @return Document type or rules */
  187. public int getC_DocType_ID()
  188. {
  189. return get_ValueAsInt("C_DocType_ID");
  190. }
  191. /** Set Order Line.
  192. @param C_OrderLine_ID Order Line */
  193. public void setC_OrderLine_ID (int C_OrderLine_ID)
  194. {
  195. if (C_OrderLine_ID <= 0) set_Value ("C_OrderLine_ID", null);
  196. else
  197. set_Value ("C_OrderLine_ID", Integer.valueOf(C_OrderLine_ID));
  198. }
  199. /** Get Order Line.
  200. @return Order Line */
  201. public int getC_OrderLine_ID()
  202. {
  203. return get_ValueAsInt("C_OrderLine_ID");
  204. }
  205. /** Set Order.
  206. @param C_Order_ID Order */
  207. public void setC_Order_ID (int C_Order_ID)
  208. {
  209. if (C_Order_ID <= 0) set_Value ("C_Order_ID", null);
  210. else
  211. set_Value ("C_Order_ID", Integer.valueOf(C_Order_ID));
  212. }
  213. /** Get Order.
  214. @return Order */
  215. public int getC_Order_ID()
  216. {
  217. return get_ValueAsInt("C_Order_ID");
  218. }
  219. /** Set Project.
  220. @param C_Project_ID Financial Project */
  221. public void setC_Project_ID (int C_Project_ID)
  222. {
  223. if (C_Project_ID <= 0) set_Value ("C_Project_ID", null);
  224. else
  225. set_Value ("C_Project_ID", Integer.valueOf(C_Project_ID));
  226. }
  227. /** Get Project.
  228. @return Financial Project */
  229. public int getC_Project_ID()
  230. {
  231. return get_ValueAsInt("C_Project_ID");
  232. }
  233. /** Set UOM.
  234. @param C_UOM_ID Unit of Measure */
  235. public void setC_UOM_ID (int C_UOM_ID)
  236. {
  237. if (C_UOM_ID < 1) throw new IllegalArgumentException ("C_UOM_ID is mandatory.");
  238. set_Value ("C_UOM_ID", Integer.valueOf(C_UOM_ID));
  239. }
  240. /** Get UOM.
  241. @return Unit of Measure */
  242. public int getC_UOM_ID()
  243. {
  244. return get_ValueAsInt("C_UOM_ID");
  245. }
  246. /** Set Copy From.
  247. @param CopyFrom Copy From Record */
  248. public void setCopyFrom (String CopyFrom)
  249. {
  250. set_Value ("CopyFrom", CopyFrom);
  251. }
  252. /** Get Copy From.
  253. @return Copy From Record */
  254. public String getCopyFrom()
  255. {
  256. return (String)get_Value("CopyFrom");
  257. }
  258. /** Set Account Date.
  259. @param DateAcct General Ledger Date */
  260. public void setDateAcct (Timestamp DateAcct)
  261. {
  262. if (DateAcct == null) throw new IllegalArgumentException ("DateAcct is mandatory.");
  263. set_Value ("DateAcct", DateAcct);
  264. }
  265. /** Get Account Date.
  266. @return General Ledger Date */
  267. public Timestamp getDateAcct()
  268. {
  269. return (Timestamp)get_Value("DateAcct");
  270. }
  271. /** Set Actual Date From.
  272. @param DateActualFrom Actual date an activity started */
  273. public void setDateActualFrom (Timestamp DateActualFrom)
  274. {
  275. set_Value ("DateActualFrom", DateActualFrom);
  276. }
  277. /** Get Actual Date From.
  278. @return Actual date an activity started */
  279. public Timestamp getDateActualFrom()
  280. {
  281. return (Timestamp)get_Value("DateActualFrom");
  282. }
  283. /** Set Actual Date To.
  284. @param DateActualTo Actual date an activity ended */
  285. public void setDateActualTo (Timestamp DateActualTo)
  286. {
  287. set_Value ("DateActualTo", DateActualTo);
  288. }
  289. /** Get Actual Date To.
  290. @return Actual date an activity ended */
  291. public Timestamp getDateActualTo()
  292. {
  293. return (Timestamp)get_Value("DateActualTo");
  294. }
  295. /** Set Scheduled Date From.
  296. @param DateScheduleFrom Date an activity is scheduled to start */
  297. public void setDateScheduleFrom (Timestamp DateScheduleFrom)
  298. {
  299. set_Value ("DateScheduleFrom", DateScheduleFrom);
  300. }
  301. /** Get Scheduled Date From.
  302. @return Date an activity is scheduled to start */
  303. public Timestamp getDateScheduleFrom()
  304. {
  305. return (Timestamp)get_Value("DateScheduleFrom");
  306. }
  307. /** Set Scheduled Date To.
  308. @param DateScheduleTo Date an activity is scheduled to end */
  309. public void setDateScheduleTo (Timestamp DateScheduleTo)
  310. {
  311. set_Value ("DateScheduleTo", DateScheduleTo);
  312. }
  313. /** Get Scheduled Date To.
  314. @return Date an activity is scheduled to end */
  315. public Timestamp getDateScheduleTo()
  316. {
  317. return (Timestamp)get_Value("DateScheduleTo");
  318. }
  319. /** Set Description.
  320. @param Description Optional short description of the record */
  321. public void setDescription (String Description)
  322. {
  323. set_Value ("Description", Description);
  324. }
  325. /** Get Description.
  326. @return Optional short description of the record */
  327. public String getDescription()
  328. {
  329. return (String)get_Value("Description");
  330. }
  331. /** DocAction AD_Reference_ID=135 */
  332. public static final int DOCACTION_AD_Reference_ID=135;
  333. /** <None> = -- */
  334. public static final String DOCACTION_None = X_Ref__Document_Action.NONE.getValue();
  335. /** Approve = AP */
  336. public static final String DOCACTION_Approve = X_Ref__Document_Action.APPROVE.getValue();
  337. /** Close = CL */
  338. public static final String DOCACTION_Close = X_Ref__Document_Action.CLOSE.getValue();
  339. /** Complete = CO */
  340. public static final String DOCACTION_Complete = X_Ref__Document_Action.COMPLETE.getValue();
  341. /** Invalidate = IN */
  342. public static final String DOCACTION_Invalidate = X_Ref__Document_Action.INVALIDATE.getValue();
  343. /** Post = PO */
  344. public static final String DOCACTION_Post = X_Ref__Document_Action.POST.getValue();
  345. /** Prepare = PR */
  346. public static final String DOCACTION_Prepare = X_Ref__Document_Action.PREPARE.getValue();
  347. /** Reverse - Accrual = RA */
  348. public static final String DOCACTION_Reverse_Accrual = X_Ref__Document_Action.REVERSE__ACCRUAL.getValue();
  349. /** Reverse - Correct = RC */
  350. public static final String DOCACTION_Reverse_Correct = X_Ref__Document_Action.REVERSE__CORRECT.getValue();
  351. /** Re-activate = RE */
  352. public static final String DOCACTION_Re_Activate = X_Ref__Document_Action.RE__ACTIVATE.getValue();
  353. /** Reject = RJ */
  354. public static final String DOCACTION_Reject = X_Ref__Document_Action.REJECT.getValue();
  355. /** Void = VO */
  356. public static final String DOCACTION_Void = X_Ref__Document_Action.VOID.getValue();
  357. /** Wait Complete = WC */
  358. public static final String DOCACTION_WaitComplete = X_Ref__Document_Action.WAIT_COMPLETE.getValue();
  359. /** Unlock = XL */
  360. public static final String DOCACTION_Unlock = X_Ref__Document_Action.UNLOCK.getValue();
  361. /** Is test a valid value.
  362. @param test testvalue
  363. @return true if valid **/
  364. public static boolean isDocActionValid(String test)
  365. {
  366. return X_Ref__Document_Action.isValid(test);
  367. }
  368. /** Set Document Action.
  369. @param DocAction The targeted status of the document */
  370. public void setDocAction (String DocAction)
  371. {
  372. if (DocAction == null) throw new IllegalArgumentException ("DocAction is mandatory");
  373. if (!isDocActionValid(DocAction))
  374. throw new IllegalArgumentException ("DocAction Invalid value - " + DocAction + " - Reference_ID=135 - -- - AP - CL - CO - IN - PO - PR - RA - RC - RE - RJ - VO - WC - XL");
  375. set_Value ("DocAction", DocAction);
  376. }
  377. /** Get Document Action.
  378. @return The targeted status of the document */
  379. public String getDocAction()
  380. {
  381. return (String)get_Value("DocAction");
  382. }
  383. /** DocStatus AD_Reference_ID=131 */
  384. public static final int DOCSTATUS_AD_Reference_ID=131;
  385. /** Unknown = ?? */
  386. public static final String DOCSTATUS_Unknown = X_Ref__Document_Status.UNKNOWN.getValue();
  387. /** Approved = AP */
  388. public static final String DOCSTATUS_Approved = X_Ref__Document_Status.APPROVED.getValue();
  389. /** Closed = CL */
  390. public static final String DOCSTATUS_Closed = X_Ref__Document_Status.CLOSED.getValue();
  391. /** Completed = CO */
  392. public static final String DOCSTATUS_Completed = X_Ref__Document_Status.COMPLETED.getValue();
  393. /** Drafted = DR */
  394. public static final String DOCSTATUS_Drafted = X_Ref__Document_Status.DRAFTED.getValue();
  395. /** Invalid = IN */
  396. public static final String DOCSTATUS_Invalid = X_Ref__Document_Status.INVALID.getValue();
  397. /** In Progress = IP */
  398. public static final String DOCSTATUS_InProgress = X_Ref__Document_Status.IN_PROGRESS.getValue();
  399. /** Not Approved = NA */
  400. public static final String DOCSTATUS_NotApproved = X_Ref__Document_Status.NOT_APPROVED.getValue();
  401. /** Reversed = RE */
  402. public static final String DOCSTATUS_Reversed = X_Ref__Document_Status.REVERSED.getValue();
  403. /** Voided = VO */
  404. public static final String DOCSTATUS_Voided = X_Ref__Document_Status.VOIDED.getValue();
  405. /** Waiting Confirmation = WC */
  406. public static final String DOCSTATUS_WaitingConfirmation = X_Ref__Document_Status.WAITING_CONFIRMATION.getValue();
  407. /** Waiting Payment = WP */
  408. public static final String DOCSTATUS_WaitingPayment = X_Ref__Document_Status.WAITING_PAYMENT.getValue();
  409. /** Is test a valid value.
  410. @param test testvalue
  411. @return true if valid **/
  412. public static boolean isDocStatusValid(String test)
  413. {
  414. return X_Ref__Document_Status.isValid(test);
  415. }
  416. /** Set Document Status.
  417. @param DocStatus The current status of the document */
  418. public void setDocStatus (String DocStatus)
  419. {
  420. if (DocStatus == null) throw new IllegalArgumentException ("DocStatus is mandatory");
  421. if (!isDocStatusValid(DocStatus))
  422. throw new IllegalArgumentException ("DocStatus Invalid value - " + DocStatus + " - Reference_ID=131 - ?? - AP - CL - CO - DR - IN - IP - NA - RE - VO - WC - WP");
  423. set_Value ("DocStatus", DocStatus);
  424. }
  425. /** Get Document Status.
  426. @return The current status of the document */
  427. public String getDocStatus()
  428. {
  429. return (String)get_Value("DocStatus");
  430. }
  431. /** Set Document No.
  432. @param DocumentNo Document sequence number of the document */
  433. public void setDocumentNo (String DocumentNo)
  434. {
  435. if (DocumentNo == null) throw new IllegalArgumentException ("DocumentNo is mandatory.");
  436. set_ValueNoCheck ("DocumentNo", DocumentNo);
  437. }
  438. /** Get Document No.
  439. @return Document sequence number of the document */
  440. public String getDocumentNo()
  441. {
  442. return (String)get_Value("DocumentNo");
  443. }
  444. /** Get Record ID/ColumnName
  445. @return ID/ColumnName pair */
  446. public KeyNamePair getKeyNamePair()
  447. {
  448. return new KeyNamePair(get_ID(), getDocumentNo());
  449. }
  450. /** Set Comment.
  451. @param Help Comment, Help or Hint */
  452. public void setHelp (String Help)
  453. {
  454. set_Value ("Help", Help);
  455. }
  456. /** Get Comment.
  457. @return Comment, Help or Hint */
  458. public String getHelp()
  459. {
  460. return (String)get_Value("Help");
  461. }
  462. /** Set Approved.
  463. @param IsApproved Indicates if this document requires approval */
  464. public void setIsApproved (boolean IsApproved)
  465. {
  466. set_Value ("IsApproved", Boolean.valueOf(IsApproved));
  467. }
  468. /** Get Approved.
  469. @return Indicates if this document requires approval */
  470. public boolean isApproved()
  471. {
  472. return get_ValueAsBoolean("IsApproved");
  473. }
  474. /** Set Sales Transaction.
  475. @param IsSOTrx This is a Sales Transaction */
  476. public void setIsSOTrx (boolean IsSOTrx)
  477. {
  478. set_Value ("IsSOTrx", Boolean.valueOf(IsSOTrx));
  479. }
  480. /** Get Sales Transaction.
  481. @return This is a Sales Transaction */
  482. public boolean isSOTrx()
  483. {
  484. return get_ValueAsBoolean("IsSOTrx");
  485. }
  486. /** Set Attribute Set Instance.
  487. @param M_AttributeSetInstance_ID Product Attribute Set Instance */
  488. public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID)
  489. {
  490. if (M_AttributeSetInstance_ID <= 0) set_Value ("M_AttributeSetInstance_ID", null);
  491. else
  492. set_Value ("M_AttributeSetInstance_ID", Integer.valueOf(M_AttributeSetInstance_ID));
  493. }
  494. /** Get Attribute Set Instance.
  495. @return Product Attribute Set Instance */
  496. public int getM_AttributeSetInstance_ID()
  497. {
  498. return get_ValueAsInt("M_AttributeSetInstance_ID");
  499. }
  500. /** Set BOM.
  501. @param M_BOM_ID Bill of Materials */
  502. public void setM_BOM_ID (int M_BOM_ID)
  503. {
  504. if (M_BOM_ID < 1) throw new IllegalArgumentException ("M_BOM_ID is mandatory.");
  505. set_Value ("M_BOM_ID", Integer.valueOf(M_BOM_ID));
  506. }
  507. /** Get BOM.
  508. @return Bill of Materials */
  509. public int getM_BOM_ID()
  510. {
  511. return get_ValueAsInt("M_BOM_ID");
  512. }
  513. /** M_Locator_ID AD_Reference_ID=446 */
  514. public static final int M_LOCATOR_ID_AD_Reference_ID=446;
  515. /** Set Locator.
  516. @param M_Locator_ID Warehouse Locator */
  517. public void setM_Locator_ID (int M_Locator_ID)
  518. {
  519. if (M_Locator_ID < 1) throw new IllegalArgumentException ("M_Locator_ID is mandatory.");
  520. set_Value ("M_Locator_ID", Integer.valueOf(M_Locator_ID));
  521. }
  522. /** Get Locator.
  523. @return Warehouse Locator */
  524. public int getM_Locator_ID()
  525. {
  526. return get_ValueAsInt("M_Locator_ID");
  527. }
  528. /** Set Product.
  529. @param M_Product_ID Product, Service, Item */
  530. public void setM_Product_ID (int M_Product_ID)
  531. {
  532. if (M_Product_ID < 1) throw new IllegalArgumentException ("M_Product_ID is mandatory.");
  533. set_Value ("M_Product_ID", Integer.valueOf(M_Product_ID));
  534. }
  535. /** Get Product.
  536. @return Product, Service, Item */
  537. public int getM_Product_ID()
  538. {
  539. return get_ValueAsInt("M_Product_ID");
  540. }
  541. /** Set Routing.
  542. @param M_Routing_ID Routing for an assembly */
  543. public void setM_Routing_ID (int M_Routing_ID)
  544. {
  545. if (M_Routing_ID < 1) throw new IllegalArgumentException ("M_Routing_ID is mandatory.");
  546. set_Value ("M_Routing_ID", Integer.valueOf(M_Routing_ID));
  547. }
  548. /** Get Routing.
  549. @return Routing for an assembly */
  550. public int getM_Routing_ID()
  551. {
  552. return get_ValueAsInt("M_Routing_ID");
  553. }
  554. /** Set Warehouse.
  555. @param M_Warehouse_ID Storage Warehouse and Service Point */
  556. public void setM_Warehouse_ID (int M_Warehouse_ID)
  557. {
  558. if (M_Warehouse_ID < 1) throw new IllegalArgumentException ("M_Warehouse_ID is mandatory.");
  559. set_Value ("M_Warehouse_ID", Integer.valueOf(M_Warehouse_ID));
  560. }
  561. /** Get Warehouse.
  562. @return Storage Warehouse and Service Point */
  563. public int getM_Warehouse_ID()
  564. {
  565. return get_ValueAsInt("M_Warehouse_ID");
  566. }
  567. /** Set Work Order Class.
  568. @param M_WorkOrderClass_ID Indicates the document types and accounts to be used for a work order */
  569. public void setM_WorkOrderClass_ID (int M_WorkOrderClass_ID)
  570. {
  571. if (M_WorkOrderClass_ID < 1) throw new IllegalArgumentException ("M_WorkOrderClass_ID is mandatory.");
  572. set_ValueNoCheck ("M_WorkOrderClass_ID", Integer.valueOf(M_WorkOrderClass_ID));
  573. }
  574. /** Get Work Order Class.
  575. @return Indicates the document types and accounts to be used for a work order */
  576. public int getM_WorkOrderClass_ID()
  577. {
  578. return get_ValueAsInt("M_WorkOrderClass_ID");
  579. }
  580. /** Set Work Order.
  581. @param M_WorkOrder_ID Work Order */
  582. public void setM_WorkOrder_ID (int M_WorkOrder_ID)
  583. {
  584. if (M_WorkOrder_ID < 1) throw new IllegalArgumentException ("M_WorkOrder_ID is mandatory.");
  585. set_ValueNoCheck ("M_WorkOrder_ID", Integer.valueOf(M_WorkOrder_ID));
  586. }
  587. /** Get Work Order.
  588. @return Work Order */
  589. public int getM_WorkOrder_ID()
  590. {
  591. return get_ValueAsInt("M_WorkOrder_ID");
  592. }
  593. /** Set Posted.
  594. @param Posted Posting status */
  595. public void setPosted (boolean Posted)
  596. {
  597. set_ValueNoCheck ("Posted", Boolean.valueOf(Posted));
  598. }
  599. /** Get Posted.
  600. @return Posting status */
  601. public boolean isPosted()
  602. {
  603. return get_ValueAsBoolean("Posted");
  604. }
  605. /** PriorityRule AD_Reference_ID=154 */
  606. public static final int PRIORITYRULE_AD_Reference_ID=154;
  607. /** Urgent = 1 */
  608. public static final String PRIORITYRULE_Urgent = X_Ref__PriorityRule.URGENT.getValue();
  609. /** High = 3 */
  610. public static final String PRIORITYRULE_High = X_Ref__PriorityRule.HIGH.getValue();
  611. /** Medium = 5 */
  612. public static final String PRIORITYRULE_Medium = X_Ref__PriorityRule.MEDIUM.getValue();
  613. /** Low = 7 */
  614. public static final String PRIORITYRULE_Low = X_Ref__PriorityRule.LOW.getValue();
  615. /** Minor = 9 */
  616. public static final String PRIORITYRULE_Minor = X_Ref__PriorityRule.MINOR.getValue();
  617. /** Is test a valid value.
  618. @param test testvalue
  619. @return true if valid **/
  620. public static boolean isPriorityRuleValid(String test)
  621. {
  622. return X_Ref__PriorityRule.isValid(test);
  623. }
  624. /** Set Priority.
  625. @param PriorityRule Priority of a document */
  626. public void setPriorityRule (String PriorityRule)
  627. {
  628. if (PriorityRule == null) throw new IllegalArgumentException ("PriorityRule is mandatory");
  629. if (!isPriorityRuleValid(PriorityRule))
  630. throw new IllegalArgumentException ("PriorityRule Invalid value - " + PriorityRule + " - Reference_ID=154 - 1 - 3 - 5 - 7 - 9");
  631. set_Value ("PriorityRule", PriorityRule);
  632. }
  633. /** Get Priority.
  634. @return Priority of a document */
  635. public String getPriorityRule()
  636. {
  637. return (String)get_Value("PriorityRule");
  638. }
  639. /** Set Processed.
  640. @param Processed The document has been processed */
  641. public void setProcessed (boolean Processed)
  642. {
  643. set_ValueNoCheck ("Processed", Boolean.valueOf(Processed));
  644. }
  645. /** Get Processed.
  646. @return The document has been processed */
  647. public boolean isProcessed()
  648. {
  649. return get_ValueAsBoolean("Processed");
  650. }
  651. /** Set Process Now.
  652. @param Processing Process Now */
  653. public void setProcessing (boolean Processing)
  654. {
  655. set_Value ("Processing", Boolean.valueOf(Processing));
  656. }
  657. /** Get Process Now.
  658. @return Process Now */
  659. public boolean isProcessing()
  660. {
  661. return get_ValueAsBoolean("Processing");
  662. }
  663. /** Set Qty Assembled.
  664. @param QtyAssembled Quantity finished at a production routing step */
  665. public void setQtyAssembled (java.math.BigDecimal QtyAssembled)
  666. {
  667. if (QtyAssembled == null) throw new IllegalArgumentException ("QtyAssembled is mandatory.");
  668. set_Value ("QtyAssembled", QtyAssembled);
  669. }
  670. /** Get Qty Assembled.
  671. @return Quantity finished at a production routing step */
  672. public java.math.BigDecimal getQtyAssembled()
  673. {
  674. return get_ValueAsBigDecimal("QtyAssembled");
  675. }
  676. /** Set Available Quantity.
  677. @param QtyAvailable Available Quantity (On Hand - Reserved) */
  678. public void setQtyAvailable (java.math.BigDecimal QtyAvailable)
  679. {
  680. if (QtyAvailable == null) throw new IllegalArgumentException ("QtyAvailable is mandatory.");
  681. set_Value ("QtyAvailable", QtyAvailable);
  682. }
  683. /** Get Available Quantity.
  684. @return Available Quantity (On Hand - Reserved) */
  685. public java.math.BigDecimal getQtyAvailable()
  686. {
  687. return get_ValueAsBigDecimal("QtyAvailable");
  688. }
  689. /** Set Quantity.
  690. @param QtyEntered The Quantity Entered is based on the selected UoM */
  691. public void setQtyEntered (java.math.BigDecimal QtyEntered)
  692. {
  693. if (QtyEntered == null) throw new IllegalArgumentException ("QtyEntered is mandatory.");
  694. set_Value ("QtyEntered", QtyEntered);
  695. }
  696. /** Get Quantity.
  697. @return The Quantity Entered is based on the selected UoM */
  698. public java.math.BigDecimal getQtyEntered()
  699. {
  700. return get_ValueAsBigDecimal("QtyEntered");
  701. }
  702. /** SalesRep_ID AD_Reference_ID=286 */
  703. public static final int SALESREP_ID_AD_Reference_ID=286;
  704. /** Set Representative.
  705. @param SalesRep_ID Company Agent like Sales Representative, Purchase Agent, and Customer Service Representative... */
  706. public void setSalesRep_ID (int SalesRep_ID)
  707. {
  708. if (SalesRep_ID <= 0) set_Value ("SalesRep_ID", null);
  709. else
  710. set_Value ("SalesRep_ID", Integer.valueOf(SalesRep_ID));
  711. }
  712. /** Get Representative.
  713. @return Company Agent like Sales Representative, Purchase Agent, and Customer Service Representative... */
  714. public int getSalesRep_ID()
  715. {
  716. return get_ValueAsInt("SalesRep_ID");
  717. }
  718. /** Set Send EMail.
  719. @param SendEMail Enable sending Document EMail */
  720. public void setSendEMail (boolean SendEMail)
  721. {
  722. set_Value ("SendEMail", Boolean.valueOf(SendEMail));
  723. }
  724. /** Get Send EMail.
  725. @return Enable sending Document EMail */
  726. public boolean isSendEMail()
  727. {
  728. return get_ValueAsBoolean("SendEMail");
  729. }
  730. /** User1_ID AD_Reference_ID=134 */
  731. public static final int USER1_ID_AD_Reference_ID=134;
  732. /** Set User List 1.
  733. @param User1_ID User defined list element #1 */
  734. public void setUser1_ID (int User1_ID)
  735. {
  736. if (User1_ID <= 0) set_Value ("User1_ID", null);
  737. else
  738. set_Value ("User1_ID", Integer.valueOf(User1_ID));
  739. }
  740. /** Get User List 1.
  741. @return User defined list element #1 */
  742. public int getUser1_ID()
  743. {
  744. return get_ValueAsInt("User1_ID");
  745. }
  746. /** User2_ID AD_Reference_ID=137 */
  747. public static final int USER2_ID_AD_Reference_ID=137;
  748. /** Set User List 2.
  749. @param User2_ID User defined list element #2 */
  750. public void setUser2_ID (int User2_ID)
  751. {
  752. if (User2_ID <= 0) set_Value ("User2_ID", null);
  753. else
  754. set_Value ("User2_ID", Integer.valueOf(User2_ID));
  755. }
  756. /** Get User List 2.
  757. @return User defined list element #2 */
  758. public int getUser2_ID()
  759. {
  760. return get_ValueAsInt("User2_ID");
  761. }
  762. /** WOSource AD_Reference_ID=449 */
  763. public static final int WOSOURCE_AD_Reference_ID=449;
  764. /** Sales Order = O */
  765. public static final String WOSOURCE_SalesOrder = X_Ref_M_WorkOrder_WOSource.SALES_ORDER.getValue();
  766. /** Is test a valid value.
  767. @param test testvalue
  768. @return true if valid **/
  769. public static boolean isWOSourceValid(String test)
  770. {
  771. return X_Ref_M_WorkOrder_WOSource.isValid(test);
  772. }
  773. /** Set Source.
  774. @param WOSource Work Order source */
  775. public void setWOSource (String WOSource)
  776. {
  777. if (!isWOSourceValid(WOSource))
  778. throw new IllegalArgumentException ("WOSource Invalid value - " + WOSource + " - Reference_ID=449 - O");
  779. set_Value ("WOSource", WOSource);
  780. }
  781. /** Get Source.
  782. @return Work Order source */
  783. public String getWOSource()
  784. {
  785. return (String)get_Value("WOSource");
  786. }
  787. /** WOType AD_Reference_ID=450 */
  788. public static final int WOTYPE_AD_Reference_ID=450;
  789. /** Refurbish = F */
  790. public static final String WOTYPE_Refurbish = X_Ref_M_WorkOrder_Type.REFURBISH.getValue();
  791. /** Repair = R */
  792. public static final String WOTYPE_Repair = X_Ref_M_WorkOrder_Type.REPAIR.getValue();
  793. /** Standard = S */
  794. public static final String WOTYPE_Standard = X_Ref_M_WorkOrder_Type.STANDARD.getValue();
  795. /** Is test a valid value.
  796. @param test testvalue
  797. @return true if valid **/
  798. public static boolean isWOTypeValid(String test)
  799. {
  800. return X_Ref_M_WorkOrder_Type.isValid(test);
  801. }
  802. /** Set Work Order Type.
  803. @param WOType Work Order Type */
  804. public void setWOType (String WOType)
  805. {
  806. if (WOType == null) throw new IllegalArgumentException ("WOType is mandatory");
  807. if (!isWOTypeValid(WOType))
  808. throw new IllegalArgumentException ("WOType Invalid value - " + WOType + " - Reference_ID=450 - F - R - S");
  809. set_ValueNoCheck ("WOType", WOType);
  810. }
  811. /** Get Work Order Type.
  812. @return Work Order Type */
  813. public String getWOType()
  814. {
  815. return (String)get_Value("WOType");
  816. }
  817. }