View Javadoc
1   /*
2    * Copyright 2009 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  
23  import javax.xml.bind.annotation.XmlAccessType;
24  import javax.xml.bind.annotation.XmlAccessorType;
25  import javax.xml.bind.annotation.XmlElement;
26  import javax.xml.bind.annotation.XmlType;
27  import java.io.Serializable;
28  import java.util.List;
29  
30  /**
31   * Base class for queries that are defined by a list of UUIDs or unique IDs. 
32   * @author Jens Riemschneider
33   */
34  @XmlAccessorType(XmlAccessType.FIELD)
35  @XmlType(name = "GetByIdQuery", propOrder = {"uniqueIds"})
36  @EqualsAndHashCode(callSuper = true, doNotUseGetters = true)
37  @ToString(callSuper = true, doNotUseGetters = true)
38  public abstract class GetByIdQuery extends GetByUuidQuery implements Serializable {
39      private static final long serialVersionUID = -3955280836816390271L;
40  
41      @XmlElement(name = "uniqueId")
42      @Getter @Setter private List<String> uniqueIds;
43  
44      /**
45       * For JAXB serialization only.
46       */
47      public GetByIdQuery() {
48      }
49  
50      /**
51       * Constructs the query.
52       * @param type
53       *          the type of the query.
54       */
55      protected GetByIdQuery(QueryType type) {
56          super(type);
57      }
58  }