CloneSet148


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
41250.973compilation_unit
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1411
src/NHibernate/Loader/Collection/BasicCollectionLoader.cs
2411
src/NHibernate/Loader/Collection/OneToManyLoader.cs
Clone Instance
1
Line Count
41
Source Line
1
Source File
src/NHibernate/Loader/Collection/BasicCollectionLoader.cs

using System.Collections.Generic;
using log4net;
using NHibernate.Engine;
using NHibernate.Persister.Collection;
using NHibernate.SqlCommand;

namespace NHibernate.Loader.Collection
{
        /// <summary> 
        /// Loads a collection of values or a many-to-many association.
        /// </summary>
        /// <remarks>
        /// The collection persister must implement <seealso cref="IQueryableCollection"/>. For
        /// other collections, create a customized subclass of <seealso cref="Loader"/>
        /// </remarks>
        /// <seealso cref="OneToManyLoader"/>
        public class BasicCollectionLoader : CollectionLoader
        {
                private static readonly ILog log = LogManager.GetLogger( typeof( BasicCollectionLoader));

                public BasicCollectionLoader(IQueryableCollection collectionPersister, ISessionFactoryImplementor session,
                                             IDictionary<string, IFilter> enabledFilters)
                        : this(collectionPersister, 1, session, enabledFilters) {
                                                                                }

                public BasicCollectionLoader(IQueryableCollection collectionPersister, int batchSize,
                                             ISessionFactoryImplementor factory, IDictionary<string, IFilter> enabledFilters)
                        : this(collectionPersister, batchSize, null, factory, enabledFilters) {
                                                                                              }

                protected BasicCollectionLoader(IQueryableCollection collectionPersister, int batchSize, SqlString subquery,
                                                ISessionFactoryImplementor factory, IDictionary<string, IFilter> enabledFilters)
                        : base(collectionPersister, factory, enabledFilters)
                {
                        JoinWalker walker = new BasicCollectionJoinWalker(collectionPersister, batchSize, subquery, factory, enabledFilters);
                        InitFromWalker(walker);

                        PostInstantiate();

                        log.Debug("Static select for collection " + collectionPersister.Role + ": " + SqlString);
                }

        }
}


Clone Instance
2
Line Count
41
Source Line
1
Source File
src/NHibernate/Loader/Collection/OneToManyLoader.cs

using System.Collections.Generic;
using log4net;
using NHibernate.Engine;
using NHibernate.Persister.Collection;
using NHibernate.SqlCommand;

namespace NHibernate.Loader.Collection
{
        /// <summary>
        /// Loads one-to-many associations
        /// </summary>
        /// <remarks>
        /// The collection persister must implement <see cref="IQueryableCollection" />.
        /// For other collections, create a customized subclass of <see cref="Loader" />.
        /// </remarks>
        /// <seealso cref="BasicCollectionLoader"/>
        public class OneToManyLoader : CollectionLoader
        {
                private static readonly ILog log = LogManager.GetLogger( typeof( OneToManyLoader));

                public OneToManyLoader(IQueryableCollection oneToManyPersister, ISessionFactoryImplementor session,
                                       IDictionary<string, IFilter> enabledFilters)
                        : this(oneToManyPersister, 1, session, enabledFilters) {
                                                                               }

                public OneToManyLoader(IQueryableCollection oneToManyPersister, int batchSize, ISessionFactoryImplementor factory,
                                       IDictionary<string, IFilter> enabledFilters)
                        : this(oneToManyPersister, batchSize, null, factory, enabledFilters) {
                                                                                             }

                public OneToManyLoader(IQueryableCollection oneToManyPersister, int batchSize, SqlString subquery,
                                       ISessionFactoryImplementor factory, IDictionary<string, IFilter> enabledFilters)
                        : base(oneToManyPersister, factory, enabledFilters)
                {
                        JoinWalker walker = new OneToManyJoinWalker(oneToManyPersister, batchSize, subquery, factory, enabledFilters);
                        InitFromWalker(walker);

                        PostInstantiate();

                        log.Debug("Static select for one-to-many " + oneToManyPersister.Role + ": " + SqlString);
                }

        }
}


Clone AbstractionParameter Count: 5Parameter Bindings

using System.Collections.Generic;
using log4net;
using NHibernate.Engine;
using NHibernate.Persister.Collection;
using NHibernate.SqlCommand;
namespace NHibernate.Loader.Collection
{
   /// <summary> 
   /// Loads a collection of values or a many-to-many association.
   /// <summary>
   /// Loads one-to-many associations
   /// </summary>
   /// <remarks>
   /// The collection persister must implement <seealso cref="IQueryableCollection"/>. For
   /// other collections, create a customized subclass of <seealso cref="Loader"/>
   /// The collection persister must implement <see cref="IQueryableCollection" />.
   /// For other collections, create a customized subclass of <see cref="Loader" />.
   /// </remarks>
   /// <seealso cref="OneToManyLoader"/>
   /// <seealso cref="BasicCollectionLoader"/>
   public class [[#variable583b0420]]: CollectionLoader
   {
      private static readonly ILog log = LogManager.GetLogger( typeof( [[#variable583b0420]]));

      public [[#variable583b0420]](IQueryableCollection [[#variable583b0320]], ISessionFactoryImplementor session, IDictionary<string, IFilter> enabledFilters): this( [[#variable583b0320]], 1, session, enabledFilters)
      {
      }

      public [[#variable583b0420]](IQueryableCollection [[#variable583b0320]], int batchSize, ISessionFactoryImplementor factory, IDictionary<string, IFilter> enabledFilters): this( [[#variable583b0320]], batchSize, null, factory, enabledFilters)
      {
      }

       [[#variable55106240]] [[#variable583b0420]](IQueryableCollection [[#variable583b0320]], int batchSize, SqlString subquery, ISessionFactoryImplementor factory, IDictionary<string, IFilter> enabledFilters): base( [[#variable583b0320]], factory, enabledFilters)
      {
         JoinWalker walker = new [[#variable6f26fa00]]( [[#variable583b0320]], batchSize, subquery, factory, enabledFilters);
         InitFromWalker(walker);
         PostInstantiate();
         log.Debug( [[#variable551074c0]]+ [[#variable583b0320]].Role + ": " + SqlString);
      }

   }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#583b0420]]
BasicCollectionLoader 
12[[#583b0420]]
OneToManyLoader 
21[[#583b0320]]
collectionPersister 
22[[#583b0320]]
oneToManyPersister 
31[[#55106240]]
protected 
32[[#55106240]]
public 
41[[#6f26fa00]]
BasicCollectionJoinWalker 
42[[#6f26fa00]]
OneToManyJoinWalker 
51[[#551074c0]]
"Static select for collection " 
52[[#551074c0]]
"Static select for one-to-many "