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


001:        /*
002:         * Licensed to the Apache Software Foundation (ASF) under one or more
003:         * contributor license agreements.  The ASF licenses this file to You
004:         * under the Apache License, Version 2.0 (the "License"); you may not
005:         * 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.  For additional information regarding
015:         * copyright in this work, please see the NOTICE file in the top level
016:         * directory of this distribution.
017:         */
018:
019:        package org.apache.roller.pojos;
020:
021:        import java.io.Serializable;
022:
023:        /**
024:         * Ping Category Restriction.  An instance of this class relates an auto ping configuration {@link AutoPingData} to a
025:         * specific weblog category {@link WeblogCategoryData}.  When one or more instances of this class are present for a
026:         * given auto ping configuration, it means that pings should only go out for changes to the categories specified by those
027:         * instances.  If no instances of this class are present for a given auto ping configuration, it means that the ping
028:         * configuration is not restricted by category, so pings should go out for changes in any category.
029:         *
030:         * @author <a href="mailto:anil@busybuddha.org">Anil Gangolli</a>
031:         * @ejb:bean name="AutoPingData"
032:         * @hibernate.class lazy="false" table="pingcategory"
033:         * @hibernate.cache usage="read-write"
034:         */
035:        public class PingCategoryRestrictionData extends PersistentObject
036:                implements  Serializable {
037:            private String id;
038:            private AutoPingData autoPing;
039:            private WeblogCategoryData weblogCategory;
040:
041:            static final long serialVersionUID = 2261280579491859418L;
042:
043:            /**
044:             * Default constructor.  Leaves all fields null.  Required for bean compliance.
045:             */
046:            public PingCategoryRestrictionData() {
047:            }
048:
049:            /**
050:             * Constructor
051:             *
052:             * @param id             unique id of this object
053:             * @param autoPing       auto ping configuration being restricted
054:             * @param weblogCategory weblog category to which this auto ping configuration is restricted
055:             */
056:            public PingCategoryRestrictionData(String id,
057:                    AutoPingData autoPing, WeblogCategoryData weblogCategory) {
058:                this .id = id;
059:                this .autoPing = autoPing;
060:                this .weblogCategory = weblogCategory;
061:            }
062:
063:            /**
064:             * Setter needed by RollerImpl.storePersistentObject()
065:             */
066:            public void setData(PersistentObject vo) {
067:                PingCategoryRestrictionData other = (PingCategoryRestrictionData) vo;
068:                id = other.getId();
069:                autoPing = other.getAutoping();
070:                weblogCategory = other.getWeblogCategory();
071:            }
072:
073:            /**
074:             * Get the unique id (primary key) of this object.
075:             *
076:             * @return the unique id of this object. -- struts.validator type="required" msgkey="errors.required"
077:             * @ejb:persistent-field
078:             * @hibernate.id column="id" generator-class="uuid.hex" unsaved-value="null"
079:             */
080:            public String getId() {
081:                return id;
082:            }
083:
084:            /**
085:             * Set the unique id (primary key) of this object
086:             *
087:             * @param id
088:             * @ejb:persistent-field
089:             */
090:            public void setId(String id) {
091:                this .id = id;
092:            }
093:
094:            /**
095:             * Get the auto ping configuration to which this category restriction applies.
096:             *
097:             * @return the auto ping configuration to which this category restriction applies.
098:             * @ejb:persistent-field
099:             * @hibernate.many-to-one column="autopingid" cascade="none" not-null="true"
100:             */
101:            public AutoPingData getAutoping() {
102:                return autoPing;
103:            }
104:
105:            /**
106:             * Set the auto ping configuration to which this category restriction applies.
107:             *
108:             * @param autoPing the auto ping configuration to which this category restriction applies.
109:             * @ejb:persistent-field
110:             */
111:            public void setAutoping(AutoPingData autoPing) {
112:                this .autoPing = autoPing;
113:            }
114:
115:            /**
116:             * Get the weblog category.  Get the weblog category to which pings should be restricted.
117:             *
118:             * @return the weblog category to which pings should be restricted.
119:             * @ejb:persistent-field
120:             * @hibernate.many-to-one column="weblogcategoryid" cascade="none" not-null="true"
121:             */
122:            public WeblogCategoryData getWeblogCategory() {
123:                return weblogCategory;
124:            }
125:
126:            /**
127:             * Set the ping target.  Set the target to be pinged when the corresponding website changes.
128:             *
129:             * @param weblogCategory the weblog category to which pings should be restricted.
130:             * @ejb:persistent-field
131:             */
132:            public void setWeblogCategory(WeblogCategoryData weblogCategory) {
133:                this .weblogCategory = weblogCategory;
134:            }
135:
136:            /**
137:             * @see Object#equals(Object)
138:             */
139:            public boolean equals(Object o) {
140:                if (this  == o)
141:                    return true;
142:                if (!(o instanceof  PingCategoryRestrictionData))
143:                    return false;
144:
145:                final PingCategoryRestrictionData pingCategoryRestrictionData = (PingCategoryRestrictionData) o;
146:
147:                if (id != null ? !id
148:                        .equals(pingCategoryRestrictionData.getId())
149:                        : pingCategoryRestrictionData.getId() != null) {
150:                    return false;
151:                }
152:                if (autoPing != null ? !autoPing
153:                        .equals(pingCategoryRestrictionData.getAutoping())
154:                        : pingCategoryRestrictionData.getAutoping() != null) {
155:                    return false;
156:                }
157:                if (weblogCategory != null ? !weblogCategory
158:                        .equals(pingCategoryRestrictionData.getWeblogCategory())
159:                        : pingCategoryRestrictionData.getWeblogCategory() != null) {
160:                    return false;
161:                }
162:
163:                return true;
164:            }
165:
166:            /**
167:             * @see Object#hashCode()
168:             */
169:            public int hashCode() {
170:                return (id != null ? id.hashCode() : 0);
171:            }
172:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.