Last change
on this file since 507 was 507, checked in by George Lilly, 15 years ago |
NHIN gateway and adaptor for use on linux with VistA EHR and RPMS
|
File size:
1.5 KB
|
Rev | Line | |
---|
[507] | 1 | package gov.hhs.fha.nhinc.subscription.repository.data;
|
---|
| 2 |
|
---|
| 3 | import java.io.Serializable;
|
---|
| 4 |
|
---|
| 5 | /**
|
---|
| 6 | * Single criteria value. A criterion may be repeated which prevents the use
|
---|
| 7 | * of a map object for storage.
|
---|
| 8 | *
|
---|
| 9 | * @author Neil Webb
|
---|
| 10 | */
|
---|
| 11 | public class Criterion implements Serializable
|
---|
| 12 | {
|
---|
| 13 | private static final long serialVersionUID = 4222108360038714991L;
|
---|
| 14 | private String key;
|
---|
| 15 | private String value;
|
---|
| 16 |
|
---|
| 17 | public String getKey()
|
---|
| 18 | {
|
---|
| 19 | return key;
|
---|
| 20 | }
|
---|
| 21 |
|
---|
| 22 | public void setKey(String key)
|
---|
| 23 | {
|
---|
| 24 | this.key = key;
|
---|
| 25 | }
|
---|
| 26 |
|
---|
| 27 | public String getValue()
|
---|
| 28 | {
|
---|
| 29 | return value;
|
---|
| 30 | }
|
---|
| 31 |
|
---|
| 32 | public void setValue(String value)
|
---|
| 33 | {
|
---|
| 34 | this.value = value;
|
---|
| 35 | }
|
---|
| 36 |
|
---|
| 37 | @Override
|
---|
| 38 | public boolean equals(Object obj)
|
---|
| 39 | {
|
---|
| 40 | if (obj == null)
|
---|
| 41 | {
|
---|
| 42 | return false;
|
---|
| 43 | }
|
---|
| 44 | if (getClass() != obj.getClass())
|
---|
| 45 | {
|
---|
| 46 | return false;
|
---|
| 47 | }
|
---|
| 48 | final Criterion other = (Criterion) obj;
|
---|
| 49 | if (this.key != other.key && (this.key == null || !this.key.equals(other.key)))
|
---|
| 50 | {
|
---|
| 51 | return false;
|
---|
| 52 | }
|
---|
| 53 | if (this.value != other.value && (this.value == null || !this.value.equals(other.value)))
|
---|
| 54 | {
|
---|
| 55 | return false;
|
---|
| 56 | }
|
---|
| 57 | return true;
|
---|
| 58 | }
|
---|
| 59 |
|
---|
| 60 | @Override
|
---|
| 61 | public int hashCode()
|
---|
| 62 | {
|
---|
| 63 | int hash = 5;
|
---|
| 64 | hash = 67 * hash + (this.key != null ? this.key.hashCode() : 0);
|
---|
| 65 | hash = 67 * hash + (this.value != null ? this.value.hashCode() : 0);
|
---|
| 66 | return hash;
|
---|
| 67 | }
|
---|
| 68 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.