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

Public Member Functions

JpaQuery< E > select ()
 
JpaQuery< E > select (String... columns)
 
JpaQuery< E > select (Selection<? extends E > selection)
 
JpaQuery< E > multiselect (Selection<?>... selections)
 
JpaQuery< E > multiselect (List< Selection<?>> selectionList)
 
JpaQuery< E > orderBy (Order... o)
 
JpaQuery< E > orderBy (List o)
 
- 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

 JpaQuery (Class< E > javaClass, JpaCriteria jpaCriteria)
 

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 31 of file JpaQuery.java.

Constructor & Destructor Documentation

◆ JpaQuery()

org.turro.jpa.query.JpaQuery< E >.JpaQuery ( Class< E >  javaClass,
JpaCriteria  jpaCriteria 
)
protected

Definition at line 35 of file JpaQuery.java.

35  {
36  super(javaClass);
37  this.jpaCriteria = jpaCriteria;
38  initQuery();
39  }

Member Function Documentation

◆ multiselect() [1/2]

JpaQuery<E> org.turro.jpa.query.JpaQuery< E >.multiselect ( List< Selection<?>>  selectionList)

Definition at line 71 of file JpaQuery.java.

71  {
72  ((CriteriaQuery<E>) query).multiselect(selectionList);
73  return this;
74  }

◆ multiselect() [2/2]

JpaQuery<E> org.turro.jpa.query.JpaQuery< E >.multiselect ( Selection<?>...  selections)

Definition at line 66 of file JpaQuery.java.

66  {
67  ((CriteriaQuery<E>) query).multiselect(selections);
68  return this;
69  }

◆ orderBy() [1/2]

JpaQuery<E> org.turro.jpa.query.JpaQuery< E >.orderBy ( List  o)

Definition at line 81 of file JpaQuery.java.

81  {
82  ((CriteriaQuery<E>) query).orderBy(o);
83  return this;
84  }

◆ orderBy() [2/2]

JpaQuery<E> org.turro.jpa.query.JpaQuery< E >.orderBy ( Order...  o)

Definition at line 76 of file JpaQuery.java.

76  {
77  ((CriteriaQuery<E>) query).orderBy(o);
78  return this;
79  }

◆ select() [1/3]

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

Definition at line 42 of file JpaQuery.java.

42  {
43  ((CriteriaQuery<E>) query).select(root().root());
44  return this;
45  }
Here is the caller graph for this function:

◆ select() [2/3]

JpaQuery<E> org.turro.jpa.query.JpaQuery< E >.select ( Selection<? extends E >  selection)

Definition at line 61 of file JpaQuery.java.

61  {
62  ((CriteriaQuery<E>) query).select(selection);
63  return this;
64  }

◆ select() [3/3]

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

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

Definition at line 48 of file JpaQuery.java.

48  {
49  Path selection = null;
50  for(int i = 0; i < columns.length; i++) {
51  if(i == 0) {
52  selection = root().get(columns[i]);
53  } else if(selection != null) {
54  selection = selection.get(columns[i]);
55  }
56  }
57  ((CriteriaQuery<E>) query).select(selection);
58  return this;
59  }

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