public class DetachableAdapter extends Object implements Detachable
Constructor and Description |
---|
DetachableAdapter() |
DetachableAdapter(Detachable detachable) |
Modifier and Type | Method and Description |
---|---|
NumberSubQuery<Long> |
count()
Return the count of matched rows as a sub query
|
BooleanExpression |
exists()
Create an exists(this) expression
|
Detachable |
getDetachable() |
ListSubQuery<Tuple> |
list(Expression<?>... args)
Create a multi row subquery expression for the given projection
|
ListSubQuery<Tuple> |
list(Expression<?> first,
Expression<?> second,
Expression<?>... rest) |
<RT> ListSubQuery<RT> |
list(Expression<RT> projection)
Create a multi row subquery expression for the given projection
|
ListSubQuery<Tuple> |
list(Object... args)
Create a multi row subquery expression for the given projection
|
BooleanExpression |
notExists()
Create an not exists(this) expression
|
protected void |
setDetachable(Detachable detachable) |
<RT extends Comparable<?>> |
unique(ComparableExpression<RT> projection)
Create a single row subquery expression for the given projection
|
<RT extends Comparable<?>> |
unique(DateExpression<RT> projection)
Create a single row subquery expression for the given projection
|
<RT extends Comparable<?>> |
unique(DateTimeExpression<RT> projection)
Create a single row subquery expression for the given projection
|
SimpleSubQuery<Tuple> |
unique(Expression<?>... args)
Create a single row subquery expression for the given projection
|
SimpleSubQuery<Tuple> |
unique(Expression<?> first,
Expression<?> second,
Expression<?>... rest) |
<RT> SimpleSubQuery<RT> |
unique(Expression<RT> projection)
Create a single row subquery expression for the given projection
|
<RT extends Number & Comparable<?>> |
unique(NumberExpression<RT> projection)
Create a single row subquery expression for the given projection
|
SimpleSubQuery<Tuple> |
unique(Object... args)
Create a single row subquery expression for the given projection
|
BooleanSubQuery |
unique(Predicate projection)
Create a single row subquery expression for the given projection
|
StringSubQuery |
unique(StringExpression projection)
Create a single row subquery expression for the given projection
|
<RT extends Comparable<?>> |
unique(TimeExpression<RT> projection)
Create a single row subquery expression for the given projection
|
public DetachableAdapter()
public DetachableAdapter(Detachable detachable)
public NumberSubQuery<Long> count()
Detachable
Usage
query.where(subQuery.from(customer).where(...).count().gt(1))
count
in interface Detachable
public BooleanExpression exists()
Detachable
Usage
query.where(subQuery.from(customer).where(...).exists())
exists
in interface Detachable
public Detachable getDetachable()
public ListSubQuery<Tuple> list(Expression<?> first, Expression<?> second, Expression<?>... rest)
public ListSubQuery<Tuple> list(Expression<?>... args)
Detachable
Usage
subQuery.from(person).list(person.firstName, person.lastName).countDistinct()
list
in interface Detachable
public <RT> ListSubQuery<RT> list(Expression<RT> projection)
Detachable
Usage
customer.name.in(subQuery.from(customer).where(...).list(customer.name))
list
in interface Detachable
RT
- generic type of the Listpublic ListSubQuery<Tuple> list(Object... args)
Detachable
Non expression arguments are converted into constant expressions
Usage
subQuery.from(person).list(person.firstName, "M")
list
in interface Detachable
public BooleanExpression notExists()
Detachable
Usage
query.where(subQuery.from(customer).where(...).notExists())
notExists
in interface Detachable
protected void setDetachable(Detachable detachable)
public <RT extends Comparable<?>> ComparableSubQuery<RT> unique(ComparableExpression<RT> projection)
Detachable
unique
in interface Detachable
Detachable.unique(com.mysema.query.types.Expression)
public <RT extends Comparable<?>> DateSubQuery<RT> unique(DateExpression<RT> projection)
Detachable
unique
in interface Detachable
Detachable.unique(com.mysema.query.types.Expression)
public <RT extends Comparable<?>> DateTimeSubQuery<RT> unique(DateTimeExpression<RT> projection)
Detachable
unique
in interface Detachable
Detachable.unique(com.mysema.query.types.Expression)
public SimpleSubQuery<Tuple> unique(Expression<?> first, Expression<?> second, Expression<?>... rest)
public SimpleSubQuery<Tuple> unique(Expression<?>... args)
Detachable
Usage
subQuery.from(person).unique(person.firstName, person.lastName)
unique
in interface Detachable
public <RT> SimpleSubQuery<RT> unique(Expression<RT> projection)
Detachable
Usage
person.age.eq(subQuery.from(person).unique(person.age.max()))
unique
in interface Detachable
RT
- return typepublic <RT extends Number & Comparable<?>> NumberSubQuery<RT> unique(NumberExpression<RT> projection)
Detachable
unique
in interface Detachable
Detachable.unique(com.mysema.query.types.Expression)
public BooleanSubQuery unique(Predicate projection)
Detachable
unique
in interface Detachable
Detachable.unique(com.mysema.query.types.Expression)
public StringSubQuery unique(StringExpression projection)
Detachable
unique
in interface Detachable
Detachable.unique(com.mysema.query.types.Expression)
public <RT extends Comparable<?>> TimeSubQuery<RT> unique(TimeExpression<RT> projection)
Detachable
unique
in interface Detachable
Detachable.unique(com.mysema.query.types.Expression)
public SimpleSubQuery<Tuple> unique(Object... args)
Detachable
Non expression arguments are converted into constant expressions
Usage
subQuery.from(person).unique(person.firstName, "M")
unique
in interface Detachable
Copyright © 2007–2015 Mysema Ltd. All rights reserved.