class ThriftValidate {

    public static void prepareUser(User user) throws SW360Exception {
        // Check required fields
        assertNotEmpty(user.getEmail());
        // Set id to email, in order to have human readable database
        user.setId(user.getEmail());
        // Set type
        user.setType(TYPE_USER);
        // guarantee that `CommentMadeDuringModerationRequest` is never stored in the database as this is intended to be a transient field
        user.unsetCommentMadeDuringModerationRequest();
    }

    private  ThriftValidate();

}