public boolean authenticateDevice(String uid,String key) throws DataAccessException {
  DeviceInfo device=getDeviceInfo(uid);
  return device != null && key.equals(device.getKey());
}

public boolean authenticateDevice ( String uid , String key ) throws DataAccessException { DeviceInfo device = getDeviceInfo ( uid ) ; return device != null && key . equals ( device . getKey ( ) ) ; }
authenticates the given uid , key combination . if the password in the item identified by the item name ' uid ' matches the key given then true is returned , false otherwise .
