Source Code Cross Referenced for PokerGameImpl.java in  » J2EE » Enhydra-Demos » poker » business » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » Enhydra Demos » poker.business 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package poker.business;
002:
003:        import poker.data.user.*;
004:        import poker.data.game.*;
005:        import java.util.Vector;
006:        import poker.spec.user.PlayerDO;
007:        import poker.spec.*;
008:
009:        /**
010:         *
011:         * EnhyDraw!, beta 4, 5/21/99
012:         *
013:         * Copyright 1999, Larry Wolcot & Daryl Tempesta
014:         * ALL rights reserved. Not for commercial use
015:         * without written permission from both authors.
016:         *
017:         * This is the business object that encapsulates the
018:         * PlayerDO and PokerGameDO objects.
019:         * It really doesn't do much other than that!
020:         */
021:        public class PokerGameImpl implements  PokerGame, java.io.Serializable {
022:
023:            private boolean isDirty = false;
024:            private PokerGameDO pokerGameDO;
025:            private PlayerDO playerDO;
026:
027:            /*
028:             * Constructor that inits the DO's
029:             */
030:            public PokerGameImpl() {
031:            };
032:
033:            public PokerGameImpl(String name, String pw, String id, int cash) {
034:                playerDO = new PlayerDOImpl(name, pw);
035:                pokerGameDO = new PokerGameDO(id, cash);
036:            }
037:
038:            /*
039:             * Return the PokerGameDO for this object
040:             */
041:            public PokerGameDO getPokerGameDO() {
042:                return pokerGameDO;
043:            }
044:
045:            /*
046:             * return the name from the PlayerDO
047:             */
048:            public String getName() {
049:                return playerDO.getName();
050:            }
051:
052:            /*
053:             * Check to see if this DO has been changed
054:             */
055:            public boolean getIsDirty() {
056:                return this .isDirty;
057:            }
058:
059:            /*
060:             * return the email from the PlayerDO
061:             */
062:            public String getEmail() {
063:                return playerDO.getEmail();
064:            }
065:
066:            /*
067:             * return the password from the PlayerDO
068:             */
069:            public String getPassword() {
070:                return playerDO.getPassword();
071:            }
072:
073:            /*
074:             * return the cash from the pokerGameDO
075:             */
076:            public int getCash() {
077:                return pokerGameDO.getCash();
078:            }
079:
080:            /*
081:             * return the getPlayRound from the pokerGameDO
082:             */
083:            public int getPlayRound() {
084:                return pokerGameDO.getPlayRound();
085:            }
086:
087:            /*
088:             * return the getID from the pokerGameDO
089:             */
090:            public String getID() {
091:                return pokerGameDO.getID();
092:            }
093:
094:            /*
095:             * return the current Bet from the pokerGameDO
096:             */
097:            public int getBet() {
098:                return pokerGameDO.getBet();
099:            }
100:
101:            /*
102:             * return the current version from the pokerGameDO
103:             */
104:            public int getVersion() {
105:                return pokerGameDO.getVersion();
106:            }
107:
108:            /*
109:             * return the largest bet from the pokerGameDO
110:             */
111:            public int getLargestBet() {
112:                return pokerGameDO.getLargestBet();
113:            }
114:
115:            /*
116:             * return the smallest bet from the pokerGameDO
117:             */
118:            public int getSmallestBet() {
119:                return pokerGameDO.getSmallestBet();
120:            }
121:
122:            /*
123:             * return the total games played from the pokerGameDO
124:             */
125:            public int getTotalPlayed() {
126:                return pokerGameDO.getTotalPlayed();
127:            }
128:
129:            /*
130:             * return the total games won from the pokerGameDO
131:             */
132:            public int getTotalWon() {
133:                return pokerGameDO.getTotalWon();
134:            }
135:
136:            /*
137:             * return the Vector of cards in hand from the pokerGameDO
138:             */
139:            public Vector getCardsInHand() {
140:                return pokerGameDO.getCardsInHand();
141:            }
142:
143:            /*
144:             * return the Vector of cards already dealt from the pokerGameDO
145:             */
146:            public Vector getCardsUsed() {
147:                return pokerGameDO.getCardsUsed();
148:            }
149:
150:            /*
151:             * return the default bet from the pokerGameDO
152:             */
153:            public int getDefaultBet() {
154:                return pokerGameDO.getDefaultBet();
155:            }
156:
157:            /*
158:             * return the Vector of cards to drop from the pokerGameDO
159:             */
160:            public Vector getDropCards() {
161:                return pokerGameDO.getDropCards();
162:            }
163:
164:            /*
165:             * return the default deck image name from the pokerGameDO
166:             */
167:            public String getDeck() {
168:                return pokerGameDO.getDeck();
169:            }
170:
171:            /*
172:             * return the last error from the pokerGameDO
173:             * not in use, but too paranoid to remove
174:             */
175:            public String getLastError() {
176:                return pokerGameDO.getLastError();
177:            }
178:
179:            /*
180:             * return the PlayerDO from the pokerGameDO
181:             * Yeah, I know this ills the encapsulation rules, but hey!
182:             * it's only game!
183:             */
184:            public PlayerDO getPlayer() {
185:                return playerDO;
186:            }
187:
188:            /*
189:             * Set the cash in the pokerGameDO
190:             */
191:            public void setCash(int cash) {
192:                this .isDirty = true;
193:                pokerGameDO.setCash(cash);
194:            }
195:
196:            /*
197:             * Set the playround in the pokerGameDO
198:             */
199:            public void setPlayRound(int playRound) {
200:                this .isDirty = true;
201:                pokerGameDO.setPlayRound(playRound);
202:            }
203:
204:            /*
205:             * Set the last error in the pokerGameDO
206:             */
207:            public void setLastError(String lastError) {
208:                this .isDirty = true;
209:                pokerGameDO.setLastError(lastError);
210:            }
211:
212:            /*
213:             * Set the ID in the pokerGameDO
214:             */
215:            public void setID(String id) {
216:                this .isDirty = true;
217:                pokerGameDO.setID(id);
218:            }
219:
220:            /*
221:             * Set the name in the playerDO
222:             */
223:            public void setName(String name) {
224:                this .isDirty = true;
225:                playerDO.setName(name);
226:            }
227:
228:            /*
229:             * Set the password in the playerDO
230:             */
231:            public void setPassword(String pw) {
232:                this .isDirty = true;
233:                playerDO.setPassword(pw);
234:            }
235:
236:            /*
237:             * Set the email in the playerDO
238:             */
239:            public void setEmail(String email) {
240:                this .isDirty = true;
241:                playerDO.setEmail(email);
242:            }
243:
244:            /*
245:             * Set the current bet in the pokerGameDO
246:             */
247:            public void setBet(int bet) {
248:                this .isDirty = true;
249:                pokerGameDO.setBet(bet);
250:            }
251:
252:            /*
253:             * Set the current version in the pokerGameDO
254:             */
255:            public void setVersion(int version) {
256:                this .isDirty = true;
257:                pokerGameDO.setVersion(version);
258:            }
259:
260:            /*
261:             * Set the largest bet placed in the pokerGameDO
262:             */
263:            public void setLargestBet(int largestBet) {
264:                this .isDirty = true;
265:                pokerGameDO.setLargestBet(largestBet);
266:            }
267:
268:            /*
269:             * Set the smallest bet in the pokerGameDO
270:             */
271:            public void setSmallestBet(int smallestBet) {
272:                this .isDirty = true;
273:                pokerGameDO.setSmallestBet(smallestBet);
274:            }
275:
276:            /*
277:             * Set the total hands played in the pokerGameDO
278:             */
279:            public void setTotalPlayed(int totalPlayed) {
280:                this .isDirty = true;
281:                pokerGameDO.setTotalPlayed(totalPlayed);
282:            }
283:
284:            /*
285:             * Set the total hands won in the pokerGameDO
286:             */
287:            public void setTotalWon(int totalWon) {
288:                this .isDirty = true;
289:                pokerGameDO.setTotalWon(totalWon);
290:            }
291:
292:            /*
293:             * Set the current cards in hand in the pokerGameDO
294:             */
295:            public void setCardsInHand(Vector cardsInHand) {
296:                pokerGameDO.setCardsInHand(cardsInHand);
297:            }
298:
299:            /*
300:             * Set the cards used in the pokerGameDO
301:             */
302:            public void setCardsUsed(Vector cardsUsed) {
303:                pokerGameDO.setCardsUsed(cardsUsed);
304:            }
305:
306:            /*
307:             * Set the cards to be dropped in the pokerGameDO
308:             */
309:            public void setDropCards(Vector dropCards) {
310:                pokerGameDO.setDropCards(dropCards);
311:            }
312:
313:            /*
314:             * Set the default deck image name in the pokerGameDO
315:             */
316:            public void setDeck(String deck) {
317:                this .isDirty = true;
318:                pokerGameDO.setDeck(deck);
319:            }
320:
321:            /*
322:             * Set the default bet in the pokerGameDO
323:             */
324:            public void setDefaultBet(int defaultBet) {
325:                this .isDirty = true;
326:                pokerGameDO.setDefaultBet(defaultBet);
327:            }
328:
329:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.