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 javax.xml.bind.annotation.*;
19  import java.util.List;
20  
21  import lombok.EqualsAndHashCode;
22  import lombok.Getter;
23  import lombok.Setter;
24  import lombok.ToString;
25  import org.openehealth.ipf.commons.ihe.xds.core.metadata.*;
26  
27  /**
28   * Represents a stored query for GetAll.
29   * @author Jens Riemschneider
30   */
31  @XmlAccessorType(XmlAccessType.FIELD)
32  @XmlType(name = "GetAllQuery", propOrder = {
33          "statusDocuments", "statusSubmissionSets", "statusFolders", "confidentialityCodes", "formatCodes",
34          "documentEntryTypes", "patientId", "associationStatuses", "metadataLevel"})
35  @XmlRootElement(name = "getAllQuery")
36  @EqualsAndHashCode(callSuper = true, doNotUseGetters = true)
37  @ToString(callSuper = true, doNotUseGetters = true)
38  public class GetAllQuery extends StoredQuery
39          implements PatientIdBasedStoredQuery, DocumentEntryTypeAwareStoredQuery
40  {
41      private static final long serialVersionUID = -4161172318244319631L;
42  
43      @XmlElement(name = "documentStatus")
44      @Getter @Setter private List<AvailabilityStatus> statusDocuments;
45      @XmlElement(name = "submissionSetStatus")
46      @Getter @Setter private List<AvailabilityStatus> statusSubmissionSets;
47      @XmlElement(name = "folderStatus")
48      @Getter @Setter private List<AvailabilityStatus> statusFolders;
49      @XmlElement(name = "confidentialityCode")
50      @Getter @Setter private QueryList<Code> confidentialityCodes;
51      @XmlElement(name = "formatCode")
52      @Getter @Setter private List<Code> formatCodes;
53      @XmlElement(name = "documentEntryType")
54      @Getter @Setter private List<DocumentEntryType> documentEntryTypes;
55      @Getter @Setter private Identifiable patientId;
56      @XmlElement(name = "associationStatus")
57      @Getter @Setter private List<AvailabilityStatus> associationStatuses;
58      @Getter @Setter private Integer metadataLevel;
59  
60      /**
61       * Constructs the query.
62       */
63      public GetAllQuery() {
64          super(QueryType.GET_ALL);
65      }
66  
67      @Override
68      public void accept(Visitor visitor) {
69          visitor.visit(this);
70      }
71  }