All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.formkiq.server.dao.UserDao Maven / Gradle / Ivy

There is a newer version: 0.6.1
Show newest version
/*
 * Copyright (C) 2016 FormKiQ Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.formkiq.server.dao;

import java.util.Date;

import com.formkiq.server.domain.User;
import com.formkiq.server.domain.type.UserDTO;
import com.formkiq.server.domain.type.UserListDTO;

/**
 * UserDao.
 *
 */
public interface UserDao extends AbstractDao {

	/**
	 * Deletes User.
	 * @param user {@link User}
	 */
	void deleteUser(User user);

	/**
	 * Find User by Email.
	 * @param email String
	 * @return User
	 */
	User findUser(String email);

	/**
	 * Find User DTO.
	 * @param email String
	 * @return UserDTO
	 */
    UserDTO findUserDTO(String email);

	/**
	 * Find Users.
	 * @param token {@link String}
	 * @return List<UserDetails>
	 */
	UserListDTO findUsers(String token);

	/**
	 * Get Admin User count.
	 * @return int
	 */
    int getAdminUserCount();

    /**
	 * Save User.
	 * @param user User
	 * @return User
	 */
	User saveUser(User user);

    /**
     * Update User's Last Login Date.
     * @param email {@link String}
     * @param date {@link Date}
     */
    void updateLastLogin(String email, Date date);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy