Package org.hibernate.type

Examples of org.hibernate.type.LiteralType


        ? heuristicType
        : Number.class.isAssignableFrom( heuristicType.getReturnedClass() )
            ? heuristicType
            : expectedType;
    try {
      LiteralType literalType = ( LiteralType ) type;
      Dialect dialect = factory.getDialect();
      return literalType.objectToSQLString( constantValue, dialect );
    }
    catch ( Throwable t ) {
      throw new QueryException( QueryTranslator.ERROR_CANNOT_FORMAT_LITERAL + constantExpression, t );
    }
  }
View Full Code Here


    }
    if ( type == null ) {
      throw new QueryException( QueryTranslator.ERROR_CANNOT_DETERMINE_TYPE + node.getText() );
    }
    try {
      LiteralType literalType = ( LiteralType ) type;
      Dialect dialect = walker.getSessionFactoryHelper().getFactory().getDialect();
      //noinspection unchecked
      node.setText( literalType.objectToSQLString( value, dialect ) );
    }
    catch ( Exception e ) {
      throw new QueryException( QueryTranslator.ERROR_CANNOT_FORMAT_LITERAL + node.getText(), e );
    }
    node.setDataType( type );
View Full Code Here

    }
    if ( type == null ) {
      throw new QueryException( QueryTranslator.ERROR_CANNOT_DETERMINE_TYPE + node.getText() );
    }
    try {
      LiteralType literalType = ( LiteralType ) type;
      Dialect dialect = walker.getSessionFactoryHelper().getFactory().getDialect();
      node.setText( literalType.objectToSQLString( value, dialect ) );
    }
    catch ( Exception e ) {
      throw new QueryException( QueryTranslator.ERROR_CANNOT_FORMAT_LITERAL + node.getText(), e );
    }
    node.setDataType( type );
View Full Code Here

    }
    if ( type == null ) {
      throw new QueryException( QueryTranslator.ERROR_CANNOT_DETERMINE_TYPE + node.getText() );
    }
    try {
      LiteralType literalType = ( LiteralType ) type;
      Dialect dialect = walker.getSessionFactoryHelper().getFactory().getDialect();
      node.setText( literalType.objectToSQLString( value, dialect ) );
    }
    catch ( Exception e ) {
      throw new QueryException( QueryTranslator.ERROR_CANNOT_FORMAT_LITERAL + node.getText(), e );
    }
    node.setDataType( type );
View Full Code Here

    }
    if ( type == null ) {
      throw new QueryException( QueryTranslator.ERROR_CANNOT_DETERMINE_TYPE + node.getText() );
    }
    try {
      LiteralType literalType = ( LiteralType ) type;
      Dialect dialect = walker.getSessionFactoryHelper().getFactory().getDialect();
      node.setText( literalType.objectToSQLString( value, dialect ) );
    }
    catch ( Exception e ) {
      throw new QueryException( QueryTranslator.ERROR_CANNOT_FORMAT_LITERAL + node.getText(), e );
    }
    node.setDataType( type );
View Full Code Here

    }
    if ( type == null ) {
      throw new QueryException( QueryTranslator.ERROR_CANNOT_DETERMINE_TYPE + node.getText() );
    }
    try {
      LiteralType literalType = ( LiteralType ) type;
      Dialect dialect = walker.getSessionFactoryHelper().getFactory().getDialect();
      node.setText( literalType.objectToSQLString( value, dialect ) );
    }
    catch ( Exception e ) {
      throw new QueryException( QueryTranslator.ERROR_CANNOT_FORMAT_LITERAL + node.getText(), e );
    }
    node.setDataType( type );
View Full Code Here

    }
    if ( type == null ) {
      throw new QueryException( QueryTranslator.ERROR_CANNOT_DETERMINE_TYPE + node.getText() );
    }
    try {
      LiteralType literalType = ( LiteralType ) type;
      Dialect dialect = walker.getSessionFactoryHelper().getFactory().getDialect();
      node.setText( literalType.objectToSQLString( value, dialect ) );
    }
    catch ( Exception e ) {
      throw new QueryException( QueryTranslator.ERROR_CANNOT_FORMAT_LITERAL + node.getText(), e );
    }
    node.setDataType( type );
View Full Code Here

        ? heuristicType
        : Number.class.isAssignableFrom( heuristicType.getReturnedClass() )
            ? heuristicType
            : expectedType;
    try {
      LiteralType literalType = ( LiteralType ) type;
      Dialect dialect = factory.getDialect();
      return literalType.objectToSQLString( constantValue, dialect );
    }
    catch ( Throwable t ) {
      throw new QueryException( QueryTranslator.ERROR_CANNOT_FORMAT_LITERAL + constantExpression, t );
    }
  }
View Full Code Here

    }
    if ( type == null ) {
      throw new QueryException( QueryTranslator.ERROR_CANNOT_DETERMINE_TYPE + node.getText() );
    }
    try {
      LiteralType literalType = ( LiteralType ) type;
      Dialect dialect = walker.getSessionFactoryHelper().getFactory().getDialect();
      node.setText( literalType.objectToSQLString( value, dialect ) );
    }
    catch ( Exception e ) {
      throw new QueryException( QueryTranslator.ERROR_CANNOT_FORMAT_LITERAL + node.getText(), e );
    }
    node.setDataType( type );
View Full Code Here

    }
    if ( type == null ) {
      throw new QueryException( QueryTranslator.ERROR_CANNOT_DETERMINE_TYPE + node.getText() );
    }
    try {
      LiteralType literalType = ( LiteralType ) type;
      Dialect dialect = walker.getSessionFactoryHelper().getFactory().getDialect();
      node.setText( literalType.objectToSQLString( value, dialect ) );
    }
    catch ( Exception e ) {
      throw new QueryException( QueryTranslator.ERROR_CANNOT_FORMAT_LITERAL + node.getText(), e );
    }
    node.setDataType( type );
View Full Code Here

TOP

Related Classes of org.hibernate.type.LiteralType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.