class OfflineQueryLogic {

  static <T extends ParseObject> boolean hasWriteAccess(ParseUser user, T object) {
    if (user == object) {
      return true;
    }

    ParseACL acl = object.getACL();
    if (acl == null) {
      return true;
    }
    if (acl.getPublicWriteAccess()) {
      return true;
    }
    if (user != null && acl.getWriteAccess(user)) {
      return true;
    }
    // TODO: Implement roles.
    return false;
  }

    OfflineQueryLogic(OfflineStore store);

}