01: /*
02: * Created on March 3, 2004
03: *
04: * RecordImpl.java is used to test the J2EE Connector
05: * as implemented by JOnAS. This class implements the Record
06: * (cci) classes.
07: *
08: */
09: package ersatz.resourceadapter;
10:
11: import javax.resource.cci.Record;
12:
13: /**
14: * @author Bob Kruse
15: *
16: * Jtest Resource Adapter
17: *
18: * used to test the J2EE Connector as implemented by JOnAS.
19: *
20: */
21: public class RecordImpl implements Record {
22:
23: private String Record_Name;
24: private String shortDescription;
25: String Id = "RecordImpl"; // used in hashcode()
26: String cName = "RecordImpl";
27:
28: public RecordImpl() {
29: Utility.log(cName + ".constructor");
30: }
31:
32: public String getRecordName() {
33: //Utility.log(cName+".getRecordName");
34: return Record_Name;
35: }
36:
37: public void setRecordName(String rn) {
38: //Utility.log(cName+".setRecordName");
39: Record_Name = rn;
40: }
41:
42: public String getRecordShortDescription() {
43: return shortDescription;
44: }
45:
46: public void setRecordShortDescription(String rsd) {
47: shortDescription = rsd;
48: }
49:
50: public boolean equals(Object obj) {
51: boolean match = false;
52: if (obj == null)
53: return match;
54: RecordImpl other = (RecordImpl) obj;
55: if (this .Id.equals(other.Id))
56: match = true;
57: return match;
58: }
59:
60: public int hashCode() {
61: int hash = 1;
62: hash = Id.hashCode();
63: return hash;
64: }
65:
66: public Object clone() throws CloneNotSupportedException {
67: CloneNotSupportedException nse = new CloneNotSupportedException(
68: "RecordImpl.clone is not currently supported");
69: throw nse;
70: }
71: }
|