View Javadoc
1   /*
2    * Copyright 2012 the original author or authors.
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  package org.openehealth.ipf.commons.ihe.xds.core.requests.query;
17  
18  import lombok.EqualsAndHashCode;
19  import lombok.Getter;
20  import lombok.Setter;
21  import lombok.ToString;
22  import org.openehealth.ipf.commons.ihe.xds.core.metadata.Identifiable;
23  
24  import javax.xml.bind.annotation.XmlAccessType;
25  import javax.xml.bind.annotation.XmlAccessorType;
26  import javax.xml.bind.annotation.XmlRootElement;
27  import javax.xml.bind.annotation.XmlType;
28  
29  /**
30   * Represents a stored query Cross-Community Fetch.
31   * @author Dmytro Rud
32   */
33  @XmlAccessorType(XmlAccessType.FIELD)
34  @XmlType(name = "FetchQuery", propOrder = {"patientId"})
35  @XmlRootElement(name = "fetchQuery")
36  @EqualsAndHashCode(callSuper = true, doNotUseGetters = true)
37  @ToString(callSuper = true, doNotUseGetters = true)
38  public class FetchQuery extends DocumentsQuery implements PatientIdBasedStoredQuery {
39      private static final long serialVersionUID = 7171404956090539393L;
40  
41      @Getter @Setter private Identifiable patientId;
42  
43      /**
44       * Constructs the query.
45       */
46      public FetchQuery() {
47          super(QueryType.FETCH);
48      }
49  
50      @Override
51      public void accept(Visitor visitor) {
52          visitor.visit(this);
53      }
54  }