/** * @return {@code true} if this user was created with {@link #getCurrentUser()} when no current * user previously existed and {@link #enableAutomaticUser()} is set, false if was created by any * other means or if a previously "lazy" user was saved remotely. *//* package */boolean isLazy() {
synchronized (mutex) {
returngetObjectId() == null && ParseAnonymousUtils.isLinked(this);
}
}

/** * Get whether the given user id is *explicitly* allowed to read this object. Even if this returns * {@code false}, the user may still be able to access it if getPublicReadAccess returns * {@code true} or a role that the user belongs to has read access. */publicboolean getReadAccess(ParseUser user) {
if (isUnresolvedUser(user)) {
return getReadAccess(UNRESOLVED_KEY);
}
if (user.isLazy()) {
returnfalse;
}
if (user.getObjectId() == null) {
thrownew IllegalArgumentException("cannot getReadAccess for a user with null id");
}
return getReadAccess(user.getObjectId());
}

/** * Get whether the given user id is *explicitly* allowed to write this object. Even if this * returns {@code false}, the user may still be able to write it if getPublicWriteAccess returns * {@code true} or a role that the user belongs to has write access. */publicboolean getWriteAccess(ParseUser user) {
if (isUnresolvedUser(user)) {
return getWriteAccess(UNRESOLVED_KEY);
}
if (user.isLazy()) {
returnfalse;
}
if (user.getObjectId() == null) {
thrownew IllegalArgumentException("cannot getWriteAccess for a user with null id");
}
return getWriteAccess(user.getObjectId());
}