/** * Compares this {@code StringExpression} to another {@code StringExpression}, ignoring case * considerations. * * @param str * @return !this.equalsIgnoreCase(str) * @see java.lang.String#equalsIgnoreCase(String) */ public BooleanExpression notEqualsIgnoreCase(String str) { return equalsIgnoreCase(str).not(); }
/** * Return true if this String is not empty * * @return !this.isEmpty() * @see java.lang.String#isEmpty() */ public BooleanExpression isNotEmpty() { return isEmpty().not(); }
/** * Expr: {@code this not like str} * * @param str * @return */ public BooleanExpression notLike(String str, char escape) { return like(str, escape).not(); }
/** * Expr: {@code this not like str} * * @param str * @return */ public BooleanExpression notLike(Expression<String> str, char escape) { return like(str, escape).not(); }
/** * @param from * @param to * @return */ public final <A extends Number & Comparable<?>> BooleanExpression notBetween(Expression<A> from, Expression<A> to) { return between(from, to).not(); }
/** * Expr: {@code this not like str} * * @param str * @return */ public BooleanExpression notLike(Expression<String> str) { return like(str).not(); }
/** * Get a {@code this not between from and to} expression * * @param from * @param to * @return */ public final BooleanExpression notBetween(Expression<T> from, Expression<T> to) { return between(from, to).not(); }
@Override public BooleanExpression notExists() { return exists().not(); }
@Override public BooleanExpression notExists() { return exists().not(); }
@Override public BooleanExpression notExists() { return exists().not(); }
@Override public BooleanExpression notExists() { return exists().not(); }
@Override public BooleanExpression notExists() { return exists().not(); }
@Override public BooleanExpression not() { if (opMixin.getOperator() == Ops.NOT && opMixin.getArg(0) instanceof BooleanExpression) { return (BooleanExpression) opMixin.getArg(0); } else { return super.not(); } }
@Test public void Any_In2() { assertFalse(query().from(cat).where( cat.kittens.any().in(savedCats), cat.kittens.any().in(savedCats.subList(0, 1)).not()) .list(cat).isEmpty()); }
@Test public void Not() throws Exception { query().from(cat).where(cat.kittens.size().lt(1).not()).parse(); }
@Test public void Not_3() throws Exception { query().from(cat).where(cat.kittens.size().goe(1).not()).parse(); }
@Test public void Contains_Value_Not() throws Exception { query.from(user); query.where(user.getMap("buddiesMapped", String.class, User.class).containsValue(createUser()).not()); assertEquals("SELECT * WHERE { ?user ?_c2 ?_c3 ; ?_c4 ?user_buddiesMapped . FILTER(!(?user_buddiesMapped = ?_c6)) }"); }
@Test public void Not_2() throws Exception { query().from(cat).where(cat.kittens.size().gt(1).not()).parse(); }
@Test @Ignore // isn't a valid JPQL query public void Subquery_UniqueResult() { QCat cat2 = new QCat("cat2"); BooleanExpression exists = new JPASubQuery().from(cat2).where(cat2.eyecolor.isNotNull()).exists(); assertNotNull(query().from(cat) .where(cat.breed.eq(0).not()) .singleResult(new QCatSummary(cat.breed.count(), exists))); }