SetResolvedConstant() public méthode

public SetResolvedConstant ( string text ) : void
text string
Résultat void
		private void SetConstantValue(DotNode node, string text, object value)
		{
			if (log.IsDebugEnabled)
			{
				log.Debug("setConstantValue() " + text + " -> " + value + " " + value.GetType().Name);
			}

			node.ClearChildren();	// Chop off the rest of the tree.

			if (value is string)
			{
				node.Type = HqlSqlWalker.QUOTED_String;
			}
			else if (value is char)
			{
				node.Type = HqlSqlWalker.QUOTED_String;
			}
			else if (value is byte)
			{
				node.Type = HqlSqlWalker.NUM_INT;
			}
			else if (value is short)
			{
				node.Type = HqlSqlWalker.NUM_INT;
			}
			else if (value is int)
			{
				node.Type = HqlSqlWalker.NUM_INT;
			}
			else if (value is long)
			{
				node.Type = HqlSqlWalker.NUM_LONG;
			}
			else if (value is double)
			{
				node.Type = HqlSqlWalker.NUM_DOUBLE;
			}
			else if (value is decimal)
			{
				node.Type = HqlSqlWalker.NUM_DECIMAL;
			}
			else if (value is float)
			{
				node.Type = HqlSqlWalker.NUM_FLOAT;
			}
			else
			{
				node.Type = HqlSqlWalker.CONSTANT;
			}

			IType type;
			try
			{
				type = TypeFactory.HeuristicType(value.GetType().Name);
			}
			catch (MappingException me)
			{
				throw new QueryException(me);
			}

			if (type == null)
			{
				throw new QueryException(LiteralProcessor.ErrorCannotDetermineType + node.Text);
			}
			try
			{
				ILiteralType literalType = (ILiteralType)type;
				NHibernate.Dialect.Dialect dialect = _walker.SessionFactoryHelper.Factory.Dialect;
				node.Text = literalType.ObjectToSQLString(value, dialect);
			}
			catch (Exception e)
			{
				throw new QueryException(LiteralProcessor.ErrorCannotFormatLiteral + node.Text, e);
			}

			node.DataType = type;
			node.SetResolvedConstant(text);
		}
		private static void SetSQLValue(DotNode node, string text, string value)
		{
			if (log.IsDebugEnabled)
			{
				log.Debug("setSQLValue() " + text + " -> " + value);
			}
			node.ClearChildren(); // Chop off the rest of the tree.
			node.Type = HqlSqlWalker.SQL_TOKEN;
			node.Text = value;
			node.SetResolvedConstant(text);
		}