public boolean registerDevice(String uid,String key,String username) throws DataAccessException {
  DeviceInfo device=getDeviceInfo(uid);
  if (device != null && !username.equals(device.getUsername())) {
    return false;
  }
  storeDevice(uid,key,username);
  return true;
}

public boolean registerDevice ( String uid , String key , String username ) throws DataAccessException { DeviceInfo device = getDeviceInfo ( uid ) ; if ( device != null && ! username . equals ( device . getUsername ( ) ) ) { return false ; } storeDevice ( uid , key , username ) ; return true ; }
attempts to register the uid , key and username combination . returns true if successful , false otherwise .
