BrightSide Workbench Full Report + Source Code
org.turro.jpa.query.JpaSubquery< E > Class Template Reference
Inheritance diagram for org.turro.jpa.query.JpaSubquery< E >:
Collaboration diagram for org.turro.jpa.query.JpaSubquery< E >:

Public Member Functions

JpaSubquery< E > select ()
 
JpaSubquery< E > select (String... columns)
 
- Public Member Functions inherited from org.turro.jpa.query.AbstractJpaQuery< E >
 AbstractJpaQuery (Class< E > persistentClass)
 
JpaRoot< E > root ()
 
CriteriaQuery< E > query ()
 
AbstractJpaQuery< E > where (Expression< Boolean > restriction)
 
AbstractJpaQuery< E > where (Predicate... restrictions)
 
AbstractJpaQuery< E > groupBy (Expression<?>... grouping)
 
AbstractJpaQuery< E > groupBy (List< Expression<?>> grouping)
 
AbstractJpaQuery< E > having (Expression< Boolean > restriction)
 
AbstractJpaQuery< E > having (Predicate... restrictions)
 
AbstractJpaQuery< E > distinct (boolean distinct)
 

Protected Member Functions

 JpaSubquery (Class< E > javaClass, Subquery subquery)
 

Additional Inherited Members

- Protected Attributes inherited from org.turro.jpa.query.AbstractJpaQuery< E >
final Class< E > persistentClass
 
AbstractQuery< E > query
 
JpaRoot root
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 28 of file JpaSubquery.java.

Constructor & Destructor Documentation

◆ JpaSubquery()

org.turro.jpa.query.JpaSubquery< E >.JpaSubquery ( Class< E >  javaClass,
Subquery  subquery 
)
protected

Definition at line 30 of file JpaSubquery.java.

30  {
31  super(javaClass);
32  query = subquery;
33  }

Member Function Documentation

◆ select() [1/2]

Reimplemented from org.turro.jpa.query.AbstractJpaQuery< E >.

Definition at line 36 of file JpaSubquery.java.

36  {
37  ((Subquery<E>) query).select(root().root());
38  return this;
39  }

◆ select() [2/2]

JpaSubquery<E> org.turro.jpa.query.JpaSubquery< E >.select ( String...  columns)

Reimplemented from org.turro.jpa.query.AbstractJpaQuery< E >.

Definition at line 42 of file JpaSubquery.java.

42  {
43  Path selection = null;
44  for(int i = 0; i < columns.length; i++) {
45  if(i == 0) {
46  selection = root().get(columns[i]);
47  } else if(selection != null) {
48  selection = selection.get(columns[i]);
49  }
50  }
51  ((Subquery<E>) query).select(selection);
52  return this;
53  }

The documentation for this class was generated from the following file: