KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > poker > data > DODS_Fortune > FortuneBDO


1 /*-----------------------------------------------------------------------------
2  * Enhydra Java Application Server
3  * Copyright 1997-1999 Lutris Technologies, Inc.
4  * All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  * 1. Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  * 2. Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in
13  * the documentation and/or other materials provided with the distribution.
14  * 3. All advertising materials mentioning features or use of this software
15  * must display the following acknowledgement:
16  * This product includes Enhydra software developed by Lutris
17  * Technologies, Inc. and its contributors.
18  * 4. Neither the name of Lutris Technologies nor the names of its contributors
19  * may be used to endorse or promote products derived from this software
20  * without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY LUTRIS TECHNOLOGIES AND CONTRIBUTORS ``AS IS''
23  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25  * ARE DISCLAIMED. IN NO EVENT SHALL LUTRIS TECHNOLOGIES OR CONTRIBUTORS BE
26  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32  * POSSIBILITY OF SUCH DAMAGE.
33  *-----------------------------------------------------------------------------
34  * /usr/local/apps/Poker/poker/data/DODS_Fortune/FortuneBDO.java
35  *-----------------------------------------------------------------------------
36  */

37
38 package poker.data.DODS_Fortune;
39
40 //import dods.builder.sourceGenerators.Query.DataObjectException;
41
import com.lutris.dods.builder.generator.query.*;
42
43 /**
44  * FortuneBDO contains the same set and get methods as
45  * the FortuneDO class.
46  * Business Object (BO) classes typically need these set and get methods.
47  * So by deriving a BO from a BDO, or by implementing a BO that
48  * contains a BDO, the developer of the BO is spared some work.
49  *
50  * @author <AUTHOR>
51  * @version $Revision: 1.1 $
52  */

53 public class FortuneBDO implements java.io.Serializable JavaDoc {
54
55     /**
56      * The FortuneDO object upon which the set and get methods operate.
57      * This member is protected so that classes derived from FortuneBDO
58      * can access the underlying Data Object.
59      */

60     protected FortuneDO DO;
61
62     /**
63      * Like the class <CODE>FortuneDO</CODE>,
64      * this class acts as a factory.
65      * Business Object (BO) classes typically need these set and get methods.
66      * So by deriving a BO from a BDO, or by implementing a BO that
67      * contains one or more BDOs, the developer of the BO is spared some work.
68      */

69     public static FortuneBDO createVirgin() throws Exception JavaDoc {
70     FortuneBDO bdo = new FortuneBDO ();
71     bdo.DO = FortuneDO.createVirgin();
72     return bdo;
73     }
74
75     /**
76      * The createExisting method is used to create a <CODE>FortuneBDO</CODE>
77      * from a <CODE>FortuneDO</CODE> that was returned by
78      * the <CODE>FortuneQuery</CODE> class.
79      */

80     public static FortuneBDO createExisting( FortuneDO DO ) {
81     FortuneBDO bdo = new FortuneBDO ();
82     bdo.DO = DO;
83     return bdo;
84     }
85
86     /**
87      * The developer of a Business Object that derives from this class
88      * can override the methods:<CODE>
89      * beforeAnyGet
90      * beforeAnySet
91      * afterAnySet
92      * </CODE> to handle any general assertions or cleanup needed
93      * for <CODE>get</CODE> and <CODE>set</CODE> methods.
94      */

95     protected void beforeAnyGet() {}
96     protected void beforeAnySet() {}
97     protected void afterAnySet() {}
98
99    /**
100     * Get Fortune of the FortuneDO
101     *
102     * @return Fortune of the FortuneDO
103     */

104    public String JavaDoc getFortune ()
105    throws DataObjectException {
106       return DO.getFortune ();
107    }
108
109    /**
110     * Set Fortune of the FortuneDO
111     *
112     * @param Fortune of the FortuneDO
113     */

114
115    public void setFortune ( String JavaDoc Fortune )
116    throws DataObjectException {
117       DO.setFortune ( Fortune );
118    }
119
120
121    /**
122     * Get FortuneNumber of the FortuneDO
123     *
124     * @return FortuneNumber of the FortuneDO
125     */

126    public java.math.BigDecimal JavaDoc getFortuneNumber ()
127    throws DataObjectException {
128       return DO.getFortuneNumber ();
129    }
130
131    /**
132     * Set FortuneNumber of the FortuneDO
133     *
134     * @param FortuneNumber of the FortuneDO
135     */

136
137    public void setFortuneNumber ( java.math.BigDecimal JavaDoc FortuneNumber )
138    throws DataObjectException {
139       DO.setFortuneNumber ( FortuneNumber );
140    }
141
142
143    /**
144     * Get HasBeenUsed of the FortuneDO
145     *
146     * @return HasBeenUsed of the FortuneDO
147     */

148    public boolean getHasBeenUsed ()
149    throws DataObjectException {
150       return DO.getHasBeenUsed ();
151    }
152
153    /**
154     * Set HasBeenUsed of the FortuneDO
155     *
156     * @param HasBeenUsed of the FortuneDO
157     */

158
159    public void setHasBeenUsed ( boolean HasBeenUsed )
160    throws DataObjectException {
161       DO.setHasBeenUsed ( HasBeenUsed );
162    }
163
164
165 }
166
Popular Tags