1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.apache.hadoop.hbase.hbql.client;
22
23 import java.io.ByteArrayOutputStream;
24 import java.io.PrintStream;
25
26 public class ExecutionResults {
27
28 private final ByteArrayOutputStream baos;
29 public final PrintStream out;
30
31 private boolean success = true;
32 private int count = -1;
33 private boolean predicate = true;
34
35 public ExecutionResults() {
36 this.baos = new ByteArrayOutputStream();
37 this.out = new PrintStream(baos);
38 }
39
40 public ExecutionResults(final String str) {
41 this();
42 this.out.println(str);
43 }
44
45 public boolean hadSuccess() {
46 return this.success;
47 }
48
49 public void setSuccess(final boolean success) {
50 this.success = success;
51 }
52
53 public String toString() {
54 this.out.flush();
55 return baos.toString();
56 }
57
58 public int getCount() {
59 return this.count;
60 }
61
62 public void setCount(final int count) {
63 this.count = count;
64 }
65
66 public boolean getPredicate() {
67 return this.predicate;
68 }
69
70 public void setPredicate(final boolean predicate) {
71 this.predicate = predicate;
72 }
73 }