kikocis/java-driver public
Changesets · Branches · Tags · Compare
| Changeset | 477ed7b8ab6cd0818f54d5f89bec1132dcb0ade607e20b038a2f7fa37dc074ff |
|---|---|
| Author | olivier bourgain <olivierbourgain02@gmail.com> · 2015-01-15 23:27 +01:00 |
| Committer | olivier bourgain <olivierbourgain02@gmail.com> · 2015-01-15 23:27 +01:00 |
| Parents | 3e4679db605a |
4 files changed
modified driver-core/src/main/java/com/datastax/driver/core/querybuilder/Clause.java +4 −4
| @@ -66,9 +66,9 @@ | ||
| 66 | 66 | |
| 67 | 67 | static class InClause extends AbstractClause { |
| 68 | 68 | |
| 69 | - private final List<Object> values; | |
| 69 | + private final List<?> values; | |
| 70 | 70 | |
| 71 | - InClause(String name, List<Object> values) { | |
| 71 | + InClause(String name, List<?> values) { | |
| 72 | 72 | super(name); |
| 73 | 73 | this.values = values; |
| 74 | 74 | |
| @@ -114,9 +114,9 @@ | ||
| 114 | 114 | static class CompoundClause extends Clause { |
| 115 | 115 | private String op; |
| 116 | 116 | private final List<String> names; |
| 117 | - private final List<Object> values; | |
| 117 | + private final List<?> values; | |
| 118 | 118 | |
| 119 | - CompoundClause(List<String> names, String op, List<Object> values) { | |
| 119 | + CompoundClause(List<String> names, String op, List<?> values) { | |
| 120 | 120 | assert names.size() == values.size(); |
| 121 | 121 | this.op = op; |
| 122 | 122 | this.names = names; |
modified driver-core/src/main/java/com/datastax/driver/core/querybuilder/Delete.java +2 −2
| @@ -27,13 +27,13 @@ | ||
| 27 | 27 | public class Delete extends BuiltStatement { |
| 28 | 28 | |
| 29 | 29 | private final String table; |
| 30 | - private final List<Object> columnNames; | |
| 30 | + private final List<?> columnNames; | |
| 31 | 31 | private final Where where; |
| 32 | 32 | private final Options usings; |
| 33 | 33 | private final Conditions conditions; |
| 34 | 34 | private boolean ifExists; |
| 35 | 35 | |
| 36 | - Delete(String keyspace, String table, List<Object> columnNames) { | |
| 36 | + Delete(String keyspace, String table, List<?> columnNames) { | |
| 37 | 37 | super(keyspace); |
| 38 | 38 | this.table = table; |
| 39 | 39 | this.columnNames = columnNames; |
modified driver-core/src/main/java/com/datastax/driver/core/querybuilder/QueryBuilder.java +5 −5
| @@ -295,7 +295,7 @@ | ||
| 295 | 295 | * @param values the values |
| 296 | 296 | * @return the corresponding where clause. |
| 297 | 297 | */ |
| 298 | - public static Clause in(String name, List<Object> values) { | |
| 298 | + public static Clause in(String name, List<?> values) { | |
| 299 | 299 | return new Clause.InClause(name, values); |
| 300 | 300 | } |
| 301 | 301 | |
| @@ -325,7 +325,7 @@ | ||
| 325 | 325 | * |
| 326 | 326 | * @throws IllegalArgumentException if {@code names.size() != values.size()}. |
| 327 | 327 | */ |
| 328 | - public static Clause lt(List<String> names, List<Object> values) { | |
| 328 | + public static Clause lt(List<String> names, List<?> values) { | |
| 329 | 329 | if (names.size() != values.size()) |
| 330 | 330 | throw new IllegalArgumentException(String.format("The number of names (%d) and values (%d) don't match", names.size(), values.size())); |
| 331 | 331 | |
| @@ -358,7 +358,7 @@ | ||
| 358 | 358 | * |
| 359 | 359 | * @throws IllegalArgumentException if {@code names.size() != values.size()}. |
| 360 | 360 | */ |
| 361 | - public static Clause lte(List<String> names, List<Object> values) { | |
| 361 | + public static Clause lte(List<String> names, List<?> values) { | |
| 362 | 362 | if (names.size() != values.size()) |
| 363 | 363 | throw new IllegalArgumentException(String.format("The number of names (%d) and values (%d) don't match", names.size(), values.size())); |
| 364 | 364 | |
| @@ -391,7 +391,7 @@ | ||
| 391 | 391 | * |
| 392 | 392 | * @throws IllegalArgumentException if {@code names.size() != values.size()}. |
| 393 | 393 | */ |
| 394 | - public static Clause gt(List<String> names, List<Object> values) { | |
| 394 | + public static Clause gt(List<String> names, List<?> values) { | |
| 395 | 395 | if (names.size() != values.size()) |
| 396 | 396 | throw new IllegalArgumentException(String.format("The number of names (%d) and values (%d) don't match", names.size(), values.size())); |
| 397 | 397 | |
| @@ -424,7 +424,7 @@ | ||
| 424 | 424 | * |
| 425 | 425 | * @throws IllegalArgumentException if {@code names.size() != values.size()}. |
| 426 | 426 | */ |
| 427 | - public static Clause gte(List<String> names, List<Object> values) { | |
| 427 | + public static Clause gte(List<String> names, List<?> values) { | |
| 428 | 428 | if (names.size() != values.size()) |
| 429 | 429 | throw new IllegalArgumentException(String.format("The number of names (%d) and values (%d) don't match", names.size(), values.size())); |
| 430 | 430 |
modified driver-core/src/main/java/com/datastax/driver/core/querybuilder/Utils.java +4 −4
| @@ -40,7 +40,7 @@ | ||
| 40 | 40 | return sb; |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | - static StringBuilder joinAndAppendNames(StringBuilder sb, String separator, List<Object> values) { | |
| 43 | + static StringBuilder joinAndAppendNames(StringBuilder sb, String separator, List<?> values) { | |
| 44 | 44 | for (int i = 0; i < values.size(); i++) { |
| 45 | 45 | if (i > 0) |
| 46 | 46 | sb.append(separator); |
| @@ -49,7 +49,7 @@ | ||
| 49 | 49 | return sb; |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | - static StringBuilder joinAndAppendValues(StringBuilder sb, String separator, List<Object> values, List<ByteBuffer> variables) { | |
| 52 | + static StringBuilder joinAndAppendValues(StringBuilder sb, String separator, List<?> values, List<ByteBuffer> variables) { | |
| 53 | 53 | for (int i = 0; i < values.size(); i++) { |
| 54 | 54 | if (i > 0) |
| 55 | 55 | sb.append(separator); |
| @@ -142,7 +142,7 @@ | ||
| 142 | 142 | sb.append(((Date)value).getTime()); |
| 143 | 143 | return true; |
| 144 | 144 | } else if (value instanceof ByteBuffer) { |
| 145 | - sb.append(Bytes.toHexString((ByteBuffer)value)); | |
| 145 | + sb.append(Bytes.toHexString((ByteBuffer) value)); | |
| 146 | 146 | return true; |
| 147 | 147 | } else if (value instanceof BindMarker) { |
| 148 | 148 | sb.append(value); |
| @@ -171,7 +171,7 @@ | ||
| 171 | 171 | @SuppressWarnings("rawtypes") |
| 172 | 172 | private static boolean appendValueIfCollection(Object value, StringBuilder sb, boolean rawValue) { |
| 173 | 173 | if (value instanceof List) { |
| 174 | - appendList((List)value, sb, rawValue); | |
| 174 | + appendList((List) value, sb, rawValue); | |
| 175 | 175 | return true; |
| 176 | 176 | } else if (value instanceof Set) { |
| 177 | 177 | appendSet((Set)value, sb, rawValue); |