public boolean hasContains() { for (SingleRestriction restriction : this) { if (restriction.isContains()) return true; } return false; }
public boolean hasContains() { for (SingleRestriction restriction : this) { if (restriction.isContains()) return true; } return false; }
public boolean hasContains() { for (SingleRestriction restriction : this) { if (restriction.isContains()) return true; } return false; }
/** * Checks if any of the underlying restriction is a CONTAINS or CONTAINS KEY. * * @return <code>true</code> if any of the underlying restriction is a CONTAINS or CONTAINS KEY, * <code>false</code> otherwise */ public final boolean hasContains() { for (SingleRestriction restriction : restrictions) { if (restriction.isContains()) return true; } return false; }
/** * Checks if any of the underlying restriction is a CONTAINS or CONTAINS KEY. * * @return <code>true</code> if any of the underlying restriction is a CONTAINS or CONTAINS KEY, * <code>false</code> otherwise */ public final boolean hasContains() { for (SingleRestriction restriction : restrictions) { if (restriction.isContains()) return true; } return false; }
/** * Checks if any of the underlying restriction is a CONTAINS or CONTAINS KEY. * * @return <code>true</code> if any of the underlying restriction is a CONTAINS or CONTAINS KEY, * <code>false</code> otherwise */ public final boolean hasContains() { for (SingleRestriction restriction : restrictions) { if (restriction.isContains()) return true; } return false; }
/** * Checks if the restrictions contains multiple contains, contains key, or map[key] = value. * * @return <code>true</code> if the restrictions contains multiple contains, contains key, or , * map[key] = value; <code>false</code> otherwise */ public final boolean hasMultipleContains() { int numberOfContains = 0; for (SingleRestriction restriction : restrictions.values()) { if (restriction.isContains()) { ContainsRestriction contains = (ContainsRestriction) restriction; numberOfContains += (contains.numberOfValues() + contains.numberOfKeys() + contains.numberOfEntries()); } } return numberOfContains > 1; }
/** * Checks if the restrictions contains multiple contains, contains key, or map[key] = value. * * @return <code>true</code> if the restrictions contains multiple contains, contains key, or , * map[key] = value; <code>false</code> otherwise */ public final boolean hasMultipleContains() { int numberOfContains = 0; for (SingleRestriction restriction : restrictions.values()) { if (restriction.isContains()) { ContainsRestriction contains = (ContainsRestriction) restriction; numberOfContains += (contains.numberOfValues() + contains.numberOfKeys() + contains.numberOfEntries()); } } return numberOfContains > 1; }
/** * Checks if the restrictions contains multiple contains, contains key, or map[key] = value. * * @return <code>true</code> if the restrictions contains multiple contains, contains key, or , * map[key] = value; <code>false</code> otherwise */ public final boolean hasMultipleContains() { int numberOfContains = 0; for (SingleRestriction restriction : restrictions.values()) { if (restriction.isContains()) { ContainsRestriction contains = (ContainsRestriction) restriction; numberOfContains += (contains.numberOfValues() + contains.numberOfKeys() + contains.numberOfEntries()); } } return numberOfContains > 1; }
private boolean handleInFilter(SingleRestriction restriction, int index) { return restriction.isContains() || restriction.isLIKE() || index != restriction.getFirstColumn().position(); }
private boolean handleInFilter(SingleRestriction restriction, int index) { return restriction.isContains() || restriction.isLIKE() || index != restriction.getFirstColumn().position(); }
private boolean handleInFilter(SingleRestriction restriction, int index) { return restriction.isContains() || restriction.isLIKE() || index != restriction.getFirstColumn().position(); }
@Override public SingleRestriction doMergeWith(SingleRestriction otherRestriction) { checkTrue(otherRestriction.isContains(), "Collection column %s can only be restricted by CONTAINS, CONTAINS KEY, or map-entry equality", columnDef.name); SingleColumnRestriction.ContainsRestriction newContains = new ContainsRestriction(columnDef); copyKeysAndValues(this, newContains); copyKeysAndValues((ContainsRestriction) otherRestriction, newContains); return newContains; }
@Override public SingleRestriction doMergeWith(SingleRestriction otherRestriction) { checkTrue(otherRestriction.isContains(), "Collection column %s can only be restricted by CONTAINS, CONTAINS KEY, or map-entry equality", columnDef.name); SingleColumnRestriction.ContainsRestriction newContains = new ContainsRestriction(columnDef); copyKeysAndValues(this, newContains); copyKeysAndValues((ContainsRestriction) otherRestriction, newContains); return newContains; }
@Override public SingleRestriction doMergeWith(SingleRestriction otherRestriction) { checkTrue(otherRestriction.isContains(), "Collection column %s can only be restricted by CONTAINS, CONTAINS KEY, or map-entry equality", columnDef.name); SingleColumnRestriction.ContainsRestriction newContains = new ContainsRestriction(columnDef); copyKeysAndValues(this, newContains); copyKeysAndValues((ContainsRestriction) otherRestriction, newContains); return newContains; }