KickJava   Java API By Example, From Geeks To Geeks.

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


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 import java.io.Serializable JavaDoc;
20 import org.compiere.util.*;
21
22
23 /**
24  * Partner Location Model
25  *
26  * @author Jorg Janke
27  * @version $Id: MBPartner_Location.java,v 1.7 2003/07/13 06:30:44 jjanke Exp $
28  */

29 public class MBPartner_Location extends X_C_BPartner_Location
30 {
31     /**
32      * Default Constructor
33      * @param ctx context
34      * @param C_BPartner_Location_ID id
35      */

36     public MBPartner_Location (Properties ctx, int C_BPartner_Location_ID)
37     {
38         this (ctx, C_BPartner_Location_ID, 0);
39     } // MBPartner_Location
40

41     /**
42      * BP Constructor
43      * @param ctx context
44      * @param C_BPartner_Location_ID location
45      * @param C_BPartner_ID BPartner
46      */

47     public MBPartner_Location (Properties ctx, int C_BPartner_Location_ID, int C_BPartner_ID)
48     {
49         super (ctx, C_BPartner_Location_ID);
50         if (C_BPartner_Location_ID == 0)
51         {
52             if (C_BPartner_ID != 0)
53                 setC_BPartner_ID (C_BPartner_ID);
54
55             setName (".");
56             setC_Location_ID (0);
57             //
58
setIsShipTo (true);
59             setIsRemitTo (true);
60             setIsPayFrom (true);
61             setIsBillTo (true);
62         }
63     } // MBPartner_Location
64

65     /**
66      * Constructor from ResultSet row
67      * @param ctx context
68      * @param rs current row of result set to be loaded
69      */

70     public MBPartner_Location (Properties ctx, ResultSet rs)
71     {
72         super (ctx, rs);
73     } // MBPartner_Location
74

75
76     /**
77      * String Representation
78      * @return info
79      */

80     public String JavaDoc toString ()
81     {
82         StringBuffer JavaDoc sb = new StringBuffer JavaDoc ("MBPartner_Location[ID=")
83             .append(getID())
84             .append(",C_Location_ID=").append(getC_Location_ID())
85             .append(",Name=").append(getName())
86             .append ("]");
87         return sb.toString ();
88     } // toString
89

90     /**
91      * Set BPartner explicitly
92      * @param C_BPartner_ID bp
93      */

94     public void setC_BPartner_ID(int C_BPartner_ID)
95     {
96         log.warn("setC_BPartner_ID setting explicitly from " + getC_BPartner_ID() + " to " + C_BPartner_ID);
97         super.setC_BPartner_ID(C_BPartner_ID);
98     } // setC_BPartner_ID
99

100     /**
101      * Set Client/Org
102      * @param AD_Client_ID client
103      * @param AD_Org_ID org
104      */

105     public void setClientOrg (int AD_Client_ID, int AD_Org_ID)
106     {
107         setAD_Client_ID(AD_Client_ID);
108         setAD_Org_ID(AD_Org_ID);
109     } // setClientOrg
110

111 } // MBPartner_Location
112
Popular Tags