KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > compiere > model > MInventoryLine


1 /******************************************************************************
2  * The contents of this file are subject to the Compiere License Version 1.1
3  * ("License"); You may not use this file except in compliance with the License
4  * You may obtain a copy of the License at http://www.compiere.org/license.html
5  * Software distributed under the License is distributed on an "AS IS" basis,
6  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
7  * the specific language governing rights and limitations under the License.
8  * The Original Code is Compiere ERP & CRM Smart Business Solution
9  * The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc.
10  * Portions created by Jorg Janke are Copyright (C) 1999-2003 Jorg Janke, parts
11  * created by ComPiere are Copyright (C) ComPiere, Inc.; All Rights Reserved.
12  * Contributor(s): ______________________________________.
13  *****************************************************************************/

14 package org.compiere.model;
15
16 import java.util.*;
17 import java.sql.*;
18 import java.math.*;
19
20 import org.compiere.util.Env;
21
22 /**
23  * Physical Inventory Line Model
24  *
25  * @author Jorg Janke
26  * @version $Id: MInventoryLine.java,v 1.2 2003/08/25 02:31:57 jjanke Exp $
27  */

28 public class MInventoryLine extends X_M_InventoryLine
29 {
30     public MInventoryLine (Properties ctx, int M_InventoryLine_ID)
31     {
32         super (ctx, M_InventoryLine_ID);
33         if (M_InventoryLine_ID == 0)
34         {
35         // setM_Inventory_ID (0); // Parent
36
// setM_InventoryLine_ID (0); // PK
37
// setM_Locator_ID (0); // FK
38
// setM_Product_ID (0); // FK
39
setQtyBook (Env.ZERO);
40             setQtyCount (Env.ZERO);
41         }
42     } // MInventoryLine
43

44     public MInventoryLine (Properties ctx, ResultSet rs)
45     {
46         super (ctx, rs);
47     } // MInventoryLine
48

49     public MInventoryLine (MInventory inventory, int M_Locator_ID, int M_Product_ID,
50         BigDecimal QtyBook, BigDecimal QtyCount)
51     {
52         super (inventory.getCtx(), 0);
53         setM_Inventory_ID (inventory.getM_Inventory_ID()); // Parent
54
setClientOrg (inventory.getAD_Client_ID(), inventory.getAD_Org_ID());
55     // setM_InventoryLine_ID (0); // PK
56
setM_Locator_ID (M_Locator_ID); // FK
57
setM_Product_ID (M_Product_ID); // FK
58
//
59
if (QtyBook == null)
60             setQtyBook (Env.ZERO);
61         else
62             setQtyBook (QtyBook);
63         if (QtyCount == null)
64             setQtyCount (Env.ZERO);
65         else
66             setQtyCount (QtyCount);
67     } // MInventoryLine
68

69
70 } // MInventoryLine
71
Popular Tags