Source Code Cross Referenced for Acquisition.java in  » Database-ORM » Speedo_1.4.5 » abook » data » 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 » Database ORM » Speedo_1.4.5 » abook.data 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Created on 22 juin 2005
003:         */
004:        package abook.data;
005:
006:        /**
007:         * Provides object of type Acquisition mapping the data stored in the sql database
008:         *
009:         */
010:        public class Acquisition {
011:
012:            private long book_id;
013:            private String user_id;
014:            private User user;
015:            private Book book;
016:            private double lastKnownPosition; //in seconds
017:            private boolean isCurrentListening;
018:
019:            /**
020:             * Constructs a new Acquisition object
021:             * @param theBook The book acquired.
022:             * @param theUser The user of the book.
023:             */
024:            public Acquisition(User theUser, Book theBook) {
025:                this .book_id = theBook.getBookId();
026:                this .user_id = new String(theUser.getLogin());
027:                this .user = theUser;
028:                this .book = theBook;
029:                this .lastKnownPosition = 0;
030:                isCurrentListening = false;
031:            }
032:
033:            /**
034:             * @return Returns the lastKnownPosition.
035:             */
036:            public double getLastKnownPosition() {
037:                return lastKnownPosition;
038:            }
039:
040:            /**
041:             * @param lastKnownPosition The lastKnownPosition to set.
042:             */
043:            public void setLastKnownPosition(double lastKnownPosition) {
044:                this .lastKnownPosition = lastKnownPosition;
045:            }
046:
047:            /**
048:             * @return Returns the bookId.
049:             */
050:            public long getBook_id() {
051:                return book_id;
052:            }
053:
054:            /**
055:             * @param bookId The bookId to set.
056:             */
057:            public void setBook_id(long bookId) {
058:                this .book_id = bookId;
059:            }
060:
061:            /**
062:             * @return Returns the userId.
063:             */
064:            public String getUser_id() {
065:                return user_id;
066:            }
067:
068:            public Boolean isEqualTo(String _userId, Long _bookId) {
069:                Long myBookId = new Long(book_id);
070:                return new Boolean(_userId.compareTo(user_id) == 0
071:                        && myBookId == _bookId);
072:            }
073:
074:            /**
075:             * @param userId The userId to set.
076:             */
077:            public void setUser_id(String userId) {
078:                this .user_id = userId;
079:            }
080:
081:            /**
082:             * @return Returns the isCurrentListening.
083:             */
084:            public boolean isCurrentListening() {
085:                return isCurrentListening;
086:            }
087:
088:            /**
089:             * @param isCurrentListening The isCurrentListening to set.
090:             */
091:            public void setCurrentListening(boolean isCurrentListening) {
092:                this .isCurrentListening = isCurrentListening;
093:            }
094:
095:            /* 
096:             * @return  a string representation of the object.
097:             */
098:            public String toString() {
099:                return new String("acquisition (bookId=" + this .book_id
100:                        + ", userId=" + this .user_id + ")");
101:            }
102:
103:            /**
104:             * @return Returns the book.
105:             */
106:            public Book getBook() {
107:                return book;
108:            }
109:
110:            /**
111:             * @param book The book to set.
112:             */
113:            public void setBook(Book book) {
114:                this .book = book;
115:            }
116:
117:            /**
118:             * @return Returns the user.
119:             */
120:            public User getUser() {
121:                return user;
122:            }
123:
124:            /**
125:             * @param user The user to set.
126:             */
127:            public void setUser(User user) {
128:                this.user = user;
129:            }
130:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.