CloneSet479


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
54230.971compilation_unit
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1541
src/NHibernate/Engine/Query/Sql/NativeSQLQueryCollectionReturn.cs
2451
src/NHibernate/Engine/Query/Sql/NativeSQLQueryJoinReturn.cs
Clone Instance
1
Line Count
54
Source Line
1
Source File
src/NHibernate/Engine/Query/Sql/NativeSQLQueryCollectionReturn.cs

using System;
using System.Collections.Generic;

namespace NHibernate.Engine.Query.Sql
{
        /// <summary> 
        /// Represents a return defined as part of a native sql query which
        /// names a collection role in the form {classname}.{collectionrole}; it
        /// is used in defining a custom sql query for loading an entity's
        /// collection in non-fetching scenarios (i.e., loading the collection
        /// itself as the "root" of the result). 
        /// </summary>
        [Serializable]
        public class NativeSQLQueryCollectionReturn : NativeSQLQueryNonScalarReturn
        {
                private readonly string ownerEntityName;

                private readonly string ownerProperty;

                /// <summary> Construct a native-sql return representing a collection initializer </summary>
                /// <param name="alias">The result alias </param>
                /// <param name="ownerEntityName">
                /// The entity-name of the entity owning the collection to be initialized. 
                /// </param>
                /// <param name="ownerProperty">
                /// The property name (on the owner) which represents
                /// the collection to be initialized.
                /// </param>
                /// <param name="propertyResults">Any user-supplied column->property mappings </param>
                /// <param name="lockMode">The lock mode to apply to the collection. </param>
                public NativeSQLQueryCollectionReturn(string alias, string ownerEntityName, string ownerProperty, IDictionary<string, string[]> propertyResults, LockMode lockMode)
                        : base(alias, propertyResults, lockMode)
                {
                        this.ownerEntityName = ownerEntityName;
                        this.ownerProperty = ownerProperty;
                }

                /// <summary> 
                /// The class owning the collection. 
                /// </summary>
                public string OwnerEntityName
                {
                        get { return ownerEntityName;
                            }
                }

                /// <summary> 
                /// The name of the property representing the collection from the <see cref="OwnerEntityName"/>. 
                /// </summary>
                public string OwnerProperty
                {
                        get { return ownerProperty;
                            }
                }

        }
}


Clone Instance
2
Line Count
45
Source Line
1
Source File
src/NHibernate/Engine/Query/Sql/NativeSQLQueryJoinReturn.cs

using System;
using System.Collections.Generic;

namespace NHibernate.Engine.Query.Sql
{
        /// <summary> 
        /// Represents a return defined as part of a native sql query which
        /// names a fetched role. 
        /// </summary>
        [Serializable]
        public class NativeSQLQueryJoinReturn : NativeSQLQueryNonScalarReturn
        {
                private readonly string ownerAlias;

                private readonly string ownerProperty;

                /// <summary> Construct a return descriptor representing some form of fetch. </summary>
                /// <param name="alias">The result alias </param>
                /// <param name="ownerAlias">The owner's result alias </param>
                /// <param name="ownerProperty">The owner's property representing the thing to be fetched </param>
                /// <param name="propertyResults">Any user-supplied column->property mappings </param>
                /// <param name="lockMode">The lock mode to apply </param>
                public NativeSQLQueryJoinReturn(string alias, string ownerAlias, string ownerProperty, IDictionary<string, string[]> propertyResults, LockMode lockMode)
                        : base(alias, propertyResults, lockMode)
                {
                        this.ownerAlias = ownerAlias;
                        this.ownerProperty = ownerProperty;
                }

                /// <summary> The alias of the owner of this fetched association. </summary>
                public string OwnerAlias
                {
                        get { return ownerAlias;
                            }
                }

                /// <summary> 
                /// Retrieve the property name (relative to the owner) which maps to
                /// the association to be fetched. 
                /// </summary>
                public string OwnerProperty
                {
                        get { return ownerProperty;
                            }
                }

        }
}


Clone AbstractionParameter Count: 3Parameter Bindings

using System;
using System.Collections.Generic;
namespace NHibernate.Engine.Query.Sql
{
   /// <summary> 
   /// Represents a return defined as part of a native sql query which
   /// names a collection role in the form {classname}.{collectionrole}; it
   /// is used in defining a custom sql query for loading an entity's
   /// collection in non-fetching scenarios (i.e., loading the collection
   /// itself as the "root" of the result). 
   /// names a fetched role. 
   /// </summary>
   [Serializable]
   public class [[#variable4b210040]]: NativeSQLQueryNonScalarReturn
   {
      private readonly string [[#variable522a5fa0]];

      private readonly string ownerProperty;

      /// <summary> Construct a native-sql return representing a collection initializer </summary>
      /// <summary> Construct a return descriptor representing some form of fetch. </summary>
      /// <param name="alias">The result alias </param>
      /// <param name="ownerEntityName">
      /// The entity-name of the entity owning the collection to be initialized. 
      /// </param>
      /// <param name="ownerProperty">
      /// The property name (on the owner) which represents
      /// the collection to be initialized.
      /// </param>
      /// <param name="ownerAlias">The owner's result alias </param>
      /// <param name="ownerProperty">The owner's property representing the thing to be fetched </param>
      /// <param name="propertyResults">Any user-supplied column->property mappings </param>
      /// <param name="lockMode">The lock mode to apply to the collection. </param>
      /// <param name="lockMode">The lock mode to apply </param>
      public [[#variable4b210040]](string alias, string [[#variable522a5fa0]], string ownerProperty, IDictionary<string, string[]> propertyResults, LockMode lockMode): base(alias, propertyResults, lockMode)
      {
         this. [[#variable522a5fa0]]= [[#variable522a5fa0]];
         this.ownerProperty = ownerProperty;
      }

      /// <summary> 
      /// The class owning the collection. 
      /// </summary>
      /// <summary> The alias of the owner of this fetched association. </summary>
      public string [[#variable522a5ea0]]
      {
         get
         {
            return [[#variable522a5fa0]];
         }
      }

      /// <summary> 
      /// The name of the property representing the collection from the <see cref="OwnerEntityName"/>. 
      /// Retrieve the property name (relative to the owner) which maps to
      /// the association to be fetched. 
      /// </summary>
      public string OwnerProperty
      {
         get
         {
            return ownerProperty;
         }
      }

   }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#4b210040]]
NativeSQLQueryCollectionReturn 
12[[#4b210040]]
NativeSQLQueryJoinReturn 
21[[#522a5fa0]]
ownerEntityName 
22[[#522a5fa0]]
ownerAlias 
31[[#522a5ea0]]
OwnerEntityName 
32[[#522a5ea0]]
OwnerAlias