public class RepositoryCommonValidations extends Object
| Constructor and Description |
|---|
RepositoryCommonValidations() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
checkUserInfo(IUser user)
Validates
user's data. |
static IUser |
normalizeUserInfo(IUser user)
Normalizes
user's data. |
public static boolean checkUserInfo(IUser user)
user's data. Common rule for all repositories is: both login and name must contain at least one
meaningful char.user - usertrue if user's login and name are not emptyNullPointerException - is user is nullpublic static IUser normalizeUserInfo(IUser user)
user's data. According to common rules, simply trims login
and name.user - userNullPointerException - if user is null or user's login and nameCopyright © 2018 Hitachi Vantara. All rights reserved.