public static UserAction getByActionCode(int actionCode) {
        for (UserAction userAction : UserAction.values()) {
            if (userAction.getActionCode() == actionCode) {
                return userAction;
            }
        }
        throw new UnsupportedOperationException(String.format("Action for code %d is not present", actionCode));
    }