Skip to main content
summaryrefslogtreecommitdiffstats
blob: 4596eaf326b5f6183fdf5171f94c9bf2303caa47 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*******************************************************************************
 * Copyright (c) 2012 Boeing.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     Boeing - initial API and implementation
 *******************************************************************************/
package org.eclipse.osee.orcs.rest.client.internal.search;

import org.eclipse.osee.orcs.rest.client.internal.Options;

/**
 * @author Roberto E. Escobar
 */
public class QueryOptions extends Options {

   private boolean includeCache = true;
   private boolean includeTypeInheritance = false;

   public QueryOptions() {
      super();
   }

   @Override
   public void reset() {
      super.reset();
      includeCache = true;
      includeTypeInheritance = false;
   }

   public boolean isCacheIncluded() {
      return includeCache;
   }

   public boolean isTypeInheritanceIncluded() {
      return includeTypeInheritance;
   }

   public void setIncludeCache(boolean enabled) {
      includeCache = enabled;
   }

   public void setIncludeTypeInheritance(boolean enabled) {
      includeTypeInheritance = enabled;
   }

   @Override
   public QueryOptions clone() {
      QueryOptions clone = new QueryOptions();
      clone.setIncludeDeleted(this.areDeletedIncluded());
      clone.setFromTransaction(this.getFromTransaction());
      clone.includeCache = this.includeCache;
      clone.includeTypeInheritance = this.includeTypeInheritance;
      return clone;
   }

   @Override
   public String toString() {
      return "QueryOptions [includeCache=" + includeCache + ", includeTypeInheritance=" + includeTypeInheritance + " [" + super.toString() + "]]";
   }
}

Back to the top