public boolean exist ( String name , boolean bankAccount ) { String newName = name ; if ( ! Common . getInstance ( ) . getMainConfig ( ) . getBoolean ( "System.Case-sentitive" ) ) { newName = name . toLowerCase ( ) ; } boolean result ; if ( bankAccount ) { result = bankList . containsKey ( newName ) ; if ( ! result ) { result = Common . getInstance ( ) . getStorageHandler ( ) . getStorageEngine ( ) . accountExist ( newName , bankAccount ) ; } } else { result = accountList . containsKey ( newName ) ; if ( ! result ) { result = Common . getInstance ( ) . getStorageHandler ( ) . getStorageEngine ( ) . accountExist ( newName , bankAccount ) ; } } return result ; }
Check if a account exist in the database .