?? userdao.java
字號:
package com.yuanchung.sales.dao.user;
import java.util.List;
import org.springframework.dao.DataAccessException;
import com.yuanchung.sales.model.Position;
import com.yuanchung.sales.model.Treeview;
import com.yuanchung.sales.model.user.User;
import com.yuanchung.sales.model.userDefined.UserDefined;
import com.yuanchung.sales.model.userDefined.UserField;
public interface UserDAO {
//根據用戶名和密碼取得用戶實體
public User getUser(String userName, String password) throws DataAccessException;
//查找所有的用戶
public List getAll() throws DataAccessException;
//保存用戶
public void saveUser(User user) throws DataAccessException;
//根據id查找用戶
public User getUserById(int id) throws DataAccessException;
//搜索部門
public List<Treeview> getTreeViewToDept() throws DataAccessException;
//刪除單個的用戶;
public void deleteUser(User user) throws DataAccessException;
//刪除用戶的組織結構;
public void deleteTreeview(Integer id) throws DataAccessException;
//羅列出該用戶的角色列表;
public List getUserRoleList(int user) throws DataAccessException;
//刪除該用戶的角色列表
public void deleteUserRole(List list) throws DataAccessException;
//羅列出該用戶的權限;
public List getUserRight(User user) throws DataAccessException;
//刪除用戶的權限;
public void deleteUserRights(List list) throws DataAccessException;
//刪除用戶崗位列表;
public void deleteUserPosttionList(List uPositionList) throws DataAccessException;
//羅列用戶的客戶關聯關系;
public List getUserContact(User user) throws DataAccessException;
//刪除用戶的客戶關聯關系;
public void deleteUserContact(List list) throws DataAccessException;
//獲取該用戶的視圖列表
public List getUserDefined(User user) throws DataAccessException;
//獲取該視圖的顯示字段列表;
public List getUserField(UserDefined userDefined) throws DataAccessException;
//刪除該視圖顯示字段列表;
public void deleteUserField(List list) throws DataAccessException;
//獲取該視圖的過濾字段;
public List getUserFilter(UserDefined userDefined) throws DataAccessException;
//刪除該視圖的過濾字段列表;
public void deleteUserFilter(List list) throws DataAccessException;
//刪除該視圖
public void deleteUserDefined(UserDefined userDefined) throws DataAccessException;
//修改某個用戶對象;
public void editUser(User user) throws DataAccessException;
//根據父結點和姓名查找結點
public Treeview getTreeviewByFamilyNameAndParentId(String name, int parentId) throws DataAccessException;
//根據崗位ID查找崗位
public Position getPositionById(int positionId)throws DataAccessException ;
//根據主鍵查找結點
public Treeview findTreeviewById(int id) throws DataAccessException;
//------------------------------------------更新后-------------------------------------------//
/**
* 保存用戶自定義選項,拋出Hibernate DAO EXCEPTION
*/
public void saveUserDefined(UserDefined userDefined) throws DataAccessException;
/**
* 查找最新用戶
* @throws DataAccessException
*/
/**
* 保存用戶顯示字段
* @param userField
* @throws DataAccessException
*/
public void saveUserField(UserField userField) throws DataAccessException ;
/**
* 查找最新保存的用戶
* @return
* @throws DataAccessException
*/
public User getUserLastest() throws DataAccessException;
/**
*
* @return 最新創建的用戶自定義選項
* @throws DataAccessException
*/
public UserDefined getUserDefinedLastest() throws DataAccessException;
/**
* 根據崗位ID獲取用戶信息
* @param id
* @return
*/
public List<User> findByTreeviewId(int id);
public List<User> findByTreeviewIdAndFamilyName(int id,String familyName);
public List<User> findByRoleId(int roleId, String familyName);
public List<User> findAll(String familyName);
public User findById(int userId);
//初始化用戶密碼
public void updatePassword(int id,String pw);
/**
* 更新用戶表的deleteFlag,如果是刪除用戶,則把deleteFlag置為1
* author:張明強
* time:2009-01-16
*/
public void updateDeleteFlag(User user);
public String getDepartmentName(int userID) throws DataAccessException;
public List<User> findByTreeviewIds(String ids);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -