From: Kevin W. <kev...@us...> - 2004-12-31 17:53:04
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Expression In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22387 Modified Files: Expression.cs GeExpression.cs GtExpression.cs InExpression.cs Log Message: fixing xml comments and letting ReSharper do reformatting Index: GeExpression.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Expression/GeExpression.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** GeExpression.cs 28 Mar 2004 06:05:09 -0000 1.3 --- GeExpression.cs 31 Dec 2004 17:52:39 -0000 1.4 *************** *** 1,18 **** ! using System; ! ! namespace NHibernate.Expression { ! ! public class GeExpression : SimpleExpression { ! ! internal GeExpression(string propertyName, object value) : base (propertyName, value) { } ! protected override string Op { get { return " >= "; } } } ! } --- 1,21 ---- ! namespace NHibernate.Expression { ! /// <summary></summary> ! public class GeExpression : SimpleExpression { ! /// <summary> ! /// ! /// </summary> ! /// <param name="propertyName"></param> ! /// <param name="value"></param> ! internal GeExpression( string propertyName, object value ) : base( propertyName, value ) { } ! /// <summary></summary> ! protected override string Op { get { return " >= "; } } } ! } \ No newline at end of file Index: GtExpression.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Expression/GtExpression.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** GtExpression.cs 28 Mar 2004 06:05:09 -0000 1.3 --- GtExpression.cs 31 Dec 2004 17:52:39 -0000 1.4 *************** *** 1,18 **** ! using System; ! ! namespace NHibernate.Expression { ! ! public class GtExpression : SimpleExpression { ! ! internal GtExpression(string propertyName, object value) : base (propertyName, value) { } ! protected override string Op { get { return " > "; } } } ! } --- 1,21 ---- ! namespace NHibernate.Expression { ! /// <summary></summary> ! public class GtExpression : SimpleExpression { ! /// <summary> ! /// ! /// </summary> ! /// <param name="propertyName"></param> ! /// <param name="value"></param> ! internal GtExpression( string propertyName, object value ) : base( propertyName, value ) { } ! /// <summary></summary> ! protected override string Op { get { return " > "; } } } ! } \ No newline at end of file Index: Expression.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Expression/Expression.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Expression.cs 17 Sep 2004 12:25:53 -0000 1.11 --- Expression.cs 31 Dec 2004 17:52:39 -0000 1.12 *************** *** 1,5 **** using System; using System.Collections; - using NHibernate.Engine; using NHibernate.Persister; --- 1,4 ---- *************** *** 7,13 **** using NHibernate.Type; ! namespace NHibernate.Expression { - /// <summary> /// An object-oriented representation of expressions that may be used as constraints --- 6,11 ---- using NHibernate.Type; ! namespace NHibernate.Expression { /// <summary> /// An object-oriented representation of expressions that may be used as constraints *************** *** 20,28 **** /// the static accessors on this class. /// </remarks> ! public abstract class Expression { ! ! private static readonly object[] NoObjects = new object[0]; ! private static readonly IType[] NoTypes = new IType[0]; /// <summary> --- 18,25 ---- /// the static accessors on this class. /// </remarks> ! public abstract class Expression { ! private static readonly object[ ] NoObjects = new object[0]; ! private static readonly IType[ ] NoTypes = new IType[0]; /// <summary> *************** *** 32,38 **** /// <param name="value">The value for the Property.</param> /// <returns>An <see cref="EqExpression" />.</returns> ! public static Expression Eq(string propertyName, object value) { ! return new EqExpression(propertyName, value); } --- 29,35 ---- /// <param name="value">The value for the Property.</param> /// <returns>An <see cref="EqExpression" />.</returns> ! public static Expression Eq( string propertyName, object value ) { ! return new EqExpression( propertyName, value ); } *************** *** 43,49 **** /// <param name="value">The value for the Property.</param> /// <returns>A <see cref="LikeExpression" />.</returns> ! public static Expression Like(string propertyName, object value) { ! return new LikeExpression(propertyName, value); } --- 40,46 ---- /// <param name="value">The value for the Property.</param> /// <returns>A <see cref="LikeExpression" />.</returns> ! public static Expression Like( string propertyName, object value ) { ! return new LikeExpression( propertyName, value ); } *************** *** 54,60 **** /// <param name="value">The value for the Property.</param> /// <returns>An <see cref="InsensitiveLikeExpression" />.</returns> ! public static Expression InsensitiveLike(string propertyName, object value) { ! return new InsensitiveLikeExpression(propertyName, value); } --- 51,57 ---- /// <param name="value">The value for the Property.</param> /// <returns>An <see cref="InsensitiveLikeExpression" />.</returns> ! public static Expression InsensitiveLike( string propertyName, object value ) { ! return new InsensitiveLikeExpression( propertyName, value ); } *************** *** 65,71 **** /// <param name="value">The value for the Property.</param> /// <returns>A <see cref="GtExpression" />.</returns> ! public static Expression Gt(string propertyName, object value) { ! return new GtExpression(propertyName, value); } --- 62,68 ---- /// <param name="value">The value for the Property.</param> /// <returns>A <see cref="GtExpression" />.</returns> ! public static Expression Gt( string propertyName, object value ) { ! return new GtExpression( propertyName, value ); } *************** *** 76,82 **** /// <param name="value">The value for the Property.</param> /// <returns>A <see cref="LtExpression" />.</returns> ! public static Expression Lt(string propertyName, object value) { ! return new LtExpression(propertyName, value); } --- 73,79 ---- /// <param name="value">The value for the Property.</param> /// <returns>A <see cref="LtExpression" />.</returns> ! public static Expression Lt( string propertyName, object value ) { ! return new LtExpression( propertyName, value ); } *************** *** 87,93 **** /// <param name="value">The value for the Property.</param> /// <returns>A <see cref="LeExpression" />.</returns> ! public static Expression Le(string propertyName, object value) { ! return new LeExpression(propertyName, value); } --- 84,90 ---- /// <param name="value">The value for the Property.</param> /// <returns>A <see cref="LeExpression" />.</returns> ! public static Expression Le( string propertyName, object value ) { ! return new LeExpression( propertyName, value ); } *************** *** 98,104 **** /// <param name="value">The value for the Property.</param> /// <returns>A <see cref="GtExpression" />.</returns> ! public static Expression Ge(string propertyName, object value) { ! return new GeExpression(propertyName, value); } --- 95,101 ---- /// <param name="value">The value for the Property.</param> /// <returns>A <see cref="GtExpression" />.</returns> ! public static Expression Ge( string propertyName, object value ) { ! return new GeExpression( propertyName, value ); } *************** *** 110,118 **** /// <param name="hi">The high value for the Property.</param> /// <returns>A <see cref="BetweenExpression" />.</returns> ! public static Expression Between(string propertyName, object lo, object hi) ! { ! return new BetweenExpression(propertyName, lo, hi); ! } ! /// <summary> /// Apply an "in" constraint to the named property --- 107,115 ---- /// <param name="hi">The high value for the Property.</param> /// <returns>A <see cref="BetweenExpression" />.</returns> ! public static Expression Between( string propertyName, object lo, object hi ) ! { ! return new BetweenExpression( propertyName, lo, hi ); ! } ! /// <summary> /// Apply an "in" constraint to the named property *************** *** 121,129 **** /// <param name="values">An array of values.</param> /// <returns>An <see cref="InExpression" />.</returns> ! public static Expression In(string propertyName, object[] values) ! { ! return new InExpression(propertyName, values); ! } ! /// <summary> /// Apply an "in" constraint to the named property --- 118,126 ---- /// <param name="values">An array of values.</param> /// <returns>An <see cref="InExpression" />.</returns> ! public static Expression In( string propertyName, object[ ] values ) ! { ! return new InExpression( propertyName, values ); ! } ! /// <summary> /// Apply an "in" constraint to the named property *************** *** 132,141 **** /// <param name="values">An ICollection of values.</param> /// <returns>An <see cref="InExpression" />.</returns> ! public static Expression In(string propertyName, ICollection values) ! { ! ArrayList ary = new ArrayList(values); //HACK return new InExpression( propertyName, ary.ToArray() ); ! } ! /// <summary> /// Apply an "is null" constraint to the named property --- 129,138 ---- /// <param name="values">An ICollection of values.</param> /// <returns>An <see cref="InExpression" />.</returns> ! public static Expression In( string propertyName, ICollection values ) ! { ! ArrayList ary = new ArrayList( values ); //HACK return new InExpression( propertyName, ary.ToArray() ); ! } ! /// <summary> /// Apply an "is null" constraint to the named property *************** *** 143,151 **** /// <param name="propertyName">The name of the Property in the class.</param> /// <returns>A <see cref="NullExpression" />.</returns> ! public static Expression IsNull(string propertyName) ! { ! return new NullExpression(propertyName); ! } ! /// <summary> /// Apply an "is not null" constraint to the named property --- 140,148 ---- /// <param name="propertyName">The name of the Property in the class.</param> /// <returns>A <see cref="NullExpression" />.</returns> ! public static Expression IsNull( string propertyName ) ! { ! return new NullExpression( propertyName ); ! } ! /// <summary> /// Apply an "is not null" constraint to the named property *************** *** 153,162 **** /// <param name="propertyName">The name of the Property in the class.</param> /// <returns>A <see cref="NotNullExpression" />.</returns> ! public static Expression IsNotNull(string propertyName) ! { ! return new NotNullExpression(propertyName); } ! /// <summary> /// Apply an "equal" constraint to two properties --- 150,159 ---- /// <param name="propertyName">The name of the Property in the class.</param> /// <returns>A <see cref="NotNullExpression" />.</returns> ! public static Expression IsNotNull( string propertyName ) ! { ! return new NotNullExpression( propertyName ); } ! /// <summary> /// Apply an "equal" constraint to two properties *************** *** 165,173 **** /// <param name="otherPropertyName">The rhs Property Name</param> /// <returns>A <see cref="EqPropertyExpression"/> .</returns> ! public static Expression EqProperty(String propertyName, String otherPropertyName) { ! return new EqPropertyExpression(propertyName, otherPropertyName); } ! /// <summary> /// Apply a "less than" constraint to two properties --- 162,170 ---- /// <param name="otherPropertyName">The rhs Property Name</param> /// <returns>A <see cref="EqPropertyExpression"/> .</returns> ! public static Expression EqProperty( String propertyName, String otherPropertyName ) { ! return new EqPropertyExpression( propertyName, otherPropertyName ); } ! /// <summary> /// Apply a "less than" constraint to two properties *************** *** 176,184 **** /// <param name="otherPropertyName">The rhs Property Name</param> /// <returns>A <see cref="LtPropertyExpression"/> .</returns> ! public static Expression LtProperty(String propertyName, String otherPropertyName) { ! return new LtPropertyExpression(propertyName, otherPropertyName); } ! /// <summary> /// Apply a "less than or equal" constraint to two properties --- 173,181 ---- /// <param name="otherPropertyName">The rhs Property Name</param> /// <returns>A <see cref="LtPropertyExpression"/> .</returns> ! public static Expression LtProperty( String propertyName, String otherPropertyName ) { ! return new LtPropertyExpression( propertyName, otherPropertyName ); } ! /// <summary> /// Apply a "less than or equal" constraint to two properties *************** *** 187,194 **** /// <param name="otherPropertyName">The rhs Property Name</param> /// <returns>A <see cref="LePropertyExpression"/> .</returns> ! public static Expression LeProperty(String propertyName, String otherPropertyName) { ! return new LePropertyExpression(propertyName, otherPropertyName); } /// <summary> /// Return the conjuction of two expressions --- 184,192 ---- /// <param name="otherPropertyName">The rhs Property Name</param> /// <returns>A <see cref="LePropertyExpression"/> .</returns> ! public static Expression LeProperty( String propertyName, String otherPropertyName ) { ! return new LePropertyExpression( propertyName, otherPropertyName ); } + /// <summary> /// Return the conjuction of two expressions *************** *** 197,203 **** /// <param name="rhs">The Expression to use as the Right Hand Side.</param> /// <returns>An <see cref="AndExpression" />.</returns> ! public static Expression And(Expression lhs, Expression rhs) { ! return new AndExpression(lhs, rhs); } --- 195,201 ---- /// <param name="rhs">The Expression to use as the Right Hand Side.</param> /// <returns>An <see cref="AndExpression" />.</returns> ! public static Expression And( Expression lhs, Expression rhs ) { ! return new AndExpression( lhs, rhs ); } *************** *** 208,214 **** /// <param name="rhs">The Expression to use as the Right Hand Side.</param> /// <returns>An <see cref="OrExpression" />.</returns> ! public static Expression Or(Expression lhs, Expression rhs) { ! return new OrExpression(lhs, rhs); } --- 206,212 ---- /// <param name="rhs">The Expression to use as the Right Hand Side.</param> /// <returns>An <see cref="OrExpression" />.</returns> ! public static Expression Or( Expression lhs, Expression rhs ) { ! return new OrExpression( lhs, rhs ); } *************** *** 218,224 **** /// <param name="expression">The Expression to negate.</param> /// <returns>A <see cref="NotExpression" />.</returns> ! public static Expression Not(Expression expression) { ! return new NotExpression(expression); } --- 216,222 ---- /// <param name="expression">The Expression to negate.</param> /// <returns>A <see cref="NotExpression" />.</returns> ! public static Expression Not( Expression expression ) { ! return new NotExpression( expression ); } *************** *** 230,236 **** /// <param name="types"></param> /// <returns></returns> ! public static Expression Sql(SqlString sql, object[] values, IType[] types) { ! return new SQLExpression(sql, values, types); } --- 228,234 ---- /// <param name="types"></param> /// <returns></returns> ! public static Expression Sql( SqlString sql, object[ ] values, IType[ ] types ) { ! return new SQLExpression( sql, values, types ); } *************** *** 242,248 **** /// <param name="type"></param> /// <returns></returns> ! public static Expression Sql(SqlString sql, object value, IType type) { ! return new SQLExpression(sql, new object[] { value }, new IType[] { type } ); } --- 240,246 ---- /// <param name="type"></param> /// <returns></returns> ! public static Expression Sql( SqlString sql, object value, IType type ) { ! return new SQLExpression( sql, new object[ ] {value}, new IType[ ] {type} ); } *************** *** 252,258 **** /// <param name="sql"></param> /// <returns></returns> ! public static Expression Sql(SqlString sql) { ! return new SQLExpression(sql, NoObjects, NoTypes); } --- 250,256 ---- /// <param name="sql"></param> /// <returns></returns> ! public static Expression Sql( SqlString sql ) { ! return new SQLExpression( sql, NoObjects, NoTypes ); } *************** *** 262,284 **** /// <param name="sql"></param> /// <returns></returns> ! public static Expression Sql(string sql) { ! return new SQLExpression(new SqlString(sql), NoObjects, NoTypes); } ! /// <summary> /// Group expressions together in a single conjunction (A and B and C...) /// </summary> ! public static Conjunction Conjunction() { return new Conjunction(); } ! /// <summary> /// Group expressions together in a single disjunction (A or B or C...) /// </summary> ! public static Disjunction Disjunction() { return new Disjunction(); --- 260,282 ---- /// <param name="sql"></param> /// <returns></returns> ! public static Expression Sql( string sql ) { ! return new SQLExpression( new SqlString( sql ), NoObjects, NoTypes ); } ! /// <summary> /// Group expressions together in a single conjunction (A and B and C...) /// </summary> ! public static Conjunction Conjunction() { return new Conjunction(); } ! /// <summary> /// Group expressions together in a single disjunction (A or B or C...) /// </summary> ! public static Disjunction Disjunction() { return new Disjunction(); *************** *** 291,299 **** /// <param name="propertyNameValues">a dictionary from property names to values</param> /// <returns></returns> ! public static Expression AllEq(IDictionary propertyNameValues) { ! Conjunction conj = Conjunction(); ! foreach ( DictionaryEntry item in propertyNameValues ) { conj.Add( Eq( item.Key.ToString(), item.Value ) ); } --- 289,298 ---- /// <param name="propertyNameValues">a dictionary from property names to values</param> /// <returns></returns> ! public static Expression AllEq( IDictionary propertyNameValues ) ! { Conjunction conj = Conjunction(); ! foreach( DictionaryEntry item in propertyNameValues ) ! { conj.Add( Eq( item.Key.ToString(), item.Value ) ); } *************** *** 309,321 **** /// <param name="alias">The alias to use for the table.</param> /// <returns>A SqlString that contains a valid Sql fragment.</returns> ! public abstract SqlString ToSqlString(ISessionFactoryImplementor factory, System.Type persistentClass, string alias); /// <summary> /// Return typed values for all parameters in the rendered SQL fragment /// </summary> ! /// <param name="factory">The ISessionFactory that contains the mapping for the Type.</param> /// <param name="persistentClass">The Class the Expression is being built for.</param> /// <returns>An array of TypedValues for the Expression.</returns> ! public abstract TypedValue[] GetTypedValues(ISessionFactoryImplementor sessionFactory, System.Type persistentClass); /// <summary> --- 308,320 ---- /// <param name="alias">The alias to use for the table.</param> /// <returns>A SqlString that contains a valid Sql fragment.</returns> ! public abstract SqlString ToSqlString( ISessionFactoryImplementor factory, System.Type persistentClass, string alias ); /// <summary> /// Return typed values for all parameters in the rendered SQL fragment /// </summary> ! /// <param name="sessionFactory">The ISessionFactory that contains the mapping for the Type.</param> /// <param name="persistentClass">The Class the Expression is being built for.</param> /// <returns>An array of TypedValues for the Expression.</returns> ! public abstract TypedValue[ ] GetTypedValues( ISessionFactoryImplementor sessionFactory, System.Type persistentClass ); /// <summary> *************** *** 335,344 **** // I modified it to internal because Order use it. // --- ! internal static string[] GetColumns(ISessionFactoryImplementor sessionFactory, System.Type persistentClass, string property, string alias) { ! return ( (IQueryable) sessionFactory.GetPersister(persistentClass) ).ToColumns(alias, property); } ! protected static TypedValue GetTypedValue(ISessionFactoryImplementor sessionFactory, System.Type persistentClass, string propertyName, object value) { ! return new TypedValue( ( (IQueryable) sessionFactory.GetPersister(persistentClass) ).GetPropertyType(propertyName), value ); } --- 334,361 ---- // I modified it to internal because Order use it. // --- ! /// <summary> ! /// ! /// </summary> ! /// <param name="sessionFactory"></param> ! /// <param name="persistentClass"></param> ! /// <param name="property"></param> ! /// <param name="alias"></param> ! /// <returns></returns> ! internal static string[ ] GetColumns( ISessionFactoryImplementor sessionFactory, System.Type persistentClass, string property, string alias ) ! { ! return ( ( IQueryable ) sessionFactory.GetPersister( persistentClass ) ).ToColumns( alias, property ); } ! /// <summary> ! /// ! /// </summary> ! /// <param name="sessionFactory"></param> ! /// <param name="persistentClass"></param> ! /// <param name="propertyName"></param> ! /// <param name="value"></param> ! /// <returns></returns> ! protected static TypedValue GetTypedValue( ISessionFactoryImplementor sessionFactory, System.Type persistentClass, string propertyName, object value ) ! { ! return new TypedValue( ( ( IQueryable ) sessionFactory.GetPersister( persistentClass ) ).GetPropertyType( propertyName ), value ); } Index: InExpression.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Expression/InExpression.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** InExpression.cs 28 Mar 2004 06:05:09 -0000 1.4 --- InExpression.cs 31 Dec 2004 17:52:39 -0000 1.5 *************** *** 1,5 **** - using System; - using System.Text; - using NHibernate.Engine; using NHibernate.Persister; --- 1,2 ---- *************** *** 8,83 **** using NHibernate.Util; ! namespace NHibernate.Expression { - /// <summary> /// InExpression - should only be used with a Single Value column - no multicolumn properties... /// </summary> ! public class InExpression : Expression { private readonly string propertyName; ! private readonly object[] values; ! ! internal InExpression(string propertyName, object[] values) { this.propertyName = propertyName; this.values = values; } - ! public override SqlString ToSqlString(ISessionFactoryImplementor factory, System.Type persistentClass, string alias) { //TODO: add default capacity SqlStringBuilder sqlBuilder = new SqlStringBuilder(); ! IType propertyType = ((IQueryable)factory.GetPersister(persistentClass)).GetPropertyType(propertyName); ! string[] columnNames = GetColumns(factory, persistentClass, propertyName, alias); ! string[] paramColumnNames = GetColumns(factory, persistentClass, propertyName , null); ! ! if (columnNames.Length!=1) throw new HibernateException("InExpression may only be used with single-column properties"); // each value should have its own parameter ! Parameter[] parameters = new Parameter[values.Length]; ! ! for(int i = 0; i < values.Length; i++) { // we can hardcode 0 because this will only be for a single column ! string paramInColumnNames = paramColumnNames[0] + StringHelper.Underscore + i; ! parameters[i] = Parameter.GenerateParameters(factory, alias, new string[]{paramInColumnNames}, propertyType)[0]; } ! ! sqlBuilder.Add(columnNames[0]) ! .Add(" in ("); ! bool commaNeeded = false; ! foreach(Parameter parameter in parameters) { ! if(commaNeeded) sqlBuilder.Add(StringHelper.CommaSpace); commaNeeded = true; ! sqlBuilder.Add(parameter); } ! sqlBuilder.Add(")"); ! return sqlBuilder.ToSqlString(); } ! ! public override TypedValue[] GetTypedValues(ISessionFactoryImplementor sessionFactory, System.Type persistentClass) { ! TypedValue[] tvs = new TypedValue[ values.Length ]; ! for ( int i=0; i<tvs.Length; i++ ) { ! tvs[i] = GetTypedValue( sessionFactory, persistentClass, propertyName, values[i] ); } return tvs; } ! public override string ToString() { ! return propertyName + " in (" + StringHelper.ToString(values) + ')'; } ! } } \ No newline at end of file --- 5,103 ---- using NHibernate.Util; ! namespace NHibernate.Expression { /// <summary> /// InExpression - should only be used with a Single Value column - no multicolumn properties... /// </summary> ! public class InExpression : Expression { private readonly string propertyName; ! private readonly object[ ] values; ! ! /// <summary> ! /// ! /// </summary> ! /// <param name="propertyName"></param> ! /// <param name="values"></param> ! internal InExpression( string propertyName, object[ ] values ) { this.propertyName = propertyName; this.values = values; } ! /// <summary> ! /// ! /// </summary> ! /// <param name="factory"></param> ! /// <param name="persistentClass"></param> ! /// <param name="alias"></param> ! /// <returns></returns> ! public override SqlString ToSqlString( ISessionFactoryImplementor factory, System.Type persistentClass, string alias ) { //TODO: add default capacity SqlStringBuilder sqlBuilder = new SqlStringBuilder(); ! IType propertyType = ( ( IQueryable ) factory.GetPersister( persistentClass ) ).GetPropertyType( propertyName ); ! string[ ] columnNames = GetColumns( factory, persistentClass, propertyName, alias ); ! string[ ] paramColumnNames = GetColumns( factory, persistentClass, propertyName, null ); ! ! if( columnNames.Length != 1 ) ! { ! throw new HibernateException( "InExpression may only be used with single-column properties" ); ! } // each value should have its own parameter ! Parameter[ ] parameters = new Parameter[values.Length]; ! ! for( int i = 0; i < values.Length; i++ ) { // we can hardcode 0 because this will only be for a single column ! string paramInColumnNames = paramColumnNames[ 0 ] + StringHelper.Underscore + i; ! parameters[ i ] = Parameter.GenerateParameters( factory, alias, new string[ ] {paramInColumnNames}, propertyType )[ 0 ]; } ! ! sqlBuilder.Add( columnNames[ 0 ] ) ! .Add( " in (" ); ! bool commaNeeded = false; ! foreach( Parameter parameter in parameters ) { ! if( commaNeeded ) ! { ! sqlBuilder.Add( StringHelper.CommaSpace ); ! } commaNeeded = true; ! sqlBuilder.Add( parameter ); } ! sqlBuilder.Add( ")" ); ! return sqlBuilder.ToSqlString(); } ! ! /// <summary> ! /// ! /// </summary> ! /// <param name="sessionFactory"></param> ! /// <param name="persistentClass"></param> ! /// <returns></returns> ! public override TypedValue[ ] GetTypedValues( ISessionFactoryImplementor sessionFactory, System.Type persistentClass ) { ! TypedValue[ ] tvs = new TypedValue[values.Length]; ! for( int i = 0; i < tvs.Length; i++ ) { ! tvs[ i ] = GetTypedValue( sessionFactory, persistentClass, propertyName, values[ i ] ); } return tvs; } ! /// <summary></summary> ! public override string ToString() { ! return propertyName + " in (" + StringHelper.ToString( values ) + ')'; } ! } } \ No newline at end of file |