Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
16 | 5 | 5 | 0.981 | class_member_declarations[3] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 18 | 268 | src/NHibernate/Engine/CascadingAction.cs |
2 | 17 | 292 | src/NHibernate/Engine/CascadingAction.cs |
3 | 16 | 314 | src/NHibernate/Engine/CascadingAction.cs |
4 | 16 | 339 | src/NHibernate/Engine/CascadingAction.cs |
5 | 16 | 397 | src/NHibernate/Engine/CascadingAction.cs |
| ||||
public override void Cascade(IEventSource session, object child, string entityName, object anything, bool isCascadeDeleteEnabled) { if (log.IsDebugEnabled) { log.Debug("cascading to merge: " + entityName); } session.Merge(entityName, child, (IDictionary)anything); } public override IEnumerable GetCascadableChildrenIterator(IEventSource session, CollectionType collectionType, object collection) { // merges don't cascade to uninitialized collections //TODO: perhaps this does need to cascade after all.... return GetLoadedElementsIterator(session, collectionType, collection); } public override bool DeleteOrphans { // orphans should not be deleted during merge?? get { return false; } } |
| ||||
// for deprecated saveOrUpdateCopy() public override void Cascade(IEventSource session, object child, string entityName, object anything, bool isCascadeDeleteEnabled) { if (log.IsDebugEnabled) { log.Debug("cascading to saveOrUpdateCopy: " + entityName); } session.SaveOrUpdateCopy(entityName, child, (IDictionary)anything); } public override IEnumerable GetCascadableChildrenIterator(IEventSource session, CollectionType collectionType, object collection) { // saves / updates don't cascade to uninitialized collections return GetLoadedElementsIterator(session, collectionType, collection); } public override bool DeleteOrphans { // orphans should not be deleted during copy?? get { return false; } } |
| ||||
public override void Cascade(IEventSource session, object child, string entityName, object anything, bool isCascadeDeleteEnabled) { if (log.IsDebugEnabled) { log.Debug("cascading to persist: " + entityName); } session.Persist(entityName, child, (IDictionary)anything); } public override IEnumerable GetCascadableChildrenIterator(IEventSource session, CollectionType collectionType, object collection) { // persists don't cascade to uninitialized collections return GetAllElementsIterator(session, collectionType, collection); } public override bool DeleteOrphans { get { return false; } } |
| ||||
public override void Cascade(IEventSource session, object child, string entityName, object anything, bool isCascadeDeleteEnabled) { if (log.IsDebugEnabled) { log.Debug("cascading to persistOnFlush: " + entityName); } session.PersistOnFlush(entityName, child, (IDictionary)anything); } public override IEnumerable GetCascadableChildrenIterator(IEventSource session, CollectionType collectionType, object collection) { // persists don't cascade to uninitialized collections return GetLoadedElementsIterator(session, collectionType, collection); } public override bool DeleteOrphans { get { return true; } } |
| ||||
public override void Cascade(IEventSource session, object child, string entityName, object anything, bool isCascadeDeleteEnabled) { if (log.IsDebugEnabled) { log.Debug("cascading to replicate: " + entityName); } session.Replicate(entityName, child, (ReplicationMode)anything); } public override IEnumerable GetCascadableChildrenIterator(IEventSource session, CollectionType collectionType, object collection) { // replicate does cascade to uninitialized collections return GetLoadedElementsIterator(session, collectionType, collection); } public override bool DeleteOrphans { get { return false; } } |
| |||
// for deprecated saveOrUpdateCopy() public override void Cascade(IEventSource session, object child, string entityName, object anything, bool isCascadeDeleteEnabled) { if (log.IsDebugEnabled) { log.Debug( [[#variable4dc51d00]]+ entityName); } session. [[#variable55365cc0]](entityName, child, ( [[#variable6bdb9640]])anything); } public override IEnumerable GetCascadableChildrenIterator(IEventSource session, CollectionType collectionType, object collection) { // persists don't cascade to uninitialized collections // merges don't cascade to uninitialized collections //TODO: perhaps this does need to cascade after all.... // saves / updates don't cascade to uninitialized collections // replicate does cascade to uninitialized collections return [[#variable6ff89540]](session, collectionType, collection); } public override bool DeleteOrphans { // orphans should not be deleted during merge?? // orphans should not be deleted during copy?? get { return [[#variable28edc940]]; } } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#4dc51d00]] | "cascading to persistOnFlush: " |
1 | 2 | [[#4dc51d00]] | "cascading to merge: " |
1 | 3 | [[#4dc51d00]] | "cascading to saveOrUpdateCopy: " |
1 | 4 | [[#4dc51d00]] | "cascading to persist: " |
1 | 5 | [[#4dc51d00]] | "cascading to replicate: " |
2 | 1 | [[#55365cc0]] | PersistOnFlush |
2 | 2 | [[#55365cc0]] | Merge |
2 | 3 | [[#55365cc0]] | SaveOrUpdateCopy |
2 | 4 | [[#55365cc0]] | Persist |
2 | 5 | [[#55365cc0]] | Replicate |
3 | 1 | [[#6bdb9640]] | IDictionary |
3 | 2 | [[#6bdb9640]] | IDictionary |
3 | 3 | [[#6bdb9640]] | IDictionary |
3 | 4 | [[#6bdb9640]] | IDictionary |
3 | 5 | [[#6bdb9640]] | ReplicationMode |
4 | 1 | [[#6ff89540]] | GetLoadedElementsIterator |
4 | 2 | [[#6ff89540]] | GetLoadedElementsIterator |
4 | 3 | [[#6ff89540]] | GetLoadedElementsIterator |
4 | 4 | [[#6ff89540]] | GetAllElementsIterator |
4 | 5 | [[#6ff89540]] | GetLoadedElementsIterator |
5 | 1 | [[#28edc940]] | true |
5 | 2 | [[#28edc940]] | false |
5 | 3 | [[#28edc940]] | false |
5 | 4 | [[#28edc940]] | false |
5 | 5 | [[#28edc940]] | false |