01: package net.bagaluten.jca.lucene.connector.impl;
02:
03: import javax.resource.spi.ConnectionRequestInfo;
04:
05: public class LuceneConnectionRequestInfo implements
06: ConnectionRequestInfo {
07:
08: private final String indexName;
09:
10: public LuceneConnectionRequestInfo(String indexName) {
11: if (indexName == null) {
12: throw new IllegalArgumentException(
13: "null not an allowed index name");
14: }
15: this .indexName = indexName;
16: }
17:
18: public String getIndexName() {
19: return indexName;
20: }
21:
22: public boolean equals(Object other) {
23: if (this == other) {
24: return true;
25: }
26: if (!(other instanceof LuceneConnectionRequestInfo)) {
27: return false;
28: }
29: LuceneConnectionRequestInfo that = (LuceneConnectionRequestInfo) other;
30: return indexName.equals(that.indexName);
31: }
32:
33: public int hashCode() {
34: return indexName.hashCode();
35: }
36: }
|