Module org.tentackle.persistence
Package org.tentackle.persist
Class JoinedSelect<T extends PersistentDomainObject<T>>
java.lang.Object
org.tentackle.persist.JoinedSelect<T>
- Type Parameters:
T- the primary PDO type
A joined select.
- Author:
- harald
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a joined select.JoinedSelect(List<Join<? super T, ?>> joins) Creates a joined select from a list of joins. -
Method Summary
Modifier and TypeMethodDescriptionAdds a join.voidcreateJoinedSql(T pdo, StringBuilder selectSql) Creates the SQL-code that does the joined select.Gets the currentl retrieved PDO.getJoins()Gets the joins.Gets the PDO retrieved before the current PDO.voidinitialize(List<T> list) Initializes the joined select.Finishes the current pdo and switches to the next.
-
Constructor Details
-
JoinedSelect
public JoinedSelect()Creates a joined select. -
JoinedSelect
Creates a joined select from a list of joins.- Parameters:
joins- the joins
-
-
Method Details
-
addJoin
Adds a join.- Parameters:
join- the join- Returns:
- me (to allow fluent style setup)
-
getJoins
Gets the joins.- Returns:
- the joins
-
createJoinedSql
Creates the SQL-code that does the joined select.- Parameters:
pdo- the pdo proxyselectSql- the unjoined select builder
-
getLastPdo
Gets the PDO retrieved before the current PDO.- Returns:
- the last pdo
-
currentPdo
Gets the currentl retrieved PDO.- Returns:
- the pdo, null if no query running
-
nextPdo
Finishes the current pdo and switches to the next.- Parameters:
pdo- the next pdo- Returns:
- the pdo possibly changed if already in list
-
initialize
Initializes the joined select.- Parameters:
list- the list if select to list
-