• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

uber / cadence-java-client / 2632

07 Nov 2024 12:17AM UTC coverage: 78.326% (-1.5%) from 79.78%
2632

Pull #951

buildkite

fimanishi
Add tests for PollerOptions.java
Pull Request #951: Add tests for PollerOptions.java

15185 of 19387 relevant lines covered (78.33%)

0.78 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

34.69
/src/main/java/com/uber/cadence/internal/replay/QueryWorkflowParameters.java
1
/*
2
 *  Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
 *
4
 *  Modifications copyright (C) 2017 Uber Technologies, Inc.
5
 *
6
 *  Licensed under the Apache License, Version 2.0 (the "License"). You may not
7
 *  use this file except in compliance with the License. A copy of the License is
8
 *  located at
9
 *
10
 *  http://aws.amazon.com/apache2.0
11
 *
12
 *  or in the "license" file accompanying this file. This file is distributed on
13
 *  an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
14
 *  express or implied. See the License for the specific language governing
15
 *  permissions and limitations under the License.
16
 */
17

18
package com.uber.cadence.internal.replay;
19

20
import com.uber.cadence.QueryConsistencyLevel;
21
import com.uber.cadence.QueryRejectCondition;
22
import java.nio.charset.StandardCharsets;
23

24
public class QueryWorkflowParameters implements Cloneable {
25

26
  private byte[] input;
27

28
  private String runId;
29

30
  private String queryType;
31

32
  private String workflowId;
33

34
  private QueryRejectCondition queryRejectCondition;
35

36
  private QueryConsistencyLevel queryConsistencyLevel;
37

38
  public QueryWorkflowParameters() {}
1✔
39

40
  public byte[] getInput() {
41
    return input;
1✔
42
  }
43

44
  public void setInput(byte[] input) {
45
    this.input = input;
1✔
46
  }
1✔
47

48
  public QueryWorkflowParameters withInput(byte[] input) {
49
    this.input = input;
×
50
    return this;
×
51
  }
52

53
  public String getRunId() {
54
    return runId;
1✔
55
  }
56

57
  public void setRunId(String runId) {
58
    this.runId = runId;
×
59
  }
×
60

61
  public QueryWorkflowParameters withRunId(String runId) {
62
    this.runId = runId;
×
63
    return this;
×
64
  }
65

66
  public String getQueryType() {
67
    return queryType;
1✔
68
  }
69

70
  public void setQueryType(String queryType) {
71
    this.queryType = queryType;
1✔
72
  }
1✔
73

74
  public QueryWorkflowParameters withQueryType(String queryType) {
75
    this.queryType = queryType;
×
76
    return this;
×
77
  }
78

79
  public String getWorkflowId() {
80
    return workflowId;
1✔
81
  }
82

83
  public void setWorkflowId(String workflowId) {
84
    this.workflowId = workflowId;
1✔
85
  }
1✔
86

87
  public QueryWorkflowParameters withWorkflowId(String workflowId) {
88
    this.workflowId = workflowId;
×
89
    return this;
×
90
  }
91

92
  public QueryRejectCondition getQueryRejectCondition() {
93
    return queryRejectCondition;
1✔
94
  }
95

96
  public void setQueryRejectCondition(QueryRejectCondition queryRejectCondition) {
97
    this.queryRejectCondition = queryRejectCondition;
1✔
98
  }
1✔
99

100
  public QueryWorkflowParameters withQueryRejectCondition(
101
      QueryRejectCondition queryRejectCondition) {
102
    this.queryRejectCondition = queryRejectCondition;
×
103
    return this;
×
104
  }
105

106
  public QueryConsistencyLevel getQueryConsistencyLevel() {
107
    return queryConsistencyLevel;
1✔
108
  }
109

110
  public void setQueryConsistencyLevel(QueryConsistencyLevel queryConsistencyLevel) {
111
    this.queryConsistencyLevel = queryConsistencyLevel;
1✔
112
  }
1✔
113

114
  public QueryWorkflowParameters withQueryConsistencyLevel(
115
      QueryConsistencyLevel queryConsistencyLevel) {
116
    this.queryConsistencyLevel = queryConsistencyLevel;
×
117
    return this;
×
118
  }
119

120
  @Override
121
  public String toString() {
122
    StringBuilder sb = new StringBuilder();
×
123
    sb.append("{");
×
124
    sb.append("QueryName: " + queryType + ", ");
×
125
    sb.append("Input: " + new String(input, 0, 512, StandardCharsets.UTF_8) + ", ");
×
126
    sb.append("WorkflowId: " + workflowId + ", ");
×
127
    sb.append("RunId: " + runId + ", ");
×
128
    sb.append("QueryRejectCondition: " + queryRejectCondition + ", ");
×
129
    sb.append("queryConsistencyLevel: " + queryConsistencyLevel + ", ");
×
130
    sb.append("}");
×
131
    return sb.toString();
×
132
  }
133

134
  public QueryWorkflowParameters copy() {
135
    QueryWorkflowParameters result = new QueryWorkflowParameters();
×
136
    result.setInput(input);
×
137
    result.setRunId(runId);
×
138
    result.setQueryType(queryType);
×
139
    result.setWorkflowId(workflowId);
×
140
    result.setQueryRejectCondition(queryRejectCondition);
×
141
    result.setQueryConsistencyLevel(queryConsistencyLevel);
×
142
    return result;
×
143
  }
144
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc