/** * 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); }
private StatementRestrictions(StatementType type, CFMetaData cfm, boolean allowFiltering) { this.type = type; this.cfm = cfm; this.partitionKeyRestrictions = new PartitionKeySingleRestrictionSet(cfm.getKeyValidatorAsClusteringComparator()); this.clusteringColumnsRestrictions = new ClusteringColumnRestrictions(cfm, allowFiltering); this.nonPrimaryKeyRestrictions = new RestrictionSet(); this.notNullColumns = new HashSet<>(); }
/** * 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); }
private StatementRestrictions(StatementType type, CFMetaData cfm, boolean allowFiltering) { this.type = type; this.cfm = cfm; this.partitionKeyRestrictions = new PartitionKeySingleRestrictionSet(cfm.getKeyValidatorAsClusteringComparator()); this.clusteringColumnsRestrictions = new ClusteringColumnRestrictions(cfm, allowFiltering); this.nonPrimaryKeyRestrictions = new RestrictionSet(); this.notNullColumns = new HashSet<>(); }
private StatementRestrictions(StatementType type, CFMetaData cfm, boolean allowFiltering) { this.type = type; this.cfm = cfm; this.partitionKeyRestrictions = new PartitionKeySingleRestrictionSet(cfm.getKeyValidatorAsClusteringComparator()); this.clusteringColumnsRestrictions = new ClusteringColumnRestrictions(cfm, allowFiltering); this.nonPrimaryKeyRestrictions = new RestrictionSet(); this.notNullColumns = new HashSet<>(); }
@Override public PartitionKeyRestrictions mergeWith(Restriction restriction) { if (restriction.isOnToken()) { if (isEmpty()) return (PartitionKeyRestrictions) restriction; return new TokenFilter(this, (TokenRestriction) restriction); } return new PartitionKeySingleRestrictionSet(this, (SingleRestriction) restriction); }
@Override public PartitionKeyRestrictions mergeWith(Restriction restriction) { if (restriction.isOnToken()) { if (isEmpty()) return (PartitionKeyRestrictions) restriction; return new TokenFilter(this, (TokenRestriction) restriction); } return new PartitionKeySingleRestrictionSet(this, (SingleRestriction) restriction); }
@Override public PartitionKeyRestrictions mergeWith(Restriction restriction) { if (restriction.isOnToken()) { if (isEmpty()) return (PartitionKeyRestrictions) restriction; return new TokenFilter(this, (TokenRestriction) restriction); } return new PartitionKeySingleRestrictionSet(this, (SingleRestriction) restriction); }