Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
15 | 2 | 3 | 0.983 | class_member_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 15 | 87 | src/NHibernate/SqlCommand/SqlInsertBuilder.cs |
2 | 14 | 108 | src/NHibernate/SqlCommand/SqlUpdateBuilder.cs |
| ||||
public SqlInsertBuilder AddColumns(string[] columnNames, bool[] insertable, IType propertyType) { SqlType[] sqlTypes = propertyType.SqlTypes(factory); for (int i = 0; i < columnNames.Length; i++) { if (insertable == null || insertable[i]) { if (i >= sqlTypes.Length) throw new AssertionFailure("Different columns and it's IType."); columns[columnNames[i]] = sqlTypes[i]; } } return this ; } |
| ||||
/// <summary> /// Adds the Property's updatable columns to the UPDATE sql /// </summary> /// <param name="columnNames">An array of the column names for the Property</param> /// <param name="updateable">An array of updatable column flags. If this array is <c>null</c>, all supplied columns are considered updatable.</param> /// <param name="propertyType">The IType of the property.</param> /// <returns>The SqlUpdateBuilder.</returns> public SqlUpdateBuilder AddColumns(string[] columnNames, bool[] updateable, IType propertyType) { SqlType[] sqlTypes = propertyType.SqlTypes(Mapping); for (int i = 0; i < columnNames.Length; i++) { if (updateable == null || updateable[i]) { if (i >= sqlTypes.Length) throw new AssertionFailure("Different columns and it's IType."); columns[columnNames[i]] = sqlTypes[i]; } } return this ; } |
| |||
/// <summary> /// Adds the Property's updatable columns to the UPDATE sql /// </summary> /// <param name="columnNames">An array of the column names for the Property</param> /// <param name="updateable">An array of updatable column flags. If this array is <c>null</c>, all supplied columns are considered updatable.</param> /// <param name="propertyType">The IType of the property.</param> /// <returns>The SqlUpdateBuilder.</returns> public [[#variable58416ea0]]AddColumns(string[] columnNames, bool[] [[#variable58416e20]], IType propertyType) { SqlType[] sqlTypes = propertyType.SqlTypes( [[#variable58416d80]]); for (int i = 0; i < columnNames.Length; i++) { if ( [[#variable58416e20]]== null || [[#variable58416e20]][i]) { if (i >= sqlTypes.Length) throw new AssertionFailure("Different columns and it's IType."); columns[columnNames[i]] = sqlTypes[i]; } } return this ; } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#58416ea0]] | SqlInsertBuilder |
1 | 2 | [[#58416ea0]] | SqlUpdateBuilder |
2 | 1 | [[#58416e20]] | insertable |
2 | 2 | [[#58416e20]] | updateable |
3 | 1 | [[#58416d80]] | factory |
3 | 2 | [[#58416d80]] | Mapping |