Subversion Repositories SmartDukaan

Rev

Rev 21720 | Rev 22009 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 21720 Rev 21924
Line 109... Line 109...
109
 
109
 
110
	public void setPersisted(boolean persisted) {
110
	public void setPersisted(boolean persisted) {
111
		this.persisted = persisted;
111
		this.persisted = persisted;
112
	}
112
	}
113
 
113
 
-
 
114
	
-
 
115
	@Override
-
 
116
	public int hashCode() {
-
 
117
		final int prime = 31;
-
 
118
		int result = 1;
-
 
119
		result = prime * result + ((contentType == null) ? 0 : contentType.hashCode());
-
 
120
		result = prime * result + ((createTimestamp == null) ? 0 : createTimestamp.hashCode());
-
 
121
		result = prime * result + id;
-
 
122
		result = prime * result + ((name == null) ? 0 : name.hashCode());
-
 
123
		result = prime * result + ((path == null) ? 0 : path.hashCode());
-
 
124
		result = prime * result + (persisted ? 1231 : 1237);
-
 
125
		result = prime * result + (int) (size ^ (size >>> 32));
-
 
126
		result = prime * result + ((updateTimestamp == null) ? 0 : updateTimestamp.hashCode());
-
 
127
		return result;
-
 
128
	}
-
 
129
 
-
 
130
	@Override
-
 
131
	public boolean equals(Object obj) {
-
 
132
		if (this == obj)
-
 
133
			return true;
-
 
134
		if (obj == null)
-
 
135
			return false;
-
 
136
		if (getClass() != obj.getClass())
-
 
137
			return false;
-
 
138
		Document other = (Document) obj;
-
 
139
		if (contentType != other.contentType)
-
 
140
			return false;
-
 
141
		if (createTimestamp == null) {
-
 
142
			if (other.createTimestamp != null)
-
 
143
				return false;
-
 
144
		} else if (!createTimestamp.equals(other.createTimestamp))
-
 
145
			return false;
-
 
146
		if (id != other.id)
-
 
147
			return false;
-
 
148
		if (name == null) {
-
 
149
			if (other.name != null)
-
 
150
				return false;
-
 
151
		} else if (!name.equals(other.name))
-
 
152
			return false;
-
 
153
		if (path == null) {
-
 
154
			if (other.path != null)
-
 
155
				return false;
-
 
156
		} else if (!path.equals(other.path))
-
 
157
			return false;
-
 
158
		if (persisted != other.persisted)
-
 
159
			return false;
-
 
160
		if (size != other.size)
-
 
161
			return false;
-
 
162
		if (updateTimestamp == null) {
-
 
163
			if (other.updateTimestamp != null)
-
 
164
				return false;
-
 
165
		} else if (!updateTimestamp.equals(other.updateTimestamp))
-
 
166
			return false;
-
 
167
		return true;
-
 
168
	}
-
 
169
 
114
	@Override
170
	@Override
115
	public String toString() {
171
	public String toString() {
116
		return "Document [id=" + id + ", name=" + name + ", path=" + path + ", contentType=" + contentType + ", size="
172
		return "Document [id=" + id + ", name=" + name + ", path=" + path + ", contentType=" + contentType + ", size="
117
				+ size + ", createTimestamp=" + createTimestamp + ", updateTimestamp=" + updateTimestamp
173
				+ size + ", createTimestamp=" + createTimestamp + ", updateTimestamp=" + updateTimestamp
118
				+ ", persisted=" + persisted + "]";
174
				+ ", persisted=" + persisted + "]";