01: /* ***** BEGIN LICENSE BLOCK *****
02: * Version: MPL 1.1
03: * The contents of this file are subject to the Mozilla Public License Version
04: * 1.1 (the "License"); you may not use this file except in compliance with
05: * the License. You may obtain a copy of the License at
06: * http://www.mozilla.org/MPL/
07: *
08: * Software distributed under the License is distributed on an "AS IS" basis,
09: * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
10: * for the specific language governing rights and limitations under the
11: * License.
12: *
13: * The Original Code is Riot.
14: *
15: * The Initial Developer of the Original Code is
16: * Neteye GmbH.
17: * Portions created by the Initial Developer are Copyright (C) 2007
18: * the Initial Developer. All Rights Reserved.
19: *
20: * Contributor(s):
21: * Felix Gnass [fgnass at neteye dot de]
22: *
23: * ***** END LICENSE BLOCK ***** */
24: package org.riotfamily.components.model;
25:
26: import java.io.Serializable;
27:
28: import org.springframework.util.ObjectUtils;
29:
30: /**
31: * @author Felix Gnass [fgnass at neteye dot de]
32: * @since 6.5
33: */
34: public class FileStorageInfo implements Serializable {
35:
36: private String type;
37:
38: private String property;
39:
40: private String fileStoreId;
41:
42: public FileStorageInfo() {
43: }
44:
45: public FileStorageInfo(String type, String property,
46: String fileStoreId) {
47: this .type = type;
48: this .property = property;
49: this .fileStoreId = fileStoreId;
50: }
51:
52: public String getType() {
53: return this .type;
54: }
55:
56: public void setType(String type) {
57: this .type = type;
58: }
59:
60: public String getProperty() {
61: return this .property;
62: }
63:
64: public void setProperty(String property) {
65: this .property = property;
66: }
67:
68: public String getFileStoreId() {
69: return this .fileStoreId;
70: }
71:
72: public void setFileStoreId(String fileStoreId) {
73: this .fileStoreId = fileStoreId;
74: }
75:
76: public int hashCode() {
77: int hash = 0;
78: if (type != null) {
79: hash += type.hashCode();
80: }
81: if (property != null) {
82: hash += property.hashCode();
83: }
84: return hash;
85: }
86:
87: public boolean equals(Object obj) {
88: if (obj == this ) {
89: return true;
90: }
91: if (obj instanceof FileStorageInfo) {
92: FileStorageInfo other = (FileStorageInfo) obj;
93: return ObjectUtils.nullSafeEquals(this .type, other.type)
94: && ObjectUtils.nullSafeEquals(this .property,
95: other.property);
96: }
97: return false;
98: }
99: }
|