亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? jfdlrdaoimpl.java

?? STRUTS數據庫項目開發寶典
?? JAVA
字號:
/*
 * Author :Cao guangxin
 * on 26-三月-2005 at 09:54:55
 * 
 * Mail:relationinfo@hotmail.com
 * 
 * visit:www.relaioninfo.com or www.helpsoft.org
 */

package org.helpsoft.contract.jdbc;

import org.helpsoft.contract.dao.*;
import org.helpsoft.contract.factory.*;
import org.helpsoft.contract.dto.*;
import org.helpsoft.contract.exceptions.*;
import java.sql.Connection;
import java.sql.Types;
import java.util.Collection;
import org.apache.log4j.Logger;
import java.sql.PreparedStatement;
import java.sql.Statement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Time;
import java.util.List;
import java.util.Iterator;
import java.util.ArrayList;

public class JfdlrDaoImpl extends AbstractDataAccessObject implements JfdlrDao
{
	/** 
	 * The factory class for this DAO has two versions of the create() method - one that
takes no arguments and one that takes a Connection argument. If the Connection version
is chosen then the connection will be stored in this attribute and will be used by all
calls to this DAO, otherwise a new Connection will be allocated for each operation.
	 */
	protected java.sql.Connection userConn;

	protected static final Logger logger = Logger.getLogger( JfdlrDaoImpl.class );

	/** 
	 * All finder methods in this class use this SELECT constant to build their queries
	 */
	protected final String SQL_SELECT = "SELECT jfdlrbm, jfdlrxm FROM " + getTableName() + "";

	/** 
	 * Finder methods will pass this value to the JDBC setMaxRows method
	 */
	private int maxRows;

	/** 
	 * SQL INSERT statement for this table
	 */
	protected final String SQL_INSERT = "INSERT INTO " + getTableName() + " ( jfdlrbm, jfdlrxm ) VALUES ( ?, ? )";

	/** 
	 * SQL UPDATE statement for this table
	 */
	protected final String SQL_UPDATE = "UPDATE " + getTableName() + " SET jfdlrbm = ?, jfdlrxm = ? WHERE jfdlrbm = ?";

	/** 
	 * SQL DELETE statement for this table
	 */
	protected final String SQL_DELETE = "DELETE FROM " + getTableName() + " WHERE jfdlrbm = ?";

	/** 
	 * Index of column jfdlrbm
	 */
	protected static final int COLUMN_JFDLRBM = 1;

	/** 
	 * Index of column jfdlrxm
	 */
	protected static final int COLUMN_JFDLRXM = 2;

	/** 
	 * Number of columns
	 */
	protected static final int NUMBER_OF_COLUMNS = 2;

	/** 
	 * Index of primary-key column jfdlrbm
	 */
	protected static final int PK_COLUMN_JFDLRBM = 1;

	/** 
	 * Inserts a new row in the jfdlr table.
	 */
	public JfdlrPk insert(Jfdlr dto) throws JfdlrDaoException
	{
		long t1 = System.currentTimeMillis();
		// declare variables
		final boolean isConnSupplied = (userConn != null);
		Connection conn = null;
		PreparedStatement stmt = null;
		ResultSet rs = null;
		
		try {
			// get the user-specified connection or get a connection from the ResourceManager
			conn = isConnSupplied ? userConn : ResourceManager.getConnection();
		
			stmt = conn.prepareStatement( SQL_INSERT );
			stmt.setString( COLUMN_JFDLRBM, dto.getJfdlrbm() );
			stmt.setString( COLUMN_JFDLRXM, dto.getJfdlrxm() );
			if (logger.isDebugEnabled()) {
				logger.debug( "Executing " + SQL_INSERT + " with DTO: " + dto);
			}
		
			int rows = stmt.executeUpdate();
			long t2 = System.currentTimeMillis();
			if (logger.isDebugEnabled()) {
				logger.debug( rows + " rows affected (" + (t2-t1) + " ms)");
			}
		
			return dto.createPk();
		}
		catch (SQLException _e) {
			logger.error( "SQLException: " + _e.getMessage(), _e );
			throw new JfdlrDaoException( "SQLException: " + _e.getMessage(), _e );
		}
		catch (Exception _e) {
			logger.error( "Exception: " + _e.getMessage(), _e );
			throw new JfdlrDaoException( "Exception: " + _e.getMessage(), _e );
		}
		finally {
			ResourceManager.close(stmt);
			if (!isConnSupplied) {
				ResourceManager.close(conn);
			}
		
		}
		
	}

	/** 
	 * Updates a single row in the jfdlr table.
	 */
	public void update(JfdlrPk pk, Jfdlr dto) throws JfdlrDaoException
	{
		long t1 = System.currentTimeMillis();
		// declare variables
		final boolean isConnSupplied = (userConn != null);
		Connection conn = null;
		PreparedStatement stmt = null;
		
		try {
			// get the user-specified connection or get a connection from the ResourceManager
			conn = isConnSupplied ? userConn : ResourceManager.getConnection();
		
			if (logger.isDebugEnabled()) {
				logger.debug( "Executing " + SQL_UPDATE + " with DTO: " + dto);
			}
		
			stmt = conn.prepareStatement( SQL_UPDATE );
			stmt.setString( COLUMN_JFDLRBM, dto.getJfdlrbm() );
			stmt.setString( COLUMN_JFDLRXM, dto.getJfdlrxm() );
			stmt.setString( 3, pk.getJfdlrbm() );
			int rows = stmt.executeUpdate();
			long t2 = System.currentTimeMillis();
			if (logger.isDebugEnabled()) {
				logger.debug( rows + " rows affected (" + (t2-t1) + " ms)");
			}
		
		}
		catch (SQLException _e) {
			logger.error( "SQLException: " + _e.getMessage(), _e );
			throw new JfdlrDaoException( "SQLException: " + _e.getMessage(), _e );
		}
		catch (Exception _e) {
			logger.error( "Exception: " + _e.getMessage(), _e );
			throw new JfdlrDaoException( "Exception: " + _e.getMessage(), _e );
		}
		finally {
			ResourceManager.close(stmt);
			if (!isConnSupplied) {
				ResourceManager.close(conn);
			}
		
		}
		
	}

	/** 
	 * Deletes a single row in the jfdlr table.
	 */
	public void delete(JfdlrPk pk) throws JfdlrDaoException
	{
		long t1 = System.currentTimeMillis();
		// declare variables
		final boolean isConnSupplied = (userConn != null);
		Connection conn = null;
		PreparedStatement stmt = null;
		
		try {
			// get the user-specified connection or get a connection from the ResourceManager
			conn = isConnSupplied ? userConn : ResourceManager.getConnection();
		
			if (logger.isDebugEnabled()) {
				logger.debug( "Executing " + SQL_DELETE + " with PK: " + pk);
			}
		
			stmt = conn.prepareStatement( SQL_DELETE );
			stmt.setString( 1, pk.getJfdlrbm() );
			int rows = stmt.executeUpdate();
			long t2 = System.currentTimeMillis();
			if (logger.isDebugEnabled()) {
				logger.debug( rows + " rows affected (" + (t2-t1) + " ms)");
			}
		
		}
		catch (SQLException _e) {
			logger.error( "SQLException: " + _e.getMessage(), _e );
			throw new JfdlrDaoException( "SQLException: " + _e.getMessage(), _e );
		}
		catch (Exception _e) {
			logger.error( "Exception: " + _e.getMessage(), _e );
			throw new JfdlrDaoException( "Exception: " + _e.getMessage(), _e );
		}
		finally {
			ResourceManager.close(stmt);
			if (!isConnSupplied) {
				ResourceManager.close(conn);
			}
		
		}
		
	}

	/** 
	 * Returns the rows from the jfdlr table that matches the specified primary-key value.
	 */
	public Jfdlr findByPrimaryKey(JfdlrPk pk) throws JfdlrDaoException
	{
		return findByPrimaryKey( pk.getJfdlrbm() );
	}

	/** 
	 * Returns all rows from the jfdlr table that match the criteria ''.
	 */
	public Jfdlr[] findAll() throws JfdlrDaoException
	{
		return findByDynamicSelect( SQL_SELECT + " ORDER BY jfdlrbm", null );
	}

	/** 
	 * Returns all rows from the jfdlr table that match the criteria 'jfdlrbm = :jfdlrbm'.
	 */
	public Jfdlr findByPrimaryKey(String jfdlrbm) throws JfdlrDaoException
	{
		Jfdlr ret[] = findByDynamicSelect( SQL_SELECT + " WHERE jfdlrbm = ?", new Object[] { jfdlrbm } );
		return ret.length==0 ? null : ret[0];
	}

	/** 
	 * Returns all rows from the jfdlr table that match the criteria 'jfdlrbm = :jfdlrbm'.
	 */
	public Jfdlr[] findWhereJfdlrbmEquals(String jfdlrbm) throws JfdlrDaoException
	{
		return findByDynamicSelect( SQL_SELECT + " WHERE jfdlrbm = ? ORDER BY jfdlrbm", new Object[] { jfdlrbm } );
	}

	/** 
	 * Returns all rows from the jfdlr table that match the criteria 'jfdlrxm = :jfdlrxm'.
	 */
	public Jfdlr[] findWhereJfdlrxmEquals(String jfdlrxm) throws JfdlrDaoException
	{
		return findByDynamicSelect( SQL_SELECT + " WHERE jfdlrxm = ? ORDER BY jfdlrxm", new Object[] { jfdlrxm } );
	}

	/**
	 * Method 'JfdlrDaoImpl'
	 * 
	 */
	public JfdlrDaoImpl()
	{
	}

	/**
	 * Method 'JfdlrDaoImpl'
	 * 
	 * @param userConn
	 */
	public JfdlrDaoImpl(final java.sql.Connection userConn)
	{
		this.userConn = userConn;
	}

	/** 
	 * Sets the value of maxRows
	 */
	public void setMaxRows(int maxRows)
	{
		this.maxRows = maxRows;
	}

	/** 
	 * Gets the value of maxRows
	 */
	public int getMaxRows()
	{
		return maxRows;
	}

	/**
	 * Method 'getTableName'
	 * 
	 * @return String
	 */
	public String getTableName()
	{
		return "jfdlr";
	}

	/** 
	 * Fetches a single row from the result set
	 */
	protected Jfdlr fetchSingleResult(ResultSet rs) throws SQLException
	{
		if (rs.next()) {
			Jfdlr dto = new Jfdlr();
			populateDto( dto, rs);
			return dto;
		} else {
			return null;
		}
		
	}

	/** 
	 * Fetches multiple rows from the result set
	 */
	protected Jfdlr[] fetchMultiResults(ResultSet rs) throws SQLException
	{
		Collection resultList = new ArrayList();
		while (rs.next()) {
			Jfdlr dto = new Jfdlr();
			populateDto( dto, rs);
			resultList.add( dto );
		}
		
		Jfdlr ret[] = new Jfdlr[ resultList.size() ];
		resultList.toArray( ret );
		return ret;
	}

	/** 
	 * Populates a DTO with data from a ResultSet
	 */
	protected void populateDto(Jfdlr dto, ResultSet rs) throws SQLException
	{
		dto.setJfdlrbm( rs.getString( COLUMN_JFDLRBM ) );
		dto.setJfdlrxm( rs.getString( COLUMN_JFDLRXM ) );
	}

	/** 
	 * Returns all rows from the jfdlr table that match the specified arbitrary SQL statement
	 */
	public Jfdlr[] findByDynamicSelect(String sql, Object[] sqlParams) throws JfdlrDaoException
	{
		// declare variables
		final boolean isConnSupplied = (userConn != null);
		Connection conn = null;
		PreparedStatement stmt = null;
		ResultSet rs = null;
		
		try {
			// get the user-specified connection or get a connection from the ResourceManager
			conn = isConnSupplied ? userConn : ResourceManager.getConnection();
		
			// construct the SQL statement
			final String SQL = sql;
		
		
			if (logger.isDebugEnabled()) {
				logger.debug( "Executing " + SQL);
			}
		
			// prepare statement
			stmt = conn.prepareStatement( SQL );
			stmt.setMaxRows( maxRows );
		
			// bind parameters
			for (int i=0; sqlParams!=null && i<sqlParams.length; i++ ) {
				stmt.setObject( i+1, sqlParams[i] );
			}
		
		
			rs = stmt.executeQuery();
		
			// fetch the results
			return fetchMultiResults(rs);
		}
		catch (SQLException _e) {
			logger.error( "SQLException: " + _e.getMessage(), _e );
			throw new JfdlrDaoException( "SQLException: " + _e.getMessage(), _e );
		}
		catch (Exception _e) {
			logger.error( "Exception: " + _e.getMessage(), _e );
			throw new JfdlrDaoException( "Exception: " + _e.getMessage(), _e );
		}
		finally {
			ResourceManager.close(rs);
			ResourceManager.close(stmt);
			if (!isConnSupplied) {
				ResourceManager.close(conn);
			}
		
		}
		
	}

	/** 
	 * Returns all rows from the jfdlr table that match the specified arbitrary SQL statement
	 */
	public Jfdlr[] findByDynamicWhere(String sql, Object[] sqlParams) throws JfdlrDaoException
	{
		// declare variables
		final boolean isConnSupplied = (userConn != null);
		Connection conn = null;
		PreparedStatement stmt = null;
		ResultSet rs = null;
		
		try {
			// get the user-specified connection or get a connection from the ResourceManager
			conn = isConnSupplied ? userConn : ResourceManager.getConnection();
		
			// construct the SQL statement
			final String SQL = SQL_SELECT + " WHERE " + sql;
		
		
			if (logger.isDebugEnabled()) {
				logger.debug( "Executing " + SQL);
			}
		
			// prepare statement
			stmt = conn.prepareStatement( SQL );
			stmt.setMaxRows( maxRows );
		
			// bind parameters
			for (int i=0; sqlParams!=null && i<sqlParams.length; i++ ) {
				stmt.setObject( i+1, sqlParams[i] );
			}
		
		
			rs = stmt.executeQuery();
		
			// fetch the results
			return fetchMultiResults(rs);
		}
		catch (SQLException _e) {
			logger.error( "SQLException: " + _e.getMessage(), _e );
			throw new JfdlrDaoException( "SQLException: " + _e.getMessage(), _e );
		}
		catch (Exception _e) {
			logger.error( "Exception: " + _e.getMessage(), _e );
			throw new JfdlrDaoException( "Exception: " + _e.getMessage(), _e );
		}
		finally {
			ResourceManager.close(rs);
			ResourceManager.close(stmt);
			if (!isConnSupplied) {
				ResourceManager.close(conn);
			}
		
		}
		
	}

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕久久午夜不卡| 麻豆成人av在线| 亚洲欧美另类小说视频| 国产日韩欧美电影| 精品国产免费久久| 久久综合狠狠综合久久综合88| 日韩免费一区二区| 日韩视频在线一区二区| 日韩精品中文字幕一区二区三区 | 欧美在线观看18| 欧美亚洲一区二区在线观看| 成人av网址在线| 99国产精品99久久久久久| 成人美女视频在线看| 国产91高潮流白浆在线麻豆| 国产91精品免费| 99精品欧美一区二区三区小说| 91免费看视频| 欧美精品乱码久久久久久| 欧美精品视频www在线观看| 日韩午夜三级在线| 精品国产乱码久久久久久牛牛| 2022国产精品视频| 国产精品理论片在线观看| 亚洲情趣在线观看| 亚洲午夜精品网| 蜜乳av一区二区三区| 久久99久久久欧美国产| 国产麻豆91精品| 99精品欧美一区二区三区小说| 色8久久人人97超碰香蕉987| 欧美日韩日日夜夜| 欧美大片一区二区| 国产色一区二区| 亚洲夂夂婷婷色拍ww47| 久久精品国产网站| 北条麻妃一区二区三区| 欧美视频在线观看一区二区| 日韩免费看的电影| 中文字幕在线不卡一区| 丝袜亚洲另类欧美综合| 国产黄色精品网站| 欧美视频中文字幕| 国产日产欧美一区| 亚洲一区二区三区不卡国产欧美| 日本欧美一区二区在线观看| 国产乱人伦偷精品视频不卡| 99国产麻豆精品| 中文字幕亚洲视频| 亚洲午夜电影在线观看| 黑人巨大精品欧美一区| 97精品国产97久久久久久久久久久久| 欧美日韩一级片在线观看| 欧美成人在线直播| 亚洲天堂成人在线观看| 奇米一区二区三区av| 国产高清在线精品| 国产亚洲午夜高清国产拍精品 | 国产精品女主播av| 成人app在线观看| 亚洲国产精品久久人人爱蜜臀| 老司机一区二区| 日本精品免费观看高清观看| 国产亚洲一二三区| 奇米一区二区三区| 99国产精品久久久| 国产91露脸合集magnet| 久久99久久精品| 成人午夜精品在线| 欧美亚洲综合一区| 中文字幕在线不卡一区| 蜜臀av一区二区在线免费观看| 一区二区三区日本| 精品一区二区三区不卡| 欧美专区日韩专区| 国产精品久久久久9999吃药| 蜜臀av性久久久久蜜臀aⅴ| jiyouzz国产精品久久| 欧美不卡视频一区| 五月综合激情日本mⅴ| 一本色道久久综合亚洲91| 国产日产精品一区| 国内精品免费在线观看| 日韩欧美国产一区二区三区| 亚洲一区二区在线视频| 一本到高清视频免费精品| 国产欧美一区二区三区在线看蜜臀| 久久精品国产成人一区二区三区| 欧美另类videos死尸| 国产精品福利av| 不卡区在线中文字幕| 久久日韩粉嫩一区二区三区| 韩国视频一区二区| 91精品婷婷国产综合久久性色| 亚洲一区二区四区蜜桃| 色播五月激情综合网| 亚洲另类春色校园小说| 国产精品资源网站| 久久精品在线免费观看| 国产精品88av| 国产农村妇女精品| 成人午夜精品在线| 国产精品二区一区二区aⅴ污介绍| 粉嫩av亚洲一区二区图片| 国产美女在线精品| 香蕉久久一区二区不卡无毒影院| 蜜臀av性久久久久蜜臀av麻豆| 久久综合九色欧美综合狠狠| 成人午夜免费视频| 天天综合日日夜夜精品| 欧美精品一区二| 欧美日韩中文精品| 九九久久精品视频| 天堂va蜜桃一区二区三区漫画版| 精品国精品国产| 91福利视频网站| 欧美精品三级日韩久久| 视频一区视频二区中文字幕| 日韩一区二区三区电影在线观看 | 亚洲欧美一区二区在线观看| www.欧美.com| 一区二区三区 在线观看视频| 在线精品视频小说1| 日产欧产美韩系列久久99| 欧美大白屁股肥臀xxxxxx| 国产在线视频不卡二| 国产欧美精品区一区二区三区| 成人性生交大片免费看中文网站| 18欧美乱大交hd1984| 欧美性色黄大片手机版| 美女精品自拍一二三四| 欧美激情一区二区三区蜜桃视频 | 欧美美女一区二区| 久久成人久久爱| 国产精品乱码一区二区三区软件 | 欧美一区二区三区性视频| 精品影院一区二区久久久| 国产婷婷色一区二区三区在线| 99视频精品全部免费在线| 亚洲777理论| 久久精品亚洲麻豆av一区二区 | 91麻豆精品国产91久久久久久 | 国产激情一区二区三区| 一区二区成人在线| 精品国产免费一区二区三区四区 | 久久久激情视频| 色婷婷综合久久久久中文一区二区 | 欧美成人激情免费网| fc2成人免费人成在线观看播放| 夜夜揉揉日日人人青青一国产精品| 欧美一级一区二区| 成人va在线观看| 蜜臀a∨国产成人精品| 综合久久国产九一剧情麻豆| 91精品在线一区二区| 91在线看国产| 精品一区二区三区的国产在线播放| 亚洲日本一区二区三区| 久久综合九色综合97_久久久| 在线精品视频免费播放| 国产成a人无v码亚洲福利| 日韩中文字幕av电影| 亚洲欧洲三级电影| 日韩你懂的在线观看| 欧美性感一类影片在线播放| 国产成人av自拍| 美女性感视频久久| 亚洲国产欧美在线人成| 欧美韩国日本综合| 精品成人一区二区三区| 欧美人妖巨大在线| 91麻豆高清视频| 国产精品888| 久久精品国产99国产| 亚洲一级不卡视频| 国产精品国产精品国产专区不蜜| 欧美不卡在线视频| 91精品国产高清一区二区三区蜜臀| 91麻豆精东视频| 成人av午夜影院| 国产成人亚洲综合a∨婷婷图片| 免费的国产精品| 爽爽淫人综合网网站| 亚洲综合一二三区| 亚洲欧美日韩成人高清在线一区| 久久综合久久综合久久| 91精品国产免费| 欧美片网站yy| 欧美日韩亚洲综合一区| 色婷婷久久久久swag精品| av中文字幕在线不卡| 成人国产精品免费观看视频| 国产一区二区精品久久91| 久久国产日韩欧美精品| 奇米777欧美一区二区| 丝袜美腿亚洲色图| 五月天一区二区| 亚洲国产成人精品视频| 亚洲高清久久久| 亚洲.国产.中文慕字在线|