org.hibernate.type
Interface LiteralType<T>

All Known Subinterfaces:
DiscriminatorType<T>, PrimitiveType<T>
All Known Implementing Classes:
BigIntegerType, BooleanType, ByteType, CharacterType, CharBooleanType, CurrencyType, CustomType, DateType, DbTimestampType, DoubleType, FloatType, IntegerType, LocaleType, LongType, NumericBooleanType, ShortType, StoredPrefixedStringType, StringType, TimestampType, TimeType, TimeZoneType, TrueFalseType, UrlType, UUIDCharType, YesNoType

public interface LiteralType<T>

Additional contract for a Type that may appear as an SQL literal


Method Summary
 String objectToSQLString(T value, Dialect dialect)
          Convert the value into a string representation, suitable for embedding in an SQL statement as a literal.
 

Method Detail

objectToSQLString

String objectToSQLString(T value,
                         Dialect dialect)
                         throws Exception
Convert the value into a string representation, suitable for embedding in an SQL statement as a literal.

Parameters:
value - The value to convert
dialect - The SQL dialect
Returns:
The value's string representation
Throws:
Exception - Indicates an issue converting the value to literal string.


Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.