/** * Checks that the specified object is <code>null</code>. * If it is not an <code>InvalidRequestException</code> will be throws. * * @param object the object to test * @param message the error message * @return the object * @throws InvalidRequestException if the specified object is not <code>null</code>. */ public static <T> T checkNull(T object, String message) throws InvalidRequestException { return checkNull(object, message, EMPTY_OBJECT_ARRAY); }
/** * Checks that the specified object is <code>null</code>. * If it is not an <code>InvalidRequestException</code> will be throws. * * @param object the object to test * @param message the error message * @return the object * @throws InvalidRequestException if the specified object is not <code>null</code>. */ public static <T> T checkNull(T object, String message) throws InvalidRequestException { return checkNull(object, message, EMPTY_OBJECT_ARRAY); }
/** * Checks that the specified object is <code>null</code>. * If it is not an <code>InvalidRequestException</code> will be throws. * * @param object the object to test * @param message the error message * @return the object * @throws InvalidRequestException if the specified object is not <code>null</code>. */ public static <T> T checkNull(T object, String message) throws InvalidRequestException { return checkNull(object, message, EMPTY_OBJECT_ARRAY); }
/** * Checks that the specified object is <code>null</code>. * If it is not an <code>InvalidRequestException</code> will be throws. * * @param object the object to test * @param message the error message * @return the object * @throws InvalidRequestException if the specified object is not <code>null</code>. */ public static <T> T checkNull(T object, String message) throws InvalidRequestException { return checkNull(object, message, EMPTY_OBJECT_ARRAY); }
/** * Returns the column conditions. * * @param metadata the column family meta data * @param boundNames the bound names * @return the column conditions. */ private ColumnConditions prepareColumnConditions(CFMetaData metadata, VariableSpecifications boundNames) { checkNull(attrs.timestamp, "Cannot provide custom timestamp for conditional updates"); ColumnConditions.Builder builder = ColumnConditions.newBuilder(); for (Pair<ColumnDefinition.Raw, ColumnCondition.Raw> entry : conditions) { ColumnDefinition def = entry.left.prepare(metadata); ColumnCondition condition = entry.right.prepare(keyspace(), def, metadata); condition.collectMarkerSpecification(boundNames); checkFalse(def.isPrimaryKeyColumn(), "PRIMARY KEY column '%s' cannot have IF conditions", def.name); builder.add(condition); } return builder.build(); }
/** * Returns the column conditions. * * @param metadata the column family meta data * @param boundNames the bound names * @return the column conditions. */ private ColumnConditions prepareColumnConditions(CFMetaData metadata, VariableSpecifications boundNames) { checkNull(attrs.timestamp, "Cannot provide custom timestamp for conditional updates"); ColumnConditions.Builder builder = ColumnConditions.newBuilder(); for (Pair<ColumnDefinition.Raw, ColumnCondition.Raw> entry : conditions) { ColumnDefinition def = entry.left.prepare(metadata); ColumnCondition condition = entry.right.prepare(keyspace(), def, metadata); condition.collectMarkerSpecification(boundNames); checkFalse(def.isPrimaryKeyColumn(), "PRIMARY KEY column '%s' cannot have IF conditions", def.name); builder.add(condition); } return builder.build(); }
/** * Returns the column conditions. * * @param metadata the column family meta data * @param boundNames the bound names * @return the column conditions. */ private ColumnConditions prepareColumnConditions(CFMetaData metadata, VariableSpecifications boundNames) { checkNull(attrs.timestamp, "Cannot provide custom timestamp for conditional updates"); ColumnConditions.Builder builder = ColumnConditions.newBuilder(); for (Pair<ColumnDefinition.Raw, ColumnCondition.Raw> entry : conditions) { ColumnDefinition def = entry.left.prepare(metadata); ColumnCondition condition = entry.right.prepare(keyspace(), def, metadata); condition.collectMarkerSpecification(boundNames); checkFalse(def.isPrimaryKeyColumn(), "PRIMARY KEY column '%s' cannot have IF conditions", def.name); builder.add(condition); } return builder.build(); }
checkNull(perPartitionLimit, "PER PARTITION LIMIT is not allowed with SELECT DISTINCT queries"); validateDistinctSelection(cfm, selection, restrictions);
checkNull(perPartitionLimit, "PER PARTITION LIMIT is not allowed with SELECT DISTINCT queries"); validateDistinctSelection(cfm, selection, restrictions);
checkNull(perPartitionLimit, "PER PARTITION LIMIT is not allowed with SELECT DISTINCT queries"); validateDistinctSelection(cfm, selection, restrictions);