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

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

?? jfdaoimpl.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 JfDaoImpl extends AbstractDataAccessObject implements JfDao
{
	/** 
	 * 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( JfDaoImpl.class );

	/** 
	 * All finder methods in this class use this SELECT constant to build their queries
	 */
	protected final String SQL_SELECT = "SELECT jfbm, jfmc 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() + " ( jfbm, jfmc ) VALUES ( ?, ? )";

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

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

	/** 
	 * Index of column jfbm
	 */
	protected static final int COLUMN_JFBM = 1;

	/** 
	 * Index of column jfmc
	 */
	protected static final int COLUMN_JFMC = 2;

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

	/** 
	 * Index of primary-key column jfbm
	 */
	protected static final int PK_COLUMN_JFBM = 1;

	/** 
	 * Inserts a new row in the jf table.
	 */
	public JfPk insert(Jf dto) throws JfDaoException
	{
		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_JFBM, dto.getJfbm() );
			stmt.setString( COLUMN_JFMC, dto.getJfmc() );
			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 JfDaoException( "SQLException: " + _e.getMessage(), _e );
		}
		catch (Exception _e) {
			logger.error( "Exception: " + _e.getMessage(), _e );
			throw new JfDaoException( "Exception: " + _e.getMessage(), _e );
		}
		finally {
			ResourceManager.close(stmt);
			if (!isConnSupplied) {
				ResourceManager.close(conn);
			}
		
		}
		
	}

	/** 
	 * Updates a single row in the jf table.
	 */
	public void update(JfPk pk, Jf dto) throws JfDaoException
	{
		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_JFBM, dto.getJfbm() );
			stmt.setString( COLUMN_JFMC, dto.getJfmc() );
			stmt.setString( 3, pk.getJfbm() );
			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 JfDaoException( "SQLException: " + _e.getMessage(), _e );
		}
		catch (Exception _e) {
			logger.error( "Exception: " + _e.getMessage(), _e );
			throw new JfDaoException( "Exception: " + _e.getMessage(), _e );
		}
		finally {
			ResourceManager.close(stmt);
			if (!isConnSupplied) {
				ResourceManager.close(conn);
			}
		
		}
		
	}

	/** 
	 * Deletes a single row in the jf table.
	 */
	public void delete(JfPk pk) throws JfDaoException
	{
		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.getJfbm() );
			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 JfDaoException( "SQLException: " + _e.getMessage(), _e );
		}
		catch (Exception _e) {
			logger.error( "Exception: " + _e.getMessage(), _e );
			throw new JfDaoException( "Exception: " + _e.getMessage(), _e );
		}
		finally {
			ResourceManager.close(stmt);
			if (!isConnSupplied) {
				ResourceManager.close(conn);
			}
		
		}
		
	}

	/** 
	 * Returns the rows from the jf table that matches the specified primary-key value.
	 */
	public Jf findByPrimaryKey(JfPk pk) throws JfDaoException
	{
		return findByPrimaryKey( pk.getJfbm() );
	}

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

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

	/** 
	 * Returns all rows from the jf table that match the criteria 'jfbm = :jfbm'.
	 */
	public Jf[] findWhereJfbmEquals(String jfbm) throws JfDaoException
	{
		return findByDynamicSelect( SQL_SELECT + " WHERE jfbm = ? ORDER BY jfbm", new Object[] { jfbm } );
	}

	/** 
	 * Returns all rows from the jf table that match the criteria 'jfmc = :jfmc'.
	 */
	public Jf[] findWhereJfmcEquals(String jfmc) throws JfDaoException
	{
		return findByDynamicSelect( SQL_SELECT + " WHERE jfmc = ? ORDER BY jfmc", new Object[] { jfmc } );
	}

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

	/**
	 * Method 'JfDaoImpl'
	 * 
	 * @param userConn
	 */
	public JfDaoImpl(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 "jf";
	}

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

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

	/** 
	 * Populates a DTO with data from a ResultSet
	 */
	protected void populateDto(Jf dto, ResultSet rs) throws SQLException
	{
		dto.setJfbm( rs.getString( COLUMN_JFBM ) );
		dto.setJfmc( rs.getString( COLUMN_JFMC ) );
	}

	/** 
	 * Returns all rows from the jf table that match the specified arbitrary SQL statement
	 */
	public Jf[] findByDynamicSelect(String sql, Object[] sqlParams) throws JfDaoException
	{
		// 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 JfDaoException( "SQLException: " + _e.getMessage(), _e );
		}
		catch (Exception _e) {
			logger.error( "Exception: " + _e.getMessage(), _e );
			throw new JfDaoException( "Exception: " + _e.getMessage(), _e );
		}
		finally {
			ResourceManager.close(rs);
			ResourceManager.close(stmt);
			if (!isConnSupplied) {
				ResourceManager.close(conn);
			}
		
		}
		
	}

	/** 
	 * Returns all rows from the jf table that match the specified arbitrary SQL statement
	 */
	public Jf[] findByDynamicWhere(String sql, Object[] sqlParams) throws JfDaoException
	{
		// 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 JfDaoException( "SQLException: " + _e.getMessage(), _e );
		}
		catch (Exception _e) {
			logger.error( "Exception: " + _e.getMessage(), _e );
			throw new JfDaoException( "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| 五月婷婷久久丁香| 国产在线精品一区二区| 日韩午夜在线影院| 久久99精品久久久久久国产越南 | 久久久精品天堂| 国产宾馆实践打屁股91| 国产精品电影一区二区| 欧美无人高清视频在线观看| 婷婷激情综合网| 久久―日本道色综合久久| 国产成人综合在线播放| 中文字幕一区二区5566日韩| 欧美午夜片在线观看| 青青草伊人久久| 久久久综合精品| 色诱视频网站一区| 日韩中文字幕1| 久久奇米777| av成人动漫在线观看| 亚洲乱码国产乱码精品精的特点| 欧美男人的天堂一二区| 国产精品一二三在| 亚洲图片一区二区| 久久久久久久一区| 在线日韩一区二区| 麻豆成人免费电影| 日韩理论电影院| 欧美一区二区三区婷婷月色| 国产成+人+日韩+欧美+亚洲| 亚洲福利一二三区| 国产日韩视频一区二区三区| 欧美调教femdomvk| 国产成人综合在线播放| 亚洲成av人综合在线观看| 2020国产精品| 欧美顶级少妇做爰| 91在线小视频| 国内国产精品久久| 亚洲成人激情自拍| 国产精品欧美精品| 欧美刺激午夜性久久久久久久| 懂色av一区二区三区蜜臀| 午夜欧美视频在线观看| 亚洲丝袜美腿综合| 久久久久成人黄色影片| 制服丝袜中文字幕一区| 色婷婷av一区二区三区gif| 精品一区二区在线看| 亚洲小说欧美激情另类| 中文字幕一区二区在线播放 | 国产精品亚洲午夜一区二区三区 | 精品少妇一区二区三区免费观看 | 色香色香欲天天天影视综合网| 国内精品伊人久久久久影院对白| 夜夜亚洲天天久久| 中文字幕一区在线| 国产日韩欧美不卡在线| 久久综合九色综合欧美亚洲| 欧美一区二区三区男人的天堂| 色偷偷久久一区二区三区| 高清shemale亚洲人妖| 极品尤物av久久免费看| 日本视频一区二区| 亚洲va天堂va国产va久| 亚洲国产sm捆绑调教视频| 中文字幕在线不卡| 综合色中文字幕| 国产精品人妖ts系列视频| 国产日韩欧美激情| 国产日韩欧美高清在线| 欧美国产精品专区| 国产校园另类小说区| 久久久美女艺术照精彩视频福利播放| 91精品在线一区二区| 777xxx欧美| 欧美一激情一区二区三区| 日韩午夜电影av| 欧美一区二区三区性视频| 制服丝袜av成人在线看| 日韩美女在线视频| 精品成人佐山爱一区二区| 久久日韩精品一区二区五区| 精品欧美一区二区在线观看| 精品福利一二区| 国产欧美日韩视频在线观看| 国产精品女主播在线观看| 中文字幕一区二区三区乱码在线| 中文字幕一区视频| 亚洲一区免费在线观看| 亚洲bt欧美bt精品| 精品一区二区三区在线播放| 国产精品123| 99久久久久免费精品国产 | 紧缚捆绑精品一区二区| 国产成人av电影在线播放| 色哟哟欧美精品| 91精品国产福利| 久久久无码精品亚洲日韩按摩| 国产人成亚洲第一网站在线播放| 日本一区二区电影| 亚洲国产精品尤物yw在线观看| 亚洲二区在线观看| 久久er99热精品一区二区| 国产麻豆午夜三级精品| 91久久香蕉国产日韩欧美9色| 在线影视一区二区三区| 欧美一区二区三区在线| 国产精品天天看| 亚洲午夜久久久久久久久久久 | 国产一区二区三区四区五区美女 | 一区二区三区精品久久久| 亚洲第一综合色| 国产成人亚洲综合a∨婷婷 | 男女性色大片免费观看一区二区| 国产中文字幕精品| 99久精品国产| 久久综合色婷婷| 亚洲国产综合在线| 国产精品一级二级三级| 欧美三级电影在线看| 国产色综合久久| 天天影视涩香欲综合网 | 日韩美女啊v在线免费观看| 秋霞电影一区二区| 一本色道久久综合亚洲91| 精品日韩在线观看| 亚洲一区二区在线免费观看视频 | 亚洲激情在线激情| 国内精品久久久久影院薰衣草| 日本韩国一区二区三区| 国产人久久人人人人爽| 蜜桃一区二区三区四区| 日本高清不卡在线观看| 国产亚洲va综合人人澡精品| 午夜国产精品一区| 在线视频一区二区免费| 国产精品美女www爽爽爽| 美腿丝袜亚洲三区| 欧美日韩一本到| 国产精品初高中害羞小美女文| 免费成人结看片| 欧美日韩一区二区三区四区| 国产精品国产馆在线真实露脸| 九九国产精品视频| 欧美一区二区三区四区在线观看| 亚洲精品美腿丝袜| 91视频一区二区三区| 国产精品色婷婷久久58| 国产精品18久久久久久久久久久久| 7777精品伊人久久久大香线蕉的| 亚洲精品国产一区二区精华液| 国产一区二区在线观看免费| 欧美一区二区日韩一区二区| 亚洲一区二区不卡免费| 色8久久精品久久久久久蜜| 国产精品久久国产精麻豆99网站| 国产精品香蕉一区二区三区| 精品久久久久一区二区国产| 欧美aaaaa成人免费观看视频| 欧美精品亚洲二区| 偷拍一区二区三区| 欧美一二三四区在线| 日韩专区欧美专区| 精品视频一区三区九区| 一区二区免费在线| 色妹子一区二区| 亚洲视频香蕉人妖| 在线视频亚洲一区| 亚洲 欧美综合在线网络| 欧美日本不卡视频| 香港成人在线视频| 欧美一区二区视频在线观看2020| 亚洲6080在线| 日韩视频123| 国内精品国产成人| 国产欧美精品一区二区三区四区| 国产91丝袜在线播放| 综合在线观看色| 欧美三区在线视频| 美女视频一区二区三区| 精品黑人一区二区三区久久| 国产在线精品免费av| 一区二区三区资源| 在线观看视频一区二区| 亚洲va欧美va人人爽| 日韩精品一区二区三区视频播放 | 国产在线播放一区二区三区| 国产午夜精品久久| 91亚洲大成网污www| 亚洲小说春色综合另类电影| 欧美精品777| 国产成人精品影视| 一区二区在线免费观看| 8x福利精品第一导航| 国产精品一二三区| 亚洲线精品一区二区三区| 欧美电影免费观看高清完整版在| 国产乱人伦偷精品视频不卡| 亚洲青青青在线视频|