Source Code Cross Referenced for AutoPingData.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:         * Automatic ping configuration.  An instance of this class relates a website and ping target; it indicates that the specified
025:         * ping target should be pinged when the corresponding website is changed.  Pinging can be restricted to changes to
026:         * specific categories on the website by instances of the {@link PingCategoryRestrictionData} object.  In the absence of
027:         * any category restrictions, the ping target is pinged whenever the corresponding website changes.
028:         *
029:         * @author <a href="mailto:anil@busybuddha.org">Anil Gangolli</a>
030:         * @ejb:bean name="AutoPingData"
031:         * @hibernate.class lazy="false" table="autoping"
032:         * @hibernate.cache usage="read-write"
033:         */
034:        public class AutoPingData extends PersistentObject implements 
035:                Serializable {
036:            private String id = null;
037:            private PingTargetData pingTarget = null;
038:            private WebsiteData website = null;
039:
040:            public static final long serialVersionUID = -9105985454111986435L;
041:
042:            /**
043:             * Default constructor.  Leaves all fields null.  Required for bean compliance.
044:             */
045:            public AutoPingData() {
046:            }
047:
048:            /**
049:             * Constructor.
050:             *
051:             * @param id         unique id (primary key) for this instance
052:             * @param pingtarget ping target that should be pinged
053:             * @param website    website to which this configuration applies
054:             */
055:            public AutoPingData(String id, PingTargetData pingtarget,
056:                    WebsiteData website) {
057:                this .id = id;
058:                this .website = website;
059:                this .pingTarget = pingtarget;
060:            }
061:
062:            /**
063:             * Setter needed by RollerImpl.storePersistentObject()
064:             */
065:            public void setData(PersistentObject vo) {
066:                AutoPingData other = (AutoPingData) vo;
067:
068:                id = other.getId();
069:                website = other.getWebsite();
070:                pingTarget = other.getPingTarget();
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 website.  Get the website whose changes should result in a ping to the ping target specified by this
096:             * object.
097:             *
098:             * @return the website.
099:             * @ejb:persistent-field
100:             * @hibernate.many-to-one column="websiteid" cascade="none" not-null="false"
101:             */
102:            public WebsiteData getWebsite() {
103:                return website;
104:            }
105:
106:            /**
107:             * Set the website.  Set the website whose changes should result in a ping to the ping target specified by this
108:             * object.
109:             *
110:             * @param website the website.
111:             * @ejb:persistent-field
112:             */
113:            public void setWebsite(WebsiteData website) {
114:                this .website = website;
115:            }
116:
117:            /**
118:             * Get the ping target.  Get the target to be pinged when the corresponding website changes.
119:             *
120:             * @return the target to be pinged.
121:             * @ejb:persistent-field
122:             * @hibernate.many-to-one column="pingtargetid" cascade="none" not-null="false"
123:             */
124:            public PingTargetData getPingTarget() {
125:                return pingTarget;
126:            }
127:
128:            /**
129:             * Set the ping target.  Set the target to be pinged when the corresponding website changes.
130:             *
131:             * @param pingtarget the target to be pinged.
132:             * @ejb:persistent-field
133:             */
134:            public void setPingTarget(PingTargetData pingtarget) {
135:                this .pingTarget = pingtarget;
136:            }
137:
138:            /**
139:             * @see Object#equals(Object)
140:             */
141:            public boolean equals(Object o) {
142:                if (this  == o)
143:                    return true;
144:                if (!(o instanceof  AutoPingData))
145:                    return false;
146:
147:                final AutoPingData autoPingData = (AutoPingData) o;
148:
149:                if (id != null ? !id.equals(autoPingData.getId())
150:                        : autoPingData.getId() != null)
151:                    return false;
152:                if (pingTarget != null ? !pingTarget.equals(autoPingData
153:                        .getPingTarget())
154:                        : autoPingData.getPingTarget() != null) {
155:                    return false;
156:                }
157:                if (website != null ? !website
158:                        .equals(autoPingData.getWebsite()) : autoPingData
159:                        .getWebsite() != 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:
173:            /**
174:             * Generate a string form of the object appropriate for logging or debugging.
175:             *
176:             * @return a string form of the object appropriate for logging or debugging.
177:             * @see Object#toString()
178:             */
179:            public String toString() {
180:                return "AutoPingData{"
181:                        + "id='"
182:                        + id
183:                        + "'"
184:                        + ", pingTarget="
185:                        + pingTarget
186:                        + ", website= "
187:                        + (website == null ? "null" : "{id='" + website.getId()
188:                                + "'} ") + "}";
189:            }
190:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.