Class JdbcUserDirectory.SelectUsersJdbcQueryExecutor<T>
java.lang.Object
org.ametys.plugins.core.impl.user.directory.JdbcUserDirectory.AbstractJdbcQueryExecutor<T>
org.ametys.plugins.core.impl.user.directory.JdbcUserDirectory.SelectUsersJdbcQueryExecutor<T>
- Type Parameters:
T
- The type of the queried object
- Enclosing class:
- JdbcUserDirectory
protected class JdbcUserDirectory.SelectUsersJdbcQueryExecutor<T>
extends JdbcUserDirectory.AbstractJdbcQueryExecutor<T>
Query executor in order to select users
-
Field Summary
Modifier and TypeFieldDescriptionprotected int
The maximum number of users to selectprotected JdbcUserDirectory.JdbcPredicate
The mandatory predicate to use when querying users by patternprotected int
The offset to start with, first is 0protected String
The pattern to match (none if null)protected String
The pattern to match, extracted from the pattern -
Constructor Summary
ModifierConstructorDescriptionprotected
SelectUsersJdbcQueryExecutor
(String pattern, int length, int offset) The constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected String
getSqlQuery
(Connection connection) Must return the SQL query to executeprotected PreparedStatement
prepareStatement
(Connection connection, String sql) Prepare the statement to executeMethods inherited from class org.ametys.plugins.core.impl.user.directory.JdbcUserDirectory.AbstractJdbcQueryExecutor
executeQuery, processResultSet, run, runWithException
-
Field Details
-
_pattern
The pattern to match (none if null) -
_length
The maximum number of users to select -
_offset
The offset to start with, first is 0 -
_mandatoryPredicate
The mandatory predicate to use when querying users by pattern -
_patternToMatch
The pattern to match, extracted from the pattern
-
-
Constructor Details
-
SelectUsersJdbcQueryExecutor
The constructor- Parameters:
pattern
- The pattern to match (none if null).length
- The maximum number of users to select.offset
- The offset to start with, first is 0.
-
-
Method Details
-
getSqlQuery
Description copied from class:JdbcUserDirectory.AbstractJdbcQueryExecutor
Must return the SQL query to execute- Specified by:
getSqlQuery
in classJdbcUserDirectory.AbstractJdbcQueryExecutor<T>
- Parameters:
connection
- The pool connection- Returns:
- The SQL query
-
prepareStatement
Description copied from class:JdbcUserDirectory.AbstractJdbcQueryExecutor
Prepare the statement to execute- Overrides:
prepareStatement
in classJdbcUserDirectory.AbstractJdbcQueryExecutor<T>
- Parameters:
connection
- The pool connectionsql
- The SQL query- Returns:
- The prepared statement, ready to be executed
- Throws:
SQLException
- If an SQL Exception occurs
-