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

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

?? table.java

?? 一個OR Mapping工具
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
//-< Table.java >----------------------------------------------------*--------*
// JORA                       Version 2.0        (c) 1998  GARRET    *     ?  *
// (Java Object Relational Adapter)                                  *   /\|  *
//                                                                   *  /  \  *
//                          Created:     10-Jun-98    K.A. Knizhnik  * / [] \ *
//                          Last update: 20-Jun-98    K.A. Knizhnik  * GARRET *
//-------------------------------------------------------------------*--------*
// Class representing database table
//-------------------------------------------------------------------*--------*

package jora;

import java.util.*;
import java.sql.*;
import java.lang.reflect.*;

/** Table class is used to establish mapping between corteges of database
 *  tables and Java classes. This class is responsible for constructing
 *  SQL statements for extracting, updating and deleting records of the
 *  database table. 
 */
public class Table { 
    /** Constructor for table object. Make association between Java class 
     *  and database table.
     *  
     * @param tclassName name of Java class
     * @param tableName name of database table mapped on this Java class
     * @param key table's primary key. This parameter is used in UPDATE/DELETE
     *  operations to locate record in the table.
     * @s session, which should be opened before first access to the table
     */
    public Table(String className, String tableName, Session s, String key) {
	String[] keys = {key};
	init(className, tableName, s, keys);
    }

    /** Constructor for table object. Make association between Java class 
     *  and database table.
     *  
     * @param tclassName name of Java class
     * @param tableName name of database table mapped on this Java class
     * @param keys table primary keys. This parameter is used in UPDATE/DELETE
     *  operations to locate record in the table.
     * @s session, which should be opened before first access to the table
     */
    public Table(String className, String tableName, Session s, String[] keys) 
    { 
	init(className, tableName, s, keys);
    }

    /** Constructor for table object. Make association between Java class 
     *  and database table. Name of Java class should be the same as name of 
     *  the database table
     *  
     * @param className name of Java class, which should be (without 
     *  package prefix) be the same as the name of database table.
     * @param keys table primary keys. This parameter is used in UPDATE/DELETE
     *  operations to locate record in the table.
     * @s session, which should be opened before first access to the table
     */
    public Table(String className, Session s, String[] keys) {
        init(className, className.substring(className.lastIndexOf('.')+1),
	     s, keys);
    }

    /** Constructor for table object. Make association between Java class 
     *  and database table. Name of Java class should be the same as name of 
     *  the database table
     *  
     * @param className name of Java class, which should be (without 
     *  package prefix) be the same as the name of database table.
     * @param key table primary key. This parameter is used in UPDATE/DELETE
     *  operations to locate record in the table.
     * @s session, which should be opened before first access to the table
     */
    public Table(String className, Session s, String key) {
	String[] keys = {key};
        init(className, className.substring(className.lastIndexOf('.')+1),
	     s, keys);
    }

    /** Constructor of table without explicit key specification.
     *  Specification of key is necessary for update/remove operations. 
     *  If key is not specified, it is inherited from base table (if any).
     */
    public Table(String className, Session s) {
        init(className, className.substring(className.lastIndexOf('.')+1),
	     s, null);
    }


    /** Constructor of table with "key" and "session" parameters inherited 
     *  from base table. 
     */
    public Table(String className) {
        init(className, className.substring(className.lastIndexOf('.')+1),
	     null, null);
    }


    /** Select records from database table according to search condition
     * 
     * @param condition valid SQL condition expression started with WHERE
     *  or empty string if all records should be fetched.
     */
    public final Cursor select(String condition) { 
        return new Cursor(this, session, 1, condition);
    }

    /** Select records from database table according to search condition
     * 
     * @param condition valid SQL condition expression started with WHERE
     *  or empty string if all records should be fetched.
     * @param session user database session
     */
    public final Cursor select(String condition, Session session) { 
        return new Cursor(this, session, 1, condition);
    }

    /** Select records from specified and derived database tables
     * 
     * @param condition valid SQL condition expression started with WHERE
     *  or empty string if all records should be fetched.
     */
    public final Cursor selectAll(String condition) { 
        return new Cursor(this, session, nDerived+1, condition);
    }

    /** Select records from specified and derived database tables
     * 
     * @param condition valid SQL condition expression started with WHERE
     *  or empty string if all records should be fetched.
     * @param session user database session
     */
    public final Cursor selectAll(String condition, Session session) { 
        return new Cursor(this, session, nDerived+1, condition);
    }

    
    /** Select records from database table using <I>obj</I> object as 
     * template for selection. All non-builtin fields of this object,
     * which are not null, are compared with correspondent table values.
     * 
     * @param obj object for construction search condition: selected objects
     *  should match all non-null fields of specified object.
     */
    public final Cursor queryByExample(Object obj) { 
        return new Cursor(this, session, 1, obj);
    }

    /** Select records from database table using <I>obj</I> object as 
     * template for selection. All non-builtin fields of this object,
     * which are not null, are compared with correspondent table values.
     * 
     * @param obj object for construction search condition: selected objects
     *  should match all non-null fields of specified object.
     * @param session user database session
     */
    public final Cursor queryByExample(Object obj, Session session) { 
        return new Cursor(this, session, 1, obj);
    }

    /** Select records from specified and derived database tables using 
     * <I>obj</I> object as template for selection. 
     * All non-builtin fields of this object,
     * which are not null, are compared with correspondent table values.
     * 
     * @param obj object for construction search condition: selected objects
     *  should match all non-null fields of specified object.
     */
    public final Cursor queryAllByExample(Object obj) { 
        return new Cursor(this, session, nDerived+1, obj);
    }

    /** Select records from specified and derived database tables using 
     * <I>obj</I> object as template for selection. 
     * All non-builtin fields of this object,
     * which are not null, are compared with correspondent table values.
     * 
     * @param obj object for construction search condition: selected objects
     *  should match all non-null fields of specified object.
     * @param session user database session
     */
    public final Cursor queryAllByExample(Object obj, Session session) { 
        return new Cursor(this, session, nDerived+1, obj);
    }

    /** Insert new record in the table. Values of inserted record fields 
     *  are taken from specifed object.
     * 
     * @param obj object specifing values of inserted record fields
     */
    public void insert(Object obj) { 
	insert(obj, session);
    }

    /** Insert new record in the table using specified database session. 
     *  Values of inserted record fields 
     *  are taken from specifed object.
     * 
     * @param obj object specifing values of inserted record fields
     * @param session user database session
     */
    public synchronized void insert(Object obj, Session session) { 
	if (session == null) { 
	    session = ((SessionThread)Thread.currentThread()).session;
	}
        try { 
	    checkConnection(session);
	    if (insertStmt == null) { 
	        String sql = "insert into " + name + " (" 
                           + listOfFields + ") values (?";
		for (int i = 1; i < nColumns; i++) {   
                     sql += ",?";
		}
		sql += ")";
	        insertStmt = session.connection.prepareStatement(sql);
   	    }
	    bindUpdateVariables(insertStmt, obj); 	
	    insertStmt.executeUpdate();
	    insertStmt.clearParameters();
	} catch(SQLException ex) { session.handleSQLException(ex); }
    }

    /** Insert several new records in the table. Values of inserted records 
     *  fields are taken from objects of specified array.
     * 
     * @param objects array with objects specifing values of inserted record 
     * fields
     */
    public void insert(Object[] objects) { 
	insert(objects, session);
    }
  
    /** Insert several new records in the table. Values of inserted records 
     *  fields are taken from objects of specified array.
     * 
     * @param objects array with objects specifing values of inserted record 
     *                fields
     * @param session user database session
     */
    public synchronized void insert(Object[] objects, Session session) { 
	if (session == null) { 
	    session = ((SessionThread)Thread.currentThread()).session;
	}
        try { 
	    checkConnection(session);
	    if (insertStmt == null) { 
	        String sql = "insert into " + name + " (" 
                           + listOfFields + ") values (?";
		for (int i = 1; i < nColumns; i++) {   
                     sql += ",?";
		}
		sql += ")";
	        insertStmt = session.connection.prepareStatement(sql);
   	    }
	    for (int i = 0; i < objects.length; i++) { 
  	        bindUpdateVariables(insertStmt, objects[i]); 
	        insertStmt.addBatch();
	    }
	    insertStmt.executeBatch();
	    insertStmt.clearParameters();
	} catch(SQLException ex) { session.handleSQLException(ex); }
    }
  
    /** Update record in the table using table's primary key to locate 
     *  record in the table and values of fields of specified object <I>obj</I>
     *  to alter record fields.
     * 
     * @param obj object specifing value of primary key and new values of 
     *  updated record fields
     * 
     * @return number of objects actually updated
    */
    public int update(Object obj) { 
	return update(obj, session);
    }

    /** Update record in the table using table's primary key to locate 
     *  record in the table and values of fields of specified object <I>obj</I>
     *  to alter record fields.
     * 
     * @param obj object specifing value of primary key and new values of 
     *  updated record fields
     * @param session user database session
     * 
     * @return number of objects actually updated
     */
    public synchronized int update(Object obj, Session session) { 
        if (primaryKeys == null) { 
	    throw new NoPrimaryKeyError(this);
	}
	if (session == null) { 
	    session = ((SessionThread)Thread.currentThread()).session;
	}
	int nUpdated = 0;
        try { 
	    checkConnection(session);
	    if (updateStmt == null) { 
	        String sql = "update " + name + " set " + listOfAssignments 
		           + " where " + primaryKeys[0] + " = ?"; 
		for (int i = 1; i < primaryKeys.length; i++) { 
		    sql += " and " + primaryKeys[i] + " = ?";
		}
		updateStmt = session.connection.prepareStatement(sql);
	    }
	    for (int i = 0; i < primaryKeys.length; i++) { 
		fields[primaryKeyIndices[i]].bindVariable(updateStmt, obj, 
							  nColumns+i+1);
	    } 	
	    bindUpdateVariables(updateStmt, obj); 
	    nUpdated = updateStmt.executeUpdate();
	    updateStmt.clearParameters();
	} catch(SQLException ex) { session.handleSQLException(ex); }
	return nUpdated;
    }

    /** Update set of records in the table using table's primary key to locate 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
黄色小说综合网站| 最新国产の精品合集bt伙计| 一区二区三区四区国产精品| 成人午夜视频网站| 久久精品视频一区二区三区| 国内精品伊人久久久久av影院 | 欧美一区日韩一区| 亚洲一级不卡视频| 欧美亚洲国产一卡| 亚洲综合视频在线| 欧美自拍丝袜亚洲| 亚洲一区二区三区四区五区中文 | 国产一区二区电影| 久久久久久久综合色一本| 国产一区二区视频在线| 精品国免费一区二区三区| 美女国产一区二区| 久久婷婷久久一区二区三区| 韩国v欧美v亚洲v日本v| 国产亚洲欧美日韩在线一区| 9人人澡人人爽人人精品| 亚洲另类色综合网站| 成人白浆超碰人人人人| 国产精品久久久久久亚洲毛片 | 亚洲一级二级三级在线免费观看| 欧美天堂亚洲电影院在线播放| 亚洲国产欧美在线| 日韩一区二区三区av| 国内成人自拍视频| 国产精品入口麻豆九色| 欧美综合亚洲图片综合区| 亚洲成av人片一区二区三区| 精品国产免费一区二区三区四区| 国产一区欧美二区| 日韩一区中文字幕| 欧美一区二区三区在线观看视频| 久久精品国产免费看久久精品| 久久精品亚洲国产奇米99| 91视频观看免费| 青青草97国产精品免费观看无弹窗版| 日韩精品一区二区三区在线观看| 黄一区二区三区| 亚洲天天做日日做天天谢日日欢| 欧美调教femdomvk| 国产经典欧美精品| 亚洲国产裸拍裸体视频在线观看乱了| 在线观看网站黄不卡| 久久国产尿小便嘘嘘尿| 国产精品久久久久久久浪潮网站| 欧美日韩在线播放三区四区| 久久99精品国产麻豆婷婷| 国产精品成人免费| 欧美大片一区二区| 99久久精品免费看| 亚洲福利一区二区三区| 欧美精品一区二区在线观看| 91在线无精精品入口| 蜜桃免费网站一区二区三区 | 久久精品视频免费| 99re热视频精品| 秋霞电影网一区二区| 国产精品丝袜黑色高跟| 日韩视频在线观看一区二区| 国产乱码精品一品二品| 亚洲gay无套男同| 国产精品久久久久三级| 精品国精品国产| 欧美精品视频www在线观看| 国产精品91一区二区| 日本vs亚洲vs韩国一区三区二区| 亚洲日本中文字幕区| 精品99999| 精品视频免费在线| 岛国av在线一区| 九九九精品视频| 日韩成人一级片| 亚洲亚洲精品在线观看| 中文字幕一区二区三区在线不卡 | 亚洲国产高清不卡| 亚洲精品一区在线观看| 欧美精品xxxxbbbb| 国产91精品欧美| 国产在线播放一区二区三区| 日韩电影在线一区二区| 一级特黄大欧美久久久| 1区2区3区精品视频| 久久精品欧美日韩| 久久日一线二线三线suv| 欧美一区二区三区在线| 91国在线观看| 欧美日韩一区视频| 欧美亚洲综合网| 欧美视频第二页| 欧美特级限制片免费在线观看| 91成人看片片| 欧美在线视频日韩| 91久久人澡人人添人人爽欧美| 成人黄色av电影| 成人18精品视频| av综合在线播放| 国产一区二区在线电影| 国产精品1区2区3区在线观看| 午夜精品一区二区三区三上悠亚| 日韩av不卡一区二区| 狠狠色丁香婷婷综合久久片| www.视频一区| 欧美精品久久天天躁| 亚洲精品一线二线三线无人区| 中文字幕第一页久久| 亚洲在线观看免费| 美女视频黄免费的久久| 国产iv一区二区三区| 91久久精品午夜一区二区| 欧美美女一区二区| 久久精品一区八戒影视| 亚洲一区免费在线观看| 国模大尺度一区二区三区| 99精品欧美一区二区三区小说| 欧美日韩国产色站一区二区三区| 久久综合一区二区| 亚洲欧美另类图片小说| 蜜乳av一区二区三区| 97久久精品人人做人人爽| 日韩欧美一二三| 亚洲美女偷拍久久| 国模娜娜一区二区三区| 欧美网站一区二区| 国产精品乱码人人做人人爱| 婷婷一区二区三区| 成人综合婷婷国产精品久久蜜臀| 欧美日韩日日摸| 国产精品免费视频一区| 蜜臀av亚洲一区中文字幕| 97久久久精品综合88久久| 精品国产免费久久| 亚洲成人免费视| 成人av中文字幕| 精品国产乱码91久久久久久网站| 国产精品高清亚洲| 国内精品国产三级国产a久久| 欧美亚男人的天堂| 中文字幕欧美一| 国产成人免费在线视频| 日韩欧美一区二区免费| 亚洲高清免费视频| 在线亚洲欧美专区二区| 国产精品美女久久久久aⅴ | 欧美日韩在线三区| 最新日韩在线视频| 国产一区二区h| 日韩一二三四区| 日韩主播视频在线| 欧美在线综合视频| 亚洲在线观看免费视频| 色综合久久久久网| 亚洲视频 欧洲视频| 成人国产免费视频| 久久精品亚洲精品国产欧美kt∨| 麻豆国产91在线播放| 欧美一区二区免费视频| 性做久久久久久免费观看| 欧洲av在线精品| 一区二区三区加勒比av| 一本色道a无线码一区v| 国产精品国产精品国产专区不蜜| 丰满亚洲少妇av| 国产精品嫩草影院com| 成人app在线| 国产精品不卡一区| 91蜜桃网址入口| 亚洲免费av高清| 在线观看日韩电影| 亚洲国产精品久久不卡毛片| 在线观看视频一区| 五月婷婷激情综合网| 欧美精品久久久久久久多人混战| 视频在线观看91| 欧美一区二区三区不卡| 狠狠狠色丁香婷婷综合激情 | 亚洲国产高清在线| av一区二区久久| 亚洲免费电影在线| 欧美另类久久久品| 麻豆精品视频在线观看| 精品蜜桃在线看| 粉嫩绯色av一区二区在线观看| 中文字幕制服丝袜一区二区三区| 91网站黄www| 午夜激情一区二区| 欧美va亚洲va| www.亚洲色图.com| 午夜在线电影亚洲一区| 精品久久久久99| 成人黄页在线观看| 亚洲乱码中文字幕| 欧美精品vⅰdeose4hd| 国产精品一二三四五| 亚洲人成精品久久久久久| 制服丝袜亚洲播放| 国产成人av一区|