]> git.argeo.org Git - lgpl/argeo-commons.git/blob - server/runtime/org.argeo.server.jcr/src/test/java/org/argeo/jcr/SimpleObject.java
Reset to a proper SNAPSHOT state
[lgpl/argeo-commons.git] / server / runtime / org.argeo.server.jcr / src / test / java / org / argeo / jcr / SimpleObject.java
1 /*
2 * Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 package org.argeo.jcr;
18
19 import java.util.UUID;
20
21 public class SimpleObject {
22 private String string;
23 private String uuid = UUID.randomUUID().toString();
24 private Integer integer;
25 private OtherObject otherObject;
26 private OtherObject anotherObject;
27
28 public String getString() {
29 return string;
30 }
31
32 public void setString(String sting) {
33 this.string = sting;
34 }
35
36 public Integer getInteger() {
37 return integer;
38 }
39
40 public void setInteger(Integer integer) {
41 this.integer = integer;
42 }
43
44 public OtherObject getOtherObject() {
45 return otherObject;
46 }
47
48 public void setOtherObject(OtherObject otherObject) {
49 this.otherObject = otherObject;
50 }
51
52 public OtherObject getAnotherObject() {
53 return anotherObject;
54 }
55
56 public void setAnotherObject(OtherObject anotherObject) {
57 this.anotherObject = anotherObject;
58 }
59
60 @Override
61 public boolean equals(Object obj) {
62 return string.equals(((SimpleObject) obj).string);
63 }
64
65 @Override
66 public int hashCode() {
67 return string.hashCode();
68 }
69
70 public void setUuid(String uuid) {
71 this.uuid = uuid;
72 }
73
74 public String getUuid() {
75 return uuid;
76 }
77
78 }