Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
41 | 2 | 5 | 0.973 | compilation_unit |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 41 | 1 | src/NHibernate/Loader/Collection/BasicCollectionLoader.cs |
2 | 41 | 1 | 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 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); } } } |
| ||||
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); } } } |
| |||
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 Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#583b0420]] | BasicCollectionLoader |
1 | 2 | [[#583b0420]] | OneToManyLoader |
2 | 1 | [[#583b0320]] | collectionPersister |
2 | 2 | [[#583b0320]] | oneToManyPersister |
3 | 1 | [[#55106240]] | protected |
3 | 2 | [[#55106240]] | public |
4 | 1 | [[#6f26fa00]] | BasicCollectionJoinWalker |
4 | 2 | [[#6f26fa00]] | OneToManyJoinWalker |
5 | 1 | [[#551074c0]] | "Static select for collection " |
5 | 2 | [[#551074c0]] | "Static select for one-to-many " |