29 import java.util.concurrent.CompletionStage; |
29 import java.util.concurrent.CompletionStage; |
30 import java.util.function.Consumer; |
30 import java.util.function.Consumer; |
31 import java.util.function.Function; |
31 import java.util.function.Function; |
32 |
32 |
33 /** |
33 /** |
34 * A {@link ParameterizedRowCountOperation} is a {@link ParameterizedOperation} that returns a count. |
34 * A {@code ParameterizedRowCountOperation} is a {@link ParameterizedOperation} that returns a count. |
35 * |
35 * |
36 * @param <T> the type of the result of this {@link Operation} |
36 * @param <T> the type of the result of this {@link Operation} |
37 */ |
37 */ |
38 public interface ParameterizedRowCountOperation<T> extends ParameterizedOperation<T>, RowCountOperation<T> { |
38 public interface ParameterizedRowCountOperation<T> extends ParameterizedOperation<T>, RowCountOperation<T> { |
39 |
39 |
54 */ |
54 */ |
55 public RowOperation<T> returning(String ... keys); |
55 public RowOperation<T> returning(String ... keys); |
56 |
56 |
57 // Covariant overrides |
57 // Covariant overrides |
58 |
58 |
|
59 /** |
|
60 * {@inheritDoc} |
|
61 * |
|
62 * @return this {@code ParameterizedRowCountOperation} |
|
63 */ |
59 @Override |
64 @Override |
60 public ParameterizedRowCountOperation<T> onError(Consumer<Throwable> handler); |
65 public ParameterizedRowCountOperation<T> onError(Consumer<Throwable> handler); |
61 |
66 |
|
67 /** |
|
68 * {@inheritDoc} |
|
69 * |
|
70 * @return this {@code ParameterizedRowCountOperation} |
|
71 */ |
62 @Override |
72 @Override |
63 ParameterizedRowCountOperation<T> apply(Function<Result.RowCount, ? extends T> processor); |
73 ParameterizedRowCountOperation<T> apply(Function<Result.RowCount, ? extends T> processor); |
64 |
74 |
|
75 /** |
|
76 * {@inheritDoc} |
|
77 * |
|
78 * @return this {@code ParameterizedRowCountOperation} |
|
79 */ |
65 @Override |
80 @Override |
66 public ParameterizedRowCountOperation<T> set(String id, Object value); |
81 public ParameterizedRowCountOperation<T> set(String id, Object value); |
67 |
82 |
|
83 /** |
|
84 * {@inheritDoc} |
|
85 * |
|
86 * @return this {@code ParameterizedRowCountOperation} |
|
87 */ |
68 @Override |
88 @Override |
69 public ParameterizedRowCountOperation<T> set(String id, Object value, SqlType type); |
89 public ParameterizedRowCountOperation<T> set(String id, Object value, SqlType type); |
70 |
90 |
|
91 /** |
|
92 * {@inheritDoc} |
|
93 * |
|
94 * @return this {@code ParameterizedRowCountOperation} |
|
95 */ |
71 @Override |
96 @Override |
72 public ParameterizedRowCountOperation<T> set(String id, CompletionStage<?> source); |
97 public ParameterizedRowCountOperation<T> set(String id, CompletionStage<?> source); |
73 |
98 |
|
99 /** |
|
100 * {@inheritDoc} |
|
101 * |
|
102 * @return this {@code ParameterizedRowCountOperation} |
|
103 */ |
74 @Override |
104 @Override |
75 public ParameterizedRowCountOperation<T> set(String id, CompletionStage<?> source, SqlType type); |
105 public ParameterizedRowCountOperation<T> set(String id, CompletionStage<?> source, SqlType type); |
76 |
106 |
|
107 /** |
|
108 * {@inheritDoc} |
|
109 * |
|
110 * @return this {@code ParameterizedRowCountOperation} |
|
111 */ |
77 @Override |
112 @Override |
78 public ParameterizedRowCountOperation<T> timeout(Duration minTime); |
113 public ParameterizedRowCountOperation<T> timeout(Duration minTime); |
79 |
114 |
80 } |
115 } |