/* */
/* 162 */ loadCMPFields(this.metadata);
/* */
/* 165 */ loadCMRFields(this.metadata);
/* */
/* 168 */ JDBCOptimisticLockingMetaData lockMetaData = this.metadata.getOptimisticLocking();
/* 169 */ if ((lockMetaData != null) && (lockMetaData.getLockingField() != null))
/* */ {
/* 171 */ Integer strategy = lockMetaData.getLockingStrategy();
/* 172 */ JDBCCMPFieldMetaData versionMD = lockMetaData.getLockingField();
/* */
/* 174 */ this.versionField = getCMPFieldByName(versionMD.getFieldName());
/* 175 */ boolean hidden = this.versionField == null;
/* 176 */ if (strategy == JDBCOptimisticLockingMetaData.VERSION_COLUMN_STRATEGY)
/* */ {
/* 178 */ if (hidden)
/* 179 */ this.versionField = new JDBCLongVersionFieldBridge(this.manager, versionMD);
/* */ else
/* 181 */ this.versionField = new JDBCLongVersionFieldBridge((JDBCCMP2xFieldBridge)this.versionField);
/* */ }
/* 183 */ else if (strategy == JDBCOptimisticLockingMetaData.TIMESTAMP_COLUMN_STRATEGY)
/* */ {
/* 185 */ if (hidden)
/* 186 */ this.versionField = new JDBCTimestampVersionFieldBridge(this.manager, versionMD);
/* */ else
/* 188 */ this.versionField = new JDBCTimestampVersionFieldBridge((JDBCCMP2xFieldBridge)this.versionField);
/* */ }
/* 190 */ else if (strategy == JDBCOptimisticLockingMetaData.KEYGENERATOR_COLUMN_STRATEGY)
/* */ {
/* 192 */ if (hidden) {
/* 193 */ this.versionField = new JDBCKeyGenVersionFieldBridge(this.manager, versionMD, lockMetaData.getKeyGeneratorFactory());
/* */ }
/* */ else {
/* 196 */ this.versionField = new JDBCKeyGenVersionFieldBridge((JDBCCMP2xFieldBridge)this.versionField, lockMetaData.getKeyGeneratorFactory());
/* */ }
/* */ }
/* */
/* 200 */ if (hidden)
/* 201 */ addCMPField(this.versionField);