Source Code Cross Referenced for PlanetSubscriptionData.java in  » Blogger-System » apache-roller-3.1 » org » apache » roller » planet » pojos » 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 » Blogger System » apache roller 3.1 » org.apache.roller.planet.pojos 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2005 Sun Microsystems, Inc.
003:         *
004:         * Licensed under the Apache License, Version 2.0 (the "License");
005:         * you may not use this file except in compliance with the License.
006:         * You may obtain a copy of the License at
007:         *
008:         *     http://www.apache.org/licenses/LICENSE-2.0
009:         *
010:         * Unless required by applicable law or agreed to in writing, software
011:         * distributed under the License is distributed on an "AS IS" BASIS,
012:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013:         * See the License for the specific language governing permissions and
014:         * limitations under the License.
015:         */
016:        package org.apache.roller.planet.pojos;
017:
018:        import java.io.Serializable;
019:        import java.util.ArrayList;
020:        import java.util.Collection;
021:        import java.util.Date;
022:        import java.util.HashSet;
023:        import java.util.Iterator;
024:        import java.util.List;
025:        import java.util.Set;
026:        import org.apache.roller.pojos.*;
027:
028:        /**
029:         * @struts.form include-all="true"
030:         * @ejb:bean name="PlanetSubscriptionData"
031:         * @hibernate.class lazy="false" table="rag_subscription"
032:         */
033:        public class PlanetSubscriptionData extends PersistentObject implements 
034:                Serializable, Comparable {
035:            /** Database ID */
036:            protected String id;
037:
038:            /** Title of the blog or website */
039:            protected String title;
040:
041:            /** Name of blog or website author */
042:            protected String author;
043:
044:            /** URL of the newsfeed */
045:            protected String feedUrl;
046:
047:            /** URL of the blog or website */
048:            protected String siteUrl;
049:
050:            /** Last update time of site */
051:            protected Date lastUpdated;
052:
053:            /** Most recent entries from site (a set of EntityData objects) */
054:            protected List entries = new ArrayList();
055:
056:            /** Inbound links according to Technorati */
057:            protected int inboundlinks = 0;
058:
059:            /** Inbound blogs according to Technorati */
060:            protected int inboundblogs = 0;
061:
062:            protected Set groups = new HashSet();
063:
064:            //----------------------------------------------------------- persistent fields
065:
066:            /** 
067:             * @hibernate.set table="rag_group_subscription" lazy="true" cascade="save-update"
068:             * @hibernate.collection-key column="subscription_id"
069:             * @hibernate.collection-many-to-many column="group_id" class="org.apache.roller.planet.pojos.PlanetGroupData"
070:             */
071:            public Set getGroups() {
072:                return groups;
073:            }
074:
075:            public void setGroups(Set groups) {
076:                this .groups = groups;
077:            }
078:
079:            /** 
080:             * @hibernate.id column="id" generator-class="uuid.hex" unsaved-value="null"
081:             * @roller.wrapPojoMethod type="simple"
082:             */
083:            public String getId() {
084:                return id;
085:            }
086:
087:            public void setId(String id) {
088:                this .id = id;
089:            }
090:
091:            /** 
092:             * @hibernate.property column="feed_url" non-null="true" unique="false"
093:             * @roller.wrapPojoMethod type="simple"
094:             */
095:            public String getFeedURL() {
096:                return feedUrl;
097:            }
098:
099:            public void setFeedURL(String feedUrl) {
100:                this .feedUrl = feedUrl;
101:            }
102:
103:            /** 
104:             * @hibernate.property column="last_updated" non-null="false" unique="false"
105:             * @roller.wrapPojoMethod type="simple"
106:             */
107:            public Date getLastUpdated() {
108:                return lastUpdated;
109:            }
110:
111:            public void setLastUpdated(Date lastUpdated) {
112:                this .lastUpdated = lastUpdated;
113:            }
114:
115:            /** 
116:             * @hibernate.property column="site_url" non-null="false" unique="false"
117:             * @roller.wrapPojoMethod type="simple"
118:             */
119:            public String getSiteURL() {
120:                return siteUrl;
121:            }
122:
123:            public void setSiteURL(String siteUrl) {
124:                this .siteUrl = siteUrl;
125:            }
126:
127:            /** 
128:             * @hibernate.property column="title" non-null="false" unique="false"
129:             * @roller.wrapPojoMethod type="simple"
130:             */
131:            public String getTitle() {
132:                return title;
133:            }
134:
135:            public void setTitle(String title) {
136:                this .title = title;
137:            }
138:
139:            /** 
140:             * @hibernate.property column="author" non-null="false" unique="false"
141:             * @roller.wrapPojoMethod type="simple"
142:             */
143:            public String getAuthor() {
144:                return author;
145:            }
146:
147:            public void setAuthor(String author) {
148:                this .author = author;
149:            }
150:
151:            /** 
152:             * @hibernate.property column="inbound_links" non-null="false" unique="false"
153:             * @roller.wrapPojoMethod type="simple"
154:             */
155:            public int getInboundlinks() {
156:                return inboundlinks;
157:            }
158:
159:            public void setInboundlinks(int inboundlinks) {
160:                this .inboundlinks = inboundlinks;
161:            }
162:
163:            /** 
164:             * @hibernate.property column="inbound_blogs" non-null="false" unique="false"
165:             * @roller.wrapPojoMethod type="simple"
166:             */
167:            public int getInboundblogs() {
168:                return inboundblogs;
169:            }
170:
171:            public void setInboundblogs(int inboundblogs) {
172:                this .inboundblogs = inboundblogs;
173:            }
174:
175:            /** 
176:             * @roller.wrapPojoMethod type="simple"
177:             */
178:            public String getName() {
179:                return title;
180:            }
181:
182:            public void setName(String name) {
183:                // no op to please XDoclet
184:            }
185:
186:            /** 
187:             * @roller.wrapPojoMethod type="simple"
188:             */
189:            public String getURL() {
190:                return siteUrl;
191:            }
192:
193:            public void setURL(String url) {
194:                // no op to please XDoclet
195:            }
196:
197:            //-------------------------------------------------------------- implementation
198:
199:            /**
200:             */
201:            public void setData(PersistentObject vo) {
202:                // TODO Auto-generated method stub        
203:            }
204:
205:            /**
206:             */
207:            public int compareTo(Object o) {
208:                PlanetSubscriptionData other = (PlanetSubscriptionData) o;
209:                return getFeedURL().compareTo(other.getFeedURL());
210:            }
211:
212:            public boolean equals(Object other) {
213:
214:                if (this  == other)
215:                    return true;
216:                if (!(other instanceof  PlanetSubscriptionData))
217:                    return false;
218:
219:                final PlanetSubscriptionData that = (PlanetSubscriptionData) other;
220:                return this .feedUrl.equals(that.getFeedURL());
221:            }
222:
223:            public int hashCode() {
224:                return this .feedUrl.hashCode();
225:            }
226:
227:            /** 
228:             * @hibernate.bag lazy="true" inverse="true" cascade="all-delete-orphan" 
229:             * @hibernate.collection-key column="subscription_id"
230:             * @hibernate.collection-one-to-many class="org.apache.roller.planet.pojos.PlanetEntryData"
231:             */
232:            public List getEntries() {
233:                return entries;
234:            }
235:
236:            private void setEntries(List entries) {
237:                this .entries = entries;
238:            }
239:
240:            public void addEntry(PlanetEntryData entry) {
241:                // bi-directional one-to-many 
242:                entry.setSubscription(this );
243:                this .getEntries().add(entry);
244:            }
245:
246:            public void addEntries(Collection newEntries) {
247:                // bi-directional one-to-many
248:                for (Iterator it = newEntries.iterator(); it.hasNext();) {
249:                    PlanetEntryData entry = (PlanetEntryData) it.next();
250:                    entry.setSubscription(this );
251:                }
252:                this .getEntries().addAll(newEntries);
253:            }
254:
255:            public void purgeEntries() {
256:                this.getEntries().clear();
257:            }
258:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.