org.dyndns.nuda.mapper
クラス SQLInterfaceFactory

java.lang.Object
  上位を拡張 org.dyndns.nuda.mapper.SQLInterfaceFactory

public class SQLInterfaceFactory
extends java.lang.Object

SQLインタフェースを生成するためのビルダです

作成者:
nkoseki

メソッドの概要
 SQLInterfaceFactory connection(java.sql.Connection con)
          データベースと接続するためのコネクションオブジェクトをビルダに設定します
<T> T
create(java.lang.Class<T> interfaceClass)
          引数に指定されたクラスオブジェクトを元にSQLインタフェースを生成して返します
 SQLInterfaceFactory currentClassLoader(java.lang.ClassLoader currentClassLoader)
          SQLInterfaceを生成するときに用いるクラスローダをビルダに設定します
 SQLInterfaceFactory dataSource(javax.sql.DataSource dataSource)
          データベースと接続するためのでーたソースオブジェクトをビルダに設定します
static SQLInterfaceFactory newInstance()
          このクラスのインスタンスを取得します
 SQLInterfaceFactory useAutoCommit(boolean useAutoCommit)
          ビルダに自動コミットモードフラグを設定します
 SQLInterfaceFactory useManualTransaction(boolean useManualTransaction)
          ビルダにユーザベーストランザクション制御フラグを設定します
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

メソッドの詳細

newInstance

public static SQLInterfaceFactory newInstance()
このクラスのインスタンスを取得します

戻り値:
SQLInterfaceFactory

create

public <T> T create(java.lang.Class<T> interfaceClass)
引数に指定されたクラスオブジェクトを元にSQLインタフェースを生成して返します

型パラメータ:
T - SQLインタフェース型
パラメータ:
interfaceClass - SQLインタフェースクラスオブジェクト
戻り値:
SQLインタフェースインスタンス

connection

public SQLInterfaceFactory connection(java.sql.Connection con)
データベースと接続するためのコネクションオブジェクトをビルダに設定します

パラメータ:
con - コネクションオブジェクト
戻り値:
自身のインスタンス

dataSource

public SQLInterfaceFactory dataSource(javax.sql.DataSource dataSource)
データベースと接続するためのでーたソースオブジェクトをビルダに設定します

パラメータ:
dataSource - データソース
戻り値:
自身のインスタンス

useAutoCommit

public SQLInterfaceFactory useAutoCommit(boolean useAutoCommit)
ビルダに自動コミットモードフラグを設定します

パラメータ:
useAutoCommit - 自動コミットモードをONにする:true / 自動コミットモードをOFFにする:false
戻り値:
自身のインスタンス

useManualTransaction

public SQLInterfaceFactory useManualTransaction(boolean useManualTransaction)
ビルダにユーザベーストランザクション制御フラグを設定します

パラメータ:
useManualTransaction - ユーザベーストランザクション制御を使用する:true / ユーザベーストランザクション制御を使用しない:false
戻り値:
自身のインスタンス

currentClassLoader

public SQLInterfaceFactory currentClassLoader(java.lang.ClassLoader currentClassLoader)
SQLInterfaceを生成するときに用いるクラスローダをビルダに設定します

パラメータ:
currentClassLoader - クラスローダ
戻り値:
自身のインスタンス