Source Code Cross Referenced for StoredFileInfoBean.java in  » Source-Control » sourcejammer » org » sourcejammer » client » filesys » 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 » Source Control » sourcejammer » org.sourcejammer.client.filesys 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *  Copyright (C) 2001, 2002 Robert MacGrogan
003:         *
004:         *  This library is free software; you can redistribute it and/or
005:         *  modify it under the terms of the GNU Lesser General Public
006:         *  License as published by the Free Software Foundation; either
007:         *  version 2.1 of the License, or (at your option) any later version.
008:         *
009:         *  This library is distributed in the hope that it will be useful,
010:         *  but WITHOUT ANY WARRANTY; without even the implied warranty of
011:         *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
012:         *  Lesser General Public License for more details.
013:         *
014:         *  You should have received a copy of the GNU Lesser General Public
015:         *  License along with this library; if not, write to the Free Software
016:         *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
017:         *
018:         *
019:         * $Archive: SourceJammer$
020:         * $FileName: StoredFileInfoBean.java$
021:         * $FileID: 3963$
022:         *
023:         * Last change:
024:         * $AuthorName: Rob MacGrogan$
025:         * $Date: 4/23/03 5:05 PM$
026:         * $Comment: Replaced GPL header with LGPL header.$
027:         *
028:         * $KeyWordsOff: $
029:         */
030:
031:        package org.sourcejammer.client.filesys;
032:
033:        /**
034:         * Title:        SourceJammer Client 1.0
035:         * Description:
036:         * Copyright:    Copyright (c) 2001
037:         * Company:      SourceJammer Project
038:         * @author Robert MacGrogan
039:         * @version 1.0
040:         */
041:
042:        /**
043:         * This class represents information about a file from SourceJammer that has
044:         * been stored on a client's file system. The information is used to determine
045:         * whether the entire file needs to be retrieved from the server when the file
046:         * is requested again.
047:         */
048:        public class StoredFileInfoBean implements  java.io.Serializable {
049:
050:            private String msName = null;
051:            private long mlSourceVersionUniqueID = -1;
052:            private long mlNumBytes = -1;
053:            private long mlDate = -1;
054:            private String msServerURL = null;
055:            private String msArchiveName = null;
056:
057:            public StoredFileInfoBean() {
058:            }
059:
060:            public void setName(String s) {
061:                msName = s;
062:            }
063:
064:            public String getName() {
065:                return msName;
066:            }
067:
068:            public void setSourceVersionUniqueID(long l) {
069:                mlSourceVersionUniqueID = l;
070:            }
071:
072:            public long getSourceVersionUniqueID() {
073:                return mlSourceVersionUniqueID;
074:            }
075:
076:            public void setNumBytes(long l) {
077:                mlNumBytes = l;
078:            }
079:
080:            public long getNumBytes() {
081:                return mlNumBytes;
082:            }
083:
084:            /**
085:             * Date is stored as a long, using Date.getTime().
086:             */
087:            public void setDate(long l) {
088:                mlDate = l;
089:            }
090:
091:            public void setDate(java.util.Date d) {
092:                mlDate = d.getTime();
093:            }
094:
095:            public long getDate() {
096:                return mlDate;
097:            }
098:
099:            public String getArchiveName() {
100:                return msArchiveName;
101:            }
102:
103:            public void setArchiveName(String s) {
104:                msArchiveName = s;
105:            }
106:
107:            public String getServerURL() {
108:                return msServerURL;
109:            }
110:
111:            public void setServerURL(String s) {
112:                msServerURL = s;
113:            }
114:
115:            /**
116:             * Returns true if o is a StoredFileInfoBean and all properties
117:             * of o are the same as the properties of this object. Otherwise,
118:             * returns false.
119:             */
120:            public boolean equals(Object o) {
121:                boolean bEquals = false;
122:                if (o instanceof  StoredFileInfoBean) {
123:                    StoredFileInfoBean bn = (StoredFileInfoBean) o;
124:                    if (mlNumBytes == bn.mlNumBytes
125:                            && mlSourceVersionUniqueID == bn.mlSourceVersionUniqueID
126:                            && mlDate == bn.mlDate && msName.equals(bn.msName)
127:                            && msArchiveName.equals(bn.msArchiveName)
128:                            && msServerURL.equals(bn.msServerURL)) {
129:                        bEquals = true;
130:                    } else {
131:                        bEquals = false;
132:                    }
133:                } else {
134:                    bEquals = false;
135:                }
136:
137:                return bEquals;
138:            }
139:
140:            /**
141:             * Returns true if o is a StoredFileInfoBean and all properties
142:             * of o (other than Version) are the same as the properties of this object. Otherwise,
143:             * returns false.
144:             */
145:            public boolean equalsIgnoreVersion(Object o) {
146:                boolean bEquals = false;
147:                if (o instanceof  StoredFileInfoBean) {
148:                    StoredFileInfoBean bn = (StoredFileInfoBean) o;
149:                    if (mlNumBytes == bn.mlNumBytes && mlDate == bn.mlDate
150:                            && msName.equals(bn.msName)
151:                            && msArchiveName.equals(bn.msArchiveName)
152:                            && msServerURL.equals(bn.msServerURL)) {
153:                        bEquals = true;
154:                    } else {
155:                        bEquals = false;
156:                    }
157:                } else {
158:                    bEquals = false;
159:                }
160:
161:                return bEquals;
162:            }
163:
164:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.