*/
@Override
public User createObject(ResultSet resultSet) throws SQLException {
- return new LazyUser(resultSet.getString("USERS.ID")).setName(resultSet.getString("USERS.NAME"));
+ return new LazyUser(resultSet.getString("USERS.ID")).setName(resultSet.getString("USERS.NAME")).setLevel(resultSet.getInt("USERS.LEVEL"));
}
}
public User setName(String name);
/**
+ * Returns the privilege level of this user. 0 is the level of a normal user
+ * without any special privileges.
+ *
+ * @return The privilege level of this user
+ */
+ public int getLevel();
+
+ /**
+ * Sets the privilege level of this user.
+ *
+ * @param level
+ * The privilege level of this user
+ * @return This user
+ */
+ public User setLevel(int level);
+
+ /**
* Returns all OpenIDs connected with this user.
*
* @return All OpenIDs connected with this user