Class JdbcUserDirectory.SelectUserJdbcQueryExecutor<T>
- java.lang.Object
-
- org.ametys.plugins.core.impl.user.directory.JdbcUserDirectory.AbstractJdbcQueryExecutor<T>
-
- org.ametys.plugins.core.impl.user.directory.JdbcUserDirectory.SelectUserJdbcQueryExecutor<T>
-
- Type Parameters:
T
- The type of the queried object
- Enclosing class:
- JdbcUserDirectory
protected class JdbcUserDirectory.SelectUserJdbcQueryExecutor<T> extends JdbcUserDirectory.AbstractJdbcQueryExecutor<T>
Query executor in order to select an user
-
-
Field Summary
Fields Modifier and Type Field Description protected String
_searchColumn
The search columnprotected String
_value
The user login
-
Constructor Summary
Constructors Modifier Constructor Description protected
SelectUserJdbcQueryExecutor(String value)
The constructorprotected
SelectUserJdbcQueryExecutor(String value, String searchColumn)
The constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
getSqlQuery(Connection connection)
Must return the SQL query to executeprotected PreparedStatement
prepareStatement(Connection connection, String sql)
Prepare the statement to execute-
Methods inherited from class org.ametys.plugins.core.impl.user.directory.JdbcUserDirectory.AbstractJdbcQueryExecutor
executeQuery, processResultSet, run, runWithException
-
-
-
-
Field Detail
-
_searchColumn
protected String _searchColumn
The search column
-
-
Constructor Detail
-
SelectUserJdbcQueryExecutor
protected SelectUserJdbcQueryExecutor(String value)
The constructor- Parameters:
value
- The strict value to search for
-
SelectUserJdbcQueryExecutor
protected SelectUserJdbcQueryExecutor(String value, String searchColumn)
The constructor- Parameters:
value
- The strict value to search forsearchColumn
- The name of search column
-
-
Method Detail
-
getSqlQuery
protected String getSqlQuery(Connection connection)
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
protected PreparedStatement prepareStatement(Connection connection, String sql) throws SQLException
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
-
-