Class GlobSqlFunction
java.lang.Object
ch.tocco.nice2.persist.core.impl.hibernate.dialect.GlobSqlFunction
- All Implemented Interfaces:
org.hibernate.dialect.function.SQLFunction
Implements the functionality of the 'glob' user type.
Replaces the '*' and '?' chars with '%' and '_' in the like pattern.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.hibernate.type.Type
getReturnType
(org.hibernate.type.Type firstArgumentType, org.hibernate.engine.spi.Mapping mapping) boolean
boolean
render
(org.hibernate.type.Type firstArgumentType, List arguments, org.hibernate.engine.spi.SessionFactoryImplementor factory)
-
Constructor Details
-
GlobSqlFunction
public GlobSqlFunction()
-
-
Method Details
-
hasArguments
public boolean hasArguments()- Specified by:
hasArguments
in interfaceorg.hibernate.dialect.function.SQLFunction
-
hasParenthesesIfNoArguments
public boolean hasParenthesesIfNoArguments()- Specified by:
hasParenthesesIfNoArguments
in interfaceorg.hibernate.dialect.function.SQLFunction
-
getReturnType
public org.hibernate.type.Type getReturnType(org.hibernate.type.Type firstArgumentType, org.hibernate.engine.spi.Mapping mapping) throws org.hibernate.QueryException - Specified by:
getReturnType
in interfaceorg.hibernate.dialect.function.SQLFunction
- Throws:
org.hibernate.QueryException
-
render
public String render(org.hibernate.type.Type firstArgumentType, List arguments, org.hibernate.engine.spi.SessionFactoryImplementor factory) throws org.hibernate.QueryException - Specified by:
render
in interfaceorg.hibernate.dialect.function.SQLFunction
- Throws:
org.hibernate.QueryException
-