public boolean unlockIfLocked ( Record record , Object bookmark ) throws DBException { if ( record != null ) { // unlock record BaseApplication app = null ; org . jbundle . model . Task task = null ; if ( record . getRecordOwner ( ) != null ) task = record . getRecordOwner ( ) . getTask ( ) ; if ( task != null ) app = ( BaseApplication ) record . getRecordOwner ( ) . getTask ( ) . getApplication ( ) ; Environment env = null ; if ( app != null ) env = app . getEnvironment ( ) ; else env = Environment . getEnvironment ( null ) ; return env . getLockManager ( ) . unlockThisRecord ( task , record . getDatabaseName ( ) , record . getTableNames ( false ) , bookmark ) ; } return true ; }
Unlock this record if it is locked .