Top Description Inners Fields Constructors Methods
org.hibernate.hql.internal.ast.util

public Class LiteralProcessor

extends Object
implements HqlSqlTokenTypes
Class Inheritance
All Implemented Interfaces
org.hibernate.hql.internal.antlr.HqlSqlTokenTypes
Imports
java.math.BigDecimal, .BigInteger, java.text.DecimalFormat, org.hibernate.HibernateException, .MappingException, .QueryException, org.hibernate.dialect.Dialect, org.hibernate.hql.internal.antlr.HqlSqlTokenTypes, .SqlTokenTypes, org.hibernate.hql.internal.ast.HqlSqlWalker, .InvalidPathException, org.hibernate.hql.internal.ast.tree.DotNode, .FromClause, .IdentNode, org.hibernate.hql.spi.QueryTranslator, org.hibernate.internal.CoreMessageLogger, org.hibernate.internal.util.ReflectHelper, org.hibernate.persister.entity.Queryable, org.hibernate.sql.InFragment, org.hibernate.type.LiteralType, .Type, org.jboss.logging.Logger, antlr.SemanticException, antlr.collections.AST

A delegate that handles literals and constants for HqlSqlWalker, performing the token replacement functions and classifying literals.
Author
josh

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static interface
public static enum
private static class

Field Summary

Modifier and TypeField and Description
public static final LiteralProcessor.DecimalLiteralFormat
DECIMAL_LITERAL_FORMAT

In what format should Float and Double literal values be sent to the database?

private static final CoreMessageLogger
private HqlSqlWalker

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
private String
public boolean
isAlias(String alias)

public void
public void
processBoolean(AST constant)

public void
processConstant(AST constant, boolean resolveIdent)

private void
processLiteral(AST constant)

public void
processNull(AST constant)

public void
private void
private void
setSQLValue(DotNode node, String text, String value)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DECIMAL_LITERAL_FORMATback to summary
public static final LiteralProcessor.DecimalLiteralFormat DECIMAL_LITERAL_FORMAT

In what format should Float and Double literal values be sent to the database?

LOGback to summary
private static final CoreMessageLogger LOG
walkerback to summary
private HqlSqlWalker walker

Constructor Detail

LiteralProcessorback to summary
public LiteralProcessor(HqlSqlWalker hqlSqlWalker)

Method Detail

determineDecimalRepresentationback to summary
public String determineDecimalRepresentation(String text, int type)
determineIntegerRepresentationback to summary
private String determineIntegerRepresentation(String text, int type)
isAliasback to summary
public boolean isAlias(String alias)
lookupConstantback to summary
public void lookupConstant(DotNode node) throws SemanticException
processBooleanback to summary
public void processBoolean(AST constant)
processConstantback to summary
public void processConstant(AST constant, boolean resolveIdent) throws SemanticException
processLiteralback to summary
private void processLiteral(AST constant)
processNullback to summary
public void processNull(AST constant)
processNumericback to summary
public void processNumeric(AST literal)
setConstantValueback to summary
private void setConstantValue(DotNode node, String text, Object value)
setSQLValueback to summary
private void setSQLValue(DotNode node, String text, String value)
org.hibernate.hql.internal.ast.util back to summary

private Class LiteralProcessor.ApproximateDecimalFormatter

extends Object
implements DecimalFormatter
Class Inheritance
  • java.lang.Object
  • org.hibernate.hql.internal.ast.util.LiteralProcessor.ApproximateDecimalFormatter
All Implemented Interfaces
org.hibernate.hql.internal.ast.util.LiteralProcessor.DecimalFormatter

Field Summary

Modifier and TypeField and Description
private static final String
public static final LiteralProcessor.ApproximateDecimalFormatter

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

FORMAT_STRINGback to summary
private static final String FORMAT_STRING
INSTANCEback to summary
public static final LiteralProcessor.ApproximateDecimalFormatter INSTANCE

Constructor Detail

ApproximateDecimalFormatterback to summary
private ApproximateDecimalFormatter()

Method Detail

formatback to summary
public String format(BigDecimal number)

Implements org.hibernate.hql.internal.ast.util.LiteralProcessor.DecimalFormatter.format.

org.hibernate.hql.internal.ast.util back to summary

private Interface LiteralProcessor.DecimalFormatter

Known Direct Implementers
org.hibernate.hql.internal.ast.util.LiteralProcessor.ExactDecimalFormatter, org.hibernate.hql.internal.ast.util.LiteralProcessor.ApproximateDecimalFormatter

Method Summary

Modifier and TypeMethod and Description
public String

Method Detail

formatback to summary
public String format(BigDecimal number)
org.hibernate.hql.internal.ast.util back to summary

public sealed Enum LiteralProcessor.DecimalLiteralFormat

extends Enum<LiteralProcessor.DecimalLiteralFormat>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final LiteralProcessor.DecimalLiteralFormat
APPROXIMATE

Indicates that Float and Double literal values should be treated using the SQL "approximate" format (i.e., '1E-3')

public static final LiteralProcessor.DecimalLiteralFormat
EXACT

Indicates that Float and Double literal values should be treated using the SQL "exact" format (i.e., '.001')

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public abstract LiteralProcessor.DecimalFormatter
public static LiteralProcessor.DecimalLiteralFormat
public static LiteralProcessor.DecimalLiteralFormat[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

APPROXIMATEback to summary
public static final LiteralProcessor.DecimalLiteralFormat APPROXIMATE

Indicates that Float and Double literal values should be treated using the SQL "approximate" format (i.e., '1E-3')

Annotations
@SuppressWarnings:UnusedDeclaration
EXACTback to summary
public static final LiteralProcessor.DecimalLiteralFormat EXACT

Indicates that Float and Double literal values should be treated using the SQL "exact" format (i.e., '.001')

Constructor Detail

DecimalLiteralFormatback to summary
private DecimalLiteralFormat()

Method Detail

getFormatterback to summary
public abstract LiteralProcessor.DecimalFormatter getFormatter()
valueOfback to summary
public static LiteralProcessor.DecimalLiteralFormat valueOf(String name)
valuesback to summary
public static LiteralProcessor.DecimalLiteralFormat[] values()
org.hibernate.hql.internal.ast.util back to summary

private Class LiteralProcessor.ExactDecimalFormatter

extends Object
implements DecimalFormatter
Class Inheritance
  • java.lang.Object
  • org.hibernate.hql.internal.ast.util.LiteralProcessor.ExactDecimalFormatter
All Implemented Interfaces
org.hibernate.hql.internal.ast.util.LiteralProcessor.DecimalFormatter

Field Summary

Modifier and TypeField and Description
public static final LiteralProcessor.ExactDecimalFormatter

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
public static final LiteralProcessor.ExactDecimalFormatter INSTANCE

Constructor Detail

ExactDecimalFormatterback to summary
private ExactDecimalFormatter()

Method Detail

formatback to summary
public String format(BigDecimal number)

Implements org.hibernate.hql.internal.ast.util.LiteralProcessor.DecimalFormatter.format.