org.hibernate.dialect.function
Class StaticPrecisionFspTimestampFunction
java.lang.Object
org.hibernate.dialect.function.NoArgSQLFunction
org.hibernate.dialect.function.StaticPrecisionFspTimestampFunction
- All Implemented Interfaces:
- SQLFunction
public class StaticPrecisionFspTimestampFunction
- extends NoArgSQLFunction
A function that returns a StandardBasicTypes.TIMESTAMP
with static fractional seconds precision (fsp).
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StaticPrecisionFspTimestampFunction
public StaticPrecisionFspTimestampFunction(String name,
boolean hasParenthesesIfNoArguments)
- Constructs a
StandardBasicTypes.TIMESTAMP function using the
default fractional second precision as defined by the database.
- Parameters:
name - The function namehasParenthesesIfNoArguments - Does the function call need parenthesis if there are no arguments?
StaticPrecisionFspTimestampFunction
public StaticPrecisionFspTimestampFunction(String name,
int fsp)
- Constructs a
StandardBasicTypes.TIMESTAMP function using
the specified fractional seconds precision.
- Parameters:
name - The function namefsp - The explicit fractional seconds precision to render
- Throws:
IllegalArgumentException - if fsp < 0.
render
public String render(Type argumentType,
List args,
SessionFactoryImplementor factory)
throws QueryException
- Description copied from interface:
SQLFunction
- Render the function call as SQL fragment.
Note, the 'firstArgumentType' parameter should match the one passed into
SQLFunction.getReturnType(org.hibernate.type.Type, org.hibernate.engine.spi.Mapping)
- Specified by:
render in interface SQLFunction- Overrides:
render in class NoArgSQLFunction
- Parameters:
argumentType - The type of the first argumentargs - The function argumentsfactory - The SessionFactory
- Returns:
- The rendered function call
- Throws:
QueryException - Indicates a problem rendering the
function call.
Copyright © 2001-2015 Red Hat, Inc. All Rights Reserved.