Package ome.tools.hibernate
Class SqlQueryTransformer
- java.lang.Object
-
- ome.tools.hibernate.SqlQueryTransformer
-
public class SqlQueryTransformer extends java.lang.Object
Rewrite SQL queries to reverse the effects of@ColumnTransformer
annotations inWHERE
clauses.- Since:
- 5.5.6
-
-
Constructor Summary
Constructors Constructor Description SqlQueryTransformer()
Convenience constructor for unit testing so that it need not mock a data source.SqlQueryTransformer(javax.sql.DataSource dataSource)
Construct a SQL query transformer that parses the SQL dialect appropriate for the given data source.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
transformQuery(java.lang.String sql)
Reverse the effects of@ColumnTransformer
annotations inWHERE
clauses.
-
-
-
Constructor Detail
-
SqlQueryTransformer
public SqlQueryTransformer()
Convenience constructor for unit testing so that it need not mock a data source. Not for use in production. May be removed without warning.
-
SqlQueryTransformer
public SqlQueryTransformer(javax.sql.DataSource dataSource) throws org.springframework.jdbc.support.MetaDataAccessException
Construct a SQL query transformer that parses the SQL dialect appropriate for the given data source.- Parameters:
dataSource
- a data source- Throws:
org.springframework.jdbc.support.MetaDataAccessException
- if the metadata about the database could not be accessed from the data source
-
-