/** * Gets the access level corresponding to a specific level ID from the SQL database. * * @param levelId The level ID of the access level to find. * @return If the level was found, it is returned, otherwise LockLevel.UNKNOWN is returned. */ public static LockLevel getLevel(int levelId) { for (LockLevel l : LockLevel.values()) { if (l.levelId == levelId) return l; } return LockLevel.UNKNOWN; }