File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java
|
Method name: String generateUpdateString(boolean[], int, Object[], boolean)
|
|
Method name: void delete(Serializable, Object, int, Object, String, SessionImplementor, Object[])
|
Number of AST nodes: 8
|
|
Number of AST nodes: 7
|
|
1 | boolean include = includeInWhere[i] &&↵ | | 1 | boolean[] versionability = getPropertyVersionability();↵
|
| | | 2 | Type[] types = getPropertyTypes();↵
|
| | | 3 | for ( int i = 0; i < entityMetamodel.getPropertySpan(); i++ ) {↵
|
2 | isPropertyOfTable( i, j ) &&↵ | | 4 | if ( isPropertyOfTable( i, j ) &&↵
|
3 | versionability[i];↵ | | 5 | versionability[i]↵
|
4 | if ( include ) {↵ | | 6 | ) {↵
|
5 | // this property belongs to the table, and it is not specifically↵ | | 7 | // this property belongs to the table and it is not specifically↵
|
6 | // excluded from optimistic locking by optimistic-lock="false"↵ | | 8 | // excluded from optimistic locking by optimistic-lock="false"↵
|
7 | String[] propertyColumnNames = getPropertyColumnNames( i );↵ | | 9 | ↵
|
8 | boolean[] propertyNullness = types[i].toColumnNullness( oldFields[i], getFactory() );↵ | | 10 | boolean[] settable = types[i].toColumnNullness( loadedState[i], getFactory() );↵
|
9 | for ( int k=0; k<propertyNullness.length; k++ ) {↵ | | 11 | ↵
|
10 | if ( propertyNullness[k] ) {↵ | | |
|
11 | update.addWhereColumn( propertyColumnNames[k] );↵ | | |
|
12 | }↵ | | |
|
13 | else {↵ | | |
|
14 | update.addWhereColumn( propertyColumnNames[k], " is null"↵ | | 12 | types[i].nullSafeSet( delete, loadedState[i], index, settable, session );↵
|
15 | );↵ | | 13 | index += ArrayHelper.countTrue( settable );↵
|
16 | }↵ | | 14 | }↵
|
17 | }↵ | | 15 | }
|
18 | } | | | |