usersdao.java

来自「JAVA 经典案例 源代码 Part2.」· Java 代码 · 共 69 行

JAVA
69
字号
/*
 * 
 * 开发时间:2004-08-20 at 05:40:07
 * 
 * 作者:曹广鑫
 * 
 * 网站:www.helpsoft.org  电子邮件:support@helpsoft.org
 */

package org.helpsoft.blog.dao;

import org.helpsoft.blog.dto.*;
import org.helpsoft.blog.exceptions.*;
import java.sql.CallableStatement;

public interface UsersDao
{
	/** 
	 * Inserts a new row in the users table.
	 */
	public UsersPk insert(Users dto) throws UsersDaoException;

	/** 
	 * Updates a single row in the users table.
	 */
	public void update(UsersPk pk, Users dto) throws UsersDaoException;

	/** 
	 * Deletes a single row in the users table.
	 */
	public void delete(UsersPk pk) throws UsersDaoException;

	/** 
	 * Returns the rows from the users table that matches the specified primary-key value.
	 */
	public Users findByPrimaryKey(UsersPk pk) throws UsersDaoException;

	/** 
	 * Returns all rows from the users table.
	 */
	public Users[] findAll() throws UsersDaoException;

	/** 
	 * Returns all rows from the users table that match the criteria 'userid = :userid'.
	 */
	public Users[] findWhereUseridEquals(String userid) throws UsersDaoException;

	/** 
	 * Returns all rows from the users table that match the criteria 'name = :name'.
	 */
	public Users[] findWhereNameEquals(String name) throws UsersDaoException;

	/** 
	 * Returns all rows from the users table that match the criteria 'userid = :userid'.
	 */
	public Users findByPrimaryKey(String userid) throws UsersDaoException;

	/** 
	 * Returns all rows from the users table that match the specified arbitrary SQL statement
	 */
	public Users[] findByDynamicSelect(String sql, Object[] sqlParams) throws UsersDaoException;

	/** 
	 * Returns all rows from the users table that match the specified arbitrary SQL statement
	 */
	public Users[] findByDynamicWhere(String sql, Object[] sqlParams) throws UsersDaoException;

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?