mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
This commit is contained in:
@@ -83,6 +83,17 @@ public abstract class PBaseValueEqual<R, T> extends TQPropertyBase<R> {
|
||||
return _root;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is equal to another property.
|
||||
*
|
||||
* @param other the other property to compare
|
||||
* @return the root query bean instance
|
||||
*/
|
||||
public final R eq(TQProperty<?> other) {
|
||||
expr().raw(_name + " = " + other.propertyName());
|
||||
return _root;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is equal to if value is non-null and otherwise no expression is added to the query.
|
||||
* <p>
|
||||
@@ -135,6 +146,17 @@ public abstract class PBaseValueEqual<R, T> extends TQPropertyBase<R> {
|
||||
return _root;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is not equal to another property.
|
||||
*
|
||||
* @param other the other property to compare
|
||||
* @return the root query bean instance
|
||||
*/
|
||||
public final R ne(TQProperty<?> other) {
|
||||
expr().raw(_name + " <> " + other.propertyName());
|
||||
return _root;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is in a list of values.
|
||||
*
|
||||
|
||||
@@ -693,6 +693,22 @@ public abstract class TQRootBean<T, R> {
|
||||
return root;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add EXISTS sub-query predicate.
|
||||
*/
|
||||
public R exists(Query<?> subQuery) {
|
||||
query.where().exists(subQuery);
|
||||
return root;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add NOT EXISTS sub-query predicate.
|
||||
*/
|
||||
public R notExists(Query<?> subQuery) {
|
||||
query.where().notExists(subQuery);
|
||||
return root;
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute using "for update" clause which results in the DB locking the record.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user