Examples of LiteralType


Examples of org.eclipse.jst.jsf.common.internal.types.LiteralType

        if (node.jjtGetNumChildren() > 0)
        {
            throw new AssertionError("Literals should be terminal"); //$NON-NLS-1$
        }

        LiteralType type = null;

        final Token  literalToken = node.getFirstToken();

        switch (literalToken.kind)
        {
View Full Code Here

Examples of org.eclipse.jst.jsf.common.internal.types.LiteralType

                    Number firstValue =
                        ((LiteralType)firstArg).coerceToNumber(numberType);
                    Number secondValue =
                        ((LiteralType)secondArg).coerceToNumber(numberType);
                   
                    LiteralType result = null;
                   
                    if (numberType == Double.class)
                    {
                        Double resultValue =
                            doRealOperation((Double)firstValue,
View Full Code Here

Examples of org.hibernate.type.LiteralType

    }
    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

Examples of org.hibernate.type.LiteralType

    this.factory = factory;
  }

  private String resolveToLiteralString(Type type) {
    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

Examples of org.hibernate.type.LiteralType

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

Examples of org.hibernate.type.LiteralType

    }
    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

Examples of org.hibernate.type.LiteralType

    }
    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

Examples of org.hibernate.type.LiteralType

    this.factory = factory;
  }

  private String resolveToLiteralString(Type type) {
    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

Examples of org.hibernate.type.LiteralType

    }
    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

Examples of org.hibernate.type.LiteralType

    this.factory = factory;
  }

  private String resolveToLiteralString(Type type) {
    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
TOP
Copyright © 2018 www.massapi.com. 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.