private void checkLocking ( FieldDescriptorDef fieldDef , String checkLevel ) throws ConstraintException { if ( CHECKLEVEL_NONE . equals ( checkLevel ) ) { return ; } String jdbcType = fieldDef . getProperty ( PropertyHelper . OJB_PROPERTY_JDBC_TYPE ) ; if ( ! "TIMESTAMP" . equals ( jdbcType ) && ! "INTEGER" . equals ( jdbcType ) ) { if ( fieldDef . getBooleanProperty ( PropertyHelper . OJB_PROPERTY_LOCKING , false ) ) { throw new ConstraintException ( "The field " + fieldDef . getName ( ) + " in class " + fieldDef . getOwner ( ) . getName ( ) + " has locking set to true though it is not of TIMESTAMP or INTEGER type" ) ; } if ( fieldDef . getBooleanProperty ( PropertyHelper . OJB_PROPERTY_UPDATE_LOCK , false ) ) { throw new ConstraintException ( "The field " + fieldDef . getName ( ) + " in class " + fieldDef . getOwner ( ) . getName ( ) + " has update-lock set to true though it is not of TIMESTAMP or INTEGER type" ) ; } } }
Checks that locking and update - lock are only used for fields of TIMESTAMP or INTEGER type .