/** * Converts the specified restriction into a <code>PartitionKeyRestrictions</code>. * * @param restriction the restriction to convert * @return a <code>PartitionKeyRestrictions</code> * @throws InvalidRequestException if a problem occurs while converting the restriction */ private PartitionKeyRestrictions toPartitionKeyRestrictions(Restriction restriction) throws InvalidRequestException { if (restriction instanceof PartitionKeyRestrictions) return (PartitionKeyRestrictions) restriction; return new PartitionKeySingleRestrictionSet(metadata.getKeyValidatorAsClusteringComparator()).mergeWith(restriction); }
/** * Converts the specified restriction into a <code>PartitionKeyRestrictions</code>. * * @param restriction the restriction to convert * @return a <code>PartitionKeyRestrictions</code> * @throws InvalidRequestException if a problem occurs while converting the restriction */ private PartitionKeyRestrictions toPartitionKeyRestrictions(Restriction restriction) throws InvalidRequestException { if (restriction instanceof PartitionKeyRestrictions) return (PartitionKeyRestrictions) restriction; return new PartitionKeySingleRestrictionSet(metadata.getKeyValidatorAsClusteringComparator()).mergeWith(restriction); }
/** * Converts the specified restriction into a <code>PartitionKeyRestrictions</code>. * * @param restriction the restriction to convert * @return a <code>PartitionKeyRestrictions</code> * @throws InvalidRequestException if a problem occurs while converting the restriction */ private PartitionKeyRestrictions toPartitionKeyRestrictions(Restriction restriction) throws InvalidRequestException { if (restriction instanceof PartitionKeyRestrictions) return (PartitionKeyRestrictions) restriction; return new PartitionKeySingleRestrictionSet(metadata.getKeyValidatorAsClusteringComparator()).mergeWith(restriction); }