/** * Checks if all of the underlying restrictions are EQ or IN restrictions. * * @return <code>true</code> if all of the underlying restrictions are EQ or IN restrictions, * <code>false</code> otherwise */ public final boolean hasOnlyEqualityRestrictions() { for (SingleRestriction restriction : this) { if (!restriction.isEQ() && !restriction.isIN()) return false; } return true; }
/** * Checks if all of the underlying restrictions are EQ or IN restrictions. * * @return <code>true</code> if all of the underlying restrictions are EQ or IN restrictions, * <code>false</code> otherwise */ public final boolean hasOnlyEqualityRestrictions() { for (SingleRestriction restriction : this) { if (!restriction.isEQ() && !restriction.isIN()) return false; } return true; }
/** * Checks if all of the underlying restrictions are EQ or IN restrictions. * * @return <code>true</code> if all of the underlying restrictions are EQ or IN restrictions, * <code>false</code> otherwise */ public final boolean hasOnlyEqualityRestrictions() { for (SingleRestriction restriction : this) { if (!restriction.isEQ() && !restriction.isIN()) return false; } return true; }
/** * Checks if the specified column is restricted by an EQ restriction. * * @param columnDef the column definition * @return <code>true</code> if the specified column is restricted by an EQ restiction, <code>false</code> * otherwise. */ public boolean isColumnRestrictedByEq(ColumnDefinition columnDef) { Set<Restriction> restrictions = getRestrictions(columnDef.kind).getRestrictions(columnDef); return restrictions.stream() .filter(SingleRestriction.class::isInstance) .anyMatch(p -> ((SingleRestriction) p).isEQ()); }
/** * Checks if the specified column is restricted by an EQ restriction. * * @param columnDef the column definition * @return <code>true</code> if the specified column is restricted by an EQ restiction, <code>false</code> * otherwise. */ public boolean isColumnRestrictedByEq(ColumnDefinition columnDef) { Set<Restriction> restrictions = getRestrictions(columnDef.kind).getRestrictions(columnDef); return restrictions.stream() .filter(SingleRestriction.class::isInstance) .anyMatch(p -> ((SingleRestriction) p).isEQ()); }
/** * Checks if the specified column is restricted by an EQ restriction. * * @param columnDef the column definition * @return <code>true</code> if the specified column is restricted by an EQ restiction, <code>false</code> * otherwise. */ public boolean isColumnRestrictedByEq(ColumnDefinition columnDef) { Set<Restriction> restrictions = getRestrictions(columnDef.kind).getRestrictions(columnDef); return restrictions.stream() .filter(SingleRestriction.class::isInstance) .anyMatch(p -> ((SingleRestriction) p).isEQ()); }