Clean() public method

Marks this object as unchanged (IsDirty=false)
public Clean ( ) : void
return void
Example #1
0
        /// <summary>
        /// Returns a deep copy of this object
        /// </summary>
        /// <returns></returns>
        protected SqlQueryMaker CloneImpl()
        {
            SqlQueryMaker newQuery = new SqlQueryMaker();

            newQuery.QueryType   = QueryType;
            newQuery._TableName  = _TableName;
            newQuery._PrimaryKey = _PrimaryKey;
            newQuery._Select     = _Select;
            newQuery._From       = _From;
            newQuery.GroupBy     = GroupBy;
            newQuery.Having      = Having;
            newQuery.FirstRow    = FirstRow;
            newQuery.TotalRows   = TotalRows;

            if (_orderByClause != null)
            {
                newQuery.OrderBy = OrderBy.Clone();
            }
            if (_whereClause != null)
            {
                newQuery.Where = Where.Clone();
            }
            if (_sqlFieldMap.IsValueCreated)
            {
                newQuery.AddFieldMap(sqlFieldMap);
            }
            if (HasParameters)
            {
                newQuery.AddParameter(ParameterList.Clone());
            }
            newQuery.Clean();
            return(newQuery);
        }
Example #2
0
        /// <summary>
        /// Returns a deep copy of this object
        /// </summary>
        /// <returns></returns>
        protected SqlQueryMaker CloneImpl()
        {
            SqlQueryMaker newQuery = new SqlQueryMaker();

            newQuery.QueryType = QueryType;
            newQuery._TableName = _TableName;
            newQuery._PrimaryKey = _PrimaryKey;
            newQuery._Select = _Select;
            newQuery._From = _From;
            newQuery.GroupBy = GroupBy;
            newQuery.Having = Having;
            newQuery.FirstRow = FirstRow;
            newQuery.TotalRows = TotalRows;

            if (_orderByClause != null)
            {
                newQuery.OrderBy = OrderBy.Clone();
            }
            if (_whereClause != null)
            {
                newQuery.Where = Where.Clone();
            }
            if (_sqlFieldMap.IsValueCreated)
            {
                newQuery.AddFieldMap(sqlFieldMap);
            }
            if (HasParameters)
            {
                newQuery.AddParameter(ParameterList.Clone());
            }
            newQuery.Clean();
            return newQuery;
        }