Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
13 | 3 | 3 | 0.987 | non_pp_embedded_statement |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 13 | 152 | src/NHibernate.Test/QueryTest/MultiCriteriaFixture.cs |
2 | 13 | 174 | src/NHibernate.Test/QueryTest/MultiCriteriaFixture.cs |
3 | 13 | 454 | src/NHibernate.Test/QueryTest/MultiCriteriaFixture.cs |
| ||||
using (ISession s = sessions.OpenSession()) { ICriteria criteria = s.CreateCriteria( typeof(Item)). Add (Expression.Gt("id", 50)); IMultiCriteria multiCriteria = s.CreateMultiCriteria(). Add (CriteriaTransformer.Clone(criteria).SetFirstResult(10)). Add (CriteriaTransformer.Clone(criteria).SetProjection(Projections.RowCount())); multiCriteria.SetCacheable(true); IList results = multiCriteria.List(); IList items = (IList)results[0]; Assert.AreEqual(2, items.Count); int count = (int)((IList)results[1])[0]; Assert.AreEqual(2L, count); } |
| ||||
using (ISession s = OpenSession()) { ICriteria criteria = s.CreateCriteria( typeof(Item)). Add (Expression.Gt("id", 50)); IMultiCriteria multiCriteria = s.CreateMultiCriteria(). Add (CriteriaTransformer.Clone(criteria).SetFirstResult(10)). Add (CriteriaTransformer.Clone(criteria).SetProjection(Projections.RowCount())); multiCriteria.SetCacheable(true); IList results = multiCriteria.List(); IList items = (IList)results[0]; Assert.AreEqual(89, items.Count); int count = (int)((IList)results[1])[0]; Assert.AreEqual(99L, count); } |
| ||||
using (ISession s = OpenSession()) { ICriteria criteria = s.CreateCriteria( typeof(Item)). Add (Expression.Gt("id", 50)); IMultiCriteria multiCriteria = s.CreateMultiCriteria(). Add (CriteriaTransformer.Clone(criteria).SetFirstResult(10)). Add (CriteriaTransformer.Clone(criteria).SetProjection(Projections.RowCount())); multiCriteria.SetCacheable(true); IList results = multiCriteria.List(); IList items = (IList)results[0]; Assert.AreEqual(89, items.Count); int count = (int)((IList)results[1])[0]; Assert.AreEqual(99L, count); } |
| |||
using (ISession s = [[#variable553b1400]]()) { ICriteria criteria = s.CreateCriteria( typeof(Item)).Add(Expression.Gt("id", 50)); IMultiCriteria multiCriteria = s.CreateMultiCriteria().Add(CriteriaTransformer.Clone(criteria).SetFirstResult(10)).Add(CriteriaTransformer.Clone(criteria).SetProjection(Projections.RowCount())); multiCriteria.SetCacheable(true); IList results = multiCriteria.List(); IList items = (IList)results[0]; Assert.AreEqual( [[#variable553b1340]], items.Count); int count = (int)((IList)results[1])[0]; Assert.AreEqual( [[#variable553b12a0]], count); } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#553b1400]] | OpenSession |
1 | 2 | [[#553b1400]] | sessions.OpenSession |
1 | 3 | [[#553b1400]] | OpenSession |
2 | 1 | [[#553b1340]] | 89 |
2 | 2 | [[#553b1340]] | 2 |
2 | 3 | [[#553b1340]] | 89 |
3 | 1 | [[#553b12a0]] | 99L |
3 | 2 | [[#553b12a0]] | 2L |
3 | 3 | [[#553b12a0]] | 99L |