Java Code Examples for org.hibernate.type.StandardBasicTypes#STRING
The following examples show how to use
org.hibernate.type.StandardBasicTypes#STRING .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LiteralNode.java From lams with GNU General Public License v2.0 | 5 votes |
public Type getDataType() { if ( getExpectedType() != null ) { return getExpectedType(); } switch ( getType() ) { case NUM_INT: return StandardBasicTypes.INTEGER; case NUM_FLOAT: return StandardBasicTypes.FLOAT; case NUM_LONG: return StandardBasicTypes.LONG; case NUM_DOUBLE: return StandardBasicTypes.DOUBLE; case NUM_BIG_INTEGER: return StandardBasicTypes.BIG_INTEGER; case NUM_BIG_DECIMAL: return StandardBasicTypes.BIG_DECIMAL; case QUOTED_STRING: return StandardBasicTypes.STRING; case TRUE: case FALSE: return StandardBasicTypes.BOOLEAN; default: return null; } }
Example 2
Source File: TrimFunctionTemplate.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public Type getReturnType(Type firstArgument, Mapping mapping) throws QueryException { return StandardBasicTypes.STRING; }
Example 3
Source File: AnsiTrimEmulationFunction.java From lams with GNU General Public License v2.0 | 4 votes |
/** * Constructs a <tt>trim()</tt> emulation function definition using the specified function calls. * * @param ltrimFunctionName The <tt>left trim</tt> function to use. * @param rtrimFunctionName The <tt>right trim</tt> function to use. * @param replaceFunctionName The <tt>replace</tt> function to use. */ public AnsiTrimEmulationFunction(String ltrimFunctionName, String rtrimFunctionName, String replaceFunctionName) { leadingSpaceTrim = new SQLFunctionTemplate( StandardBasicTypes.STRING, LEADING_SPACE_TRIM_TEMPLATE.replaceAll( LTRIM, ltrimFunctionName ) ); trailingSpaceTrim = new SQLFunctionTemplate( StandardBasicTypes.STRING, TRAILING_SPACE_TRIM_TEMPLATE.replaceAll( RTRIM, rtrimFunctionName ) ); bothSpaceTrim = new SQLFunctionTemplate( StandardBasicTypes.STRING, BOTH_SPACE_TRIM_TEMPLATE.replaceAll( LTRIM, ltrimFunctionName ) .replaceAll( RTRIM, rtrimFunctionName ) ); bothSpaceTrimFrom = new SQLFunctionTemplate( StandardBasicTypes.STRING, BOTH_SPACE_TRIM_FROM_TEMPLATE.replaceAll( LTRIM, ltrimFunctionName ) .replaceAll( RTRIM, rtrimFunctionName ) ); leadingTrim = new SQLFunctionTemplate( StandardBasicTypes.STRING, LEADING_TRIM_TEMPLATE.replaceAll( LTRIM, ltrimFunctionName ) .replaceAll( RTRIM, rtrimFunctionName ) .replaceAll( REPLACE,replaceFunctionName ) ); trailingTrim = new SQLFunctionTemplate( StandardBasicTypes.STRING, TRAILING_TRIM_TEMPLATE.replaceAll( LTRIM, ltrimFunctionName ) .replaceAll( RTRIM, rtrimFunctionName ) .replaceAll( REPLACE,replaceFunctionName ) ); bothTrim = new SQLFunctionTemplate( StandardBasicTypes.STRING, BOTH_TRIM_TEMPLATE.replaceAll( LTRIM, ltrimFunctionName ) .replaceAll( RTRIM, rtrimFunctionName ) .replaceAll( REPLACE,replaceFunctionName ) ); }
Example 4
Source File: DB2SubstringFunction.java From lams with GNU General Public License v2.0 | 4 votes |
public DB2SubstringFunction() { super( "substring", StandardBasicTypes.STRING ); }
Example 5
Source File: ConvertFunction.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public Type getReturnType(Type firstArgumentType, Mapping mapping) throws QueryException { return StandardBasicTypes.STRING; }
Example 6
Source File: AbstractAnsiTrimEmulationFunction.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public final Type getReturnType(Type argumentType, Mapping mapping) throws QueryException { return StandardBasicTypes.STRING; }
Example 7
Source File: AbstractStringColumnMapper.java From jadira with Apache License 2.0 | 4 votes |
@Override public final StringType getHibernateType() { return StandardBasicTypes.STRING; }
Example 8
Source File: DerbyConcatFunction.java From lams with GNU General Public License v2.0 | 2 votes |
/** * {@inheritDoc} * <p/> * Here we always return {@link StandardBasicTypes#STRING}. */ @Override public Type getReturnType(Type argumentType, Mapping mapping) throws QueryException { return StandardBasicTypes.STRING; }