CloneSet175


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
44340.980class_member_declarations[6]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
14425
src/NHibernate/Type/BagType.cs
24425
src/NHibernate/Type/ListType.cs
34625
src/NHibernate/Type/SetType.cs
Clone Instance
1
Line Count
44
Source Line
25
Source File
src/NHibernate/Type/BagType.cs

                /// <summary>
                /// Initializes a new instance of a <see cref="BagType"/> class for
                /// a specific role.
                /// </summary>
                /// <param name="role">The role the persistent collection is in.</param>
                /// <param name="propertyRef">The name of the property in the
                /// owner object containing the collection ID, or <see langword="null" /> if it is
                /// the primary key.</param>
                /// <param name="isEmbeddedInXML"></param>
                public BagType(string role, string propertyRef, bool isEmbeddedInXML)
                        : base(role, propertyRef, isEmbeddedInXML)
                {
                }

                /// <summary>
                /// Instantiates a new <see cref="IPersistentCollection"/> for the bag.
                /// </summary>
                /// <param name="session">The current <see cref="ISessionImplementor"/> for the bag.</param>
                /// <param name="persister"></param>
                /// <param name="key"></param>
                /// <returns>A new <see cref="NHibernate.Collection.PersistentBag"/>.</returns>
                public override IPersistentCollection Instantiate(ISessionImplementor session, ICollectionPersister persister, object key)
                {
                        return new PersistentBag(session);
                }

                /// <summary></summary>
                public override System.Type ReturnedClass
                {
                        get { return typeof(ICollection);
                            }
                }

                /// <summary>
                /// Wraps an <see cref="IList"/> in a NHibernate <see cref="PersistentBag"/>.
                /// </summary>
                /// <param name="session">The <see cref="ISessionImplementor"/> for the collection to be a part of.</param>
                /// <param name="collection">The unwrapped <see cref="IList"/>.</param>
                /// <returns>
                /// An <see cref="PersistentBag"/> that wraps the non NHibernate <see cref="IList"/>.
                /// </returns>
                public override IPersistentCollection Wrap(ISessionImplementor session, object collection)
                {
                        return new PersistentBag(session, (ICollection) collection);
                }

                protected override void Add(object collection, object element)
                {
                        ((IList) collection).Add(element);
                }

                protected override void Clear(object collection)
                {
                        ((IList) collection).Clear();
                }



Clone Instance
2
Line Count
44
Source Line
25
Source File
src/NHibernate/Type/ListType.cs

                /// <summary>
                /// Initializes a new instance of a <see cref="ListType"/> class for
                /// a specific role.
                /// </summary>
                /// <param name="role">The role the persistent collection is in.</param>
                /// <param name="propertyRef">The name of the property in the
                /// owner object containing the collection ID, or <see langword="null" /> if it is
                /// the primary key.</param>
                /// <param name="isEmbeddedInXML"></param>
                public ListType(string role, string propertyRef, bool isEmbeddedInXML)
                        : base(role, propertyRef, isEmbeddedInXML)
                {
                }

                /// <summary>
                /// Instantiates a new <see cref="IPersistentCollection"/> for the bag.
                /// </summary>
                /// <param name="session">The current <see cref="ISessionImplementor"/> for the bag.</param>
                /// <param name="persister"></param>
                /// <param name="key"></param>
                /// <returns>A new <see cref="NHibernate.Collection.PersistentList"/>.</returns>
                public override IPersistentCollection Instantiate(ISessionImplementor session, ICollectionPersister persister, object key)
                {
                        return new PersistentList(session);
                }

                /// <summary></summary>
                public override System.Type ReturnedClass
                {
                        get { return typeof(IList);
                            }
                }

                /// <summary>
                /// Wraps an exist <see cref="IList"/> in a NHibernate <see cref="PersistentList"/>.
                /// </summary>
                /// <param name="session">The <see cref="ISessionImplementor"/> for the collection to be a part of.</param>
                /// <param name="collection">The unwrapped <see cref="IList"/>.</param>
                /// <returns>
                /// An <see cref="PersistentList"/> that wraps the non NHibernate <see cref="IList"/>.
                /// </returns>
                public override IPersistentCollection Wrap(ISessionImplementor session, object collection)
                {
                        return new PersistentList(session, (IList) collection);
                }

                protected override void Add(object collection, object element)
                {
                        ((IList) collection).Add(element);
                }

                protected override void Clear(object collection)
                {
                        ((IList) collection).Clear();
                }



Clone Instance
3
Line Count
46
Source Line
25
Source File
src/NHibernate/Type/SetType.cs

                /// <summary>
                /// Initializes a new instance of a <see cref="SetType"/> class for
                /// a specific role.
                /// </summary>
                /// <param name="role">The role the persistent collection is in.</param>
                /// <param name="propertyRef">The name of the property in the
                /// owner object containing the collection ID, or <see langword="null" /> if it is
                /// the primary key.</param>
                /// <param name="isEmbeddedInXML"></param>
                public SetType(string role, string propertyRef, bool isEmbeddedInXML)
                        : base(role, propertyRef, isEmbeddedInXML)
                {
                }

                /// <summary>
                /// Instantiates a new <see cref="IPersistentCollection"/> for the set.
                /// </summary>
                /// <param name="session">The current <see cref="ISessionImplementor"/> for the set.</param>
                /// <param name="persister"></param>
                /// <param name="key"></param>
                /// <returns></returns>
                public override IPersistentCollection Instantiate(ISessionImplementor session, ICollectionPersister persister, object key)
                {
                        return new PersistentSet(session);
                }

                /// <summary>
                /// <see cref="AbstractType.ReturnedClass"/>
                /// </summary>
                public override System.Type ReturnedClass
                {
                        get { return typeof(ISet);
                            }
                }

                /// <summary>
                /// Wraps an <see cref="Iesi.Collections.ISet"/> in a <see cref="PersistentSet"/>.
                /// </summary>
                /// <param name="session">The <see cref="ISessionImplementor"/> for the collection to be a part of.</param>
                /// <param name="collection">The unwrapped <see cref="Iesi.Collections.ISet"/>.</param>
                /// <returns>
                /// An <see cref="PersistentSet"/> that wraps the non NHibernate <see cref="Iesi.Collections.ISet"/>.
                /// </returns>
                public override IPersistentCollection Wrap(ISessionImplementor session, object collection)
                {
                        return new PersistentSet(session, (ISet) collection);
                }

                protected override void Add(object collection, object element)
                {
                        ((ISet) collection).Add(element);
                }

                protected override void Clear(object collection)
                {
                        ((ISet) collection).Clear();
                }



Clone AbstractionParameter Count: 4Parameter Bindings

/// <summary>
/// Initializes a new instance of a <see cref="BagType"/> class for
/// Initializes a new instance of a <see cref="SetType"/> class for
/// Initializes a new instance of a <see cref="ListType"/> class for
/// a specific role.
/// </summary>
/// <param name="role">The role the persistent collection is in.</param>
/// <param name="propertyRef">The name of the property in the
/// owner object containing the collection ID, or <see langword="null" /> if it is
/// the primary key.</param>
/// <param name="isEmbeddedInXML"></param>
public [[#variable4f1ff540]](string role, string propertyRef, bool isEmbeddedInXML): base(role, propertyRef, isEmbeddedInXML)
{
}

/// <summary>
/// Instantiates a new <see cref="IPersistentCollection"/> for the bag.
/// Instantiates a new <see cref="IPersistentCollection"/> for the set.
/// </summary>
/// <param name="session">The current <see cref="ISessionImplementor"/> for the bag.</param>
/// <param name="session">The current <see cref="ISessionImplementor"/> for the set.</param>
/// <param name="persister"></param>
/// <param name="key"></param>
/// <returns>A new <see cref="NHibernate.Collection.PersistentBag"/>.</returns>
/// <returns></returns>
/// <returns>A new <see cref="NHibernate.Collection.PersistentList"/>.</returns>
public override IPersistentCollection Instantiate(ISessionImplementor session, ICollectionPersister persister, object key)
{
   return new [[#variable6feefb80]](session);
}

/// <summary></summary>
/// <summary>
/// <see cref="AbstractType.ReturnedClass"/>
/// </summary>
public override System.Type ReturnedClass
{
   get
   {
      return typeof( [[#variable6feefba0]]);
   }
}

/// <summary>
/// Wraps an <see cref="IList"/> in a NHibernate <see cref="PersistentBag"/>.
/// Wraps an <see cref="Iesi.Collections.ISet"/> in a <see cref="PersistentSet"/>.
/// Wraps an exist <see cref="IList"/> in a NHibernate <see cref="PersistentList"/>.
/// </summary>
/// <param name="session">The <see cref="ISessionImplementor"/> for the collection to be a part of.</param>
/// <param name="collection">The unwrapped <see cref="IList"/>.</param>
/// <param name="collection">The unwrapped <see cref="Iesi.Collections.ISet"/>.</param>
/// <returns>
/// An <see cref="PersistentBag"/> that wraps the non NHibernate <see cref="IList"/>.
/// An <see cref="PersistentSet"/> that wraps the non NHibernate <see cref="Iesi.Collections.ISet"/>.
/// An <see cref="PersistentList"/> that wraps the non NHibernate <see cref="IList"/>.
/// </returns>
public override IPersistentCollection Wrap(ISessionImplementor session, object collection)
{
   return new [[#variable6feefb80]](session, ( [[#variable6feefba0]])collection);
}

protected override void Add(object collection, object element)
{
   (( [[#variable6feefa60]])collection).Add(element);
}

protected override void Clear(object collection)
{
   (( [[#variable6feefa60]])collection).Clear();
}

 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#4f1ff540]]
BagType 
12[[#4f1ff540]]
SetType 
13[[#4f1ff540]]
ListType 
21[[#6feefb80]]
PersistentBag 
22[[#6feefb80]]
PersistentSet 
23[[#6feefb80]]
PersistentList 
31[[#6feefba0]]
ICollection 
32[[#6feefba0]]
ISet 
33[[#6feefba0]]
IList 
41[[#6feefa60]]
IList 
42[[#6feefa60]]
ISet 
43[[#6feefa60]]
IList