org.seasar.extension.jdbc.gen.internal.sql
クラス SqlFileReader.SqlBuilder

java.lang.Object
  上位を拡張 org.seasar.extension.jdbc.gen.internal.sql.SqlFileReader.SqlBuilder
含まれているクラス:
SqlFileReader

protected class SqlFileReader.SqlBuilder
extends java.lang.Object

SQLのビルダです。

作成者:
taedium

フィールドの概要
protected  java.lang.StringBuilder buf
          SQLの文字列を保持するバッファ
protected  boolean completed
          SQLの組み立てが完了した場合true
protected  boolean lineChanged
          行が変更された場合true
protected  boolean lineRequired
          次の行が必要な場合true
protected  GenDialect.SqlBlockContext sqlBlockContext
          SQLブロックのコンテキスト
protected  boolean tokenRequired
          次のトークンが必要な場合true
protected  java.util.List<java.lang.String> wordList
          SQLのキーワードを管理するリスト
 
コンストラクタの概要
protected SqlFileReader.SqlBuilder()
          インスタンスを構築します
 
メソッドの概要
protected  void appendToken(java.lang.String token)
          トークンを追加します。
protected  void appendWhitespaceIfNecessary()
          必要ならば空白を追加します。
protected  void appendWord(java.lang.String word)
          単語を追加します。
protected  void build(SqlFileTokenizer.TokenType tokenType, java.lang.String token)
          SQL文を組み立てます。
protected  void complete()
          SQLの組み立てを完了します。
protected  java.lang.String getSql()
          SQLを返します。
protected  boolean isCompleted()
          SQLの組み立てが完了した場合trueを返します。
protected  boolean isInSqlBlock()
          SQLブロックの内側を組み立てている場合trueを返します。
protected  boolean isLineRequired()
          次の行が必要な場合trueを返します。
protected  boolean isSqlEmpty()
          SQLが空の場合trueを返します。
protected  boolean isTokenRequired()
          次のトークンが必要な場合trueを返します。
protected  void notifyLineChanged()
          行が変更されたことを通知します。
protected  void requireLine()
          次の行を要求します。
protected  void requireToken()
          次のトークンを要求します。
protected  void reset()
          リセットします。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

tokenRequired

protected boolean tokenRequired
次のトークンが必要な場合true


lineRequired

protected boolean lineRequired
次の行が必要な場合true


completed

protected boolean completed
SQLの組み立てが完了した場合true


buf

protected java.lang.StringBuilder buf
SQLの文字列を保持するバッファ


wordList

protected java.util.List<java.lang.String> wordList
SQLのキーワードを管理するリスト


sqlBlockContext

protected GenDialect.SqlBlockContext sqlBlockContext
SQLブロックのコンテキスト


lineChanged

protected boolean lineChanged
行が変更された場合true

コンストラクタの詳細

SqlFileReader.SqlBuilder

protected SqlFileReader.SqlBuilder()
インスタンスを構築します

メソッドの詳細

build

protected void build(SqlFileTokenizer.TokenType tokenType,
                     java.lang.String token)
SQL文を組み立てます。

パラメータ:
tokenType - トークンのタイプ
token - トークン

reset

protected void reset()
リセットします。


isTokenRequired

protected boolean isTokenRequired()
次のトークンが必要な場合trueを返します。

戻り値:
次のトークンが必要な場合true

requireToken

protected void requireToken()
次のトークンを要求します。


isLineRequired

protected boolean isLineRequired()
次の行が必要な場合trueを返します。

戻り値:
次の行が必要な場合true

requireLine

protected void requireLine()
次の行を要求します。


isCompleted

protected boolean isCompleted()
SQLの組み立てが完了した場合trueを返します。

戻り値:
SQLの組み立てが完了した場合true

complete

protected void complete()
SQLの組み立てを完了します。


appendWord

protected void appendWord(java.lang.String word)
単語を追加します。

パラメータ:
word - 単語

appendToken

protected void appendToken(java.lang.String token)
トークンを追加します。

パラメータ:
token - トークン

appendWhitespaceIfNecessary

protected void appendWhitespaceIfNecessary()
必要ならば空白を追加します。


notifyLineChanged

protected void notifyLineChanged()
行が変更されたことを通知します。


isInSqlBlock

protected boolean isInSqlBlock()
SQLブロックの内側を組み立てている場合trueを返します。

戻り値:
SQLブロックの内側を組み立てている場合true

isSqlEmpty

protected boolean isSqlEmpty()
SQLが空の場合trueを返します。

戻り値:
SQLが空の場合true

getSql

protected java.lang.String getSql()
SQLを返します。

戻り値:


Copyright © 2004-2014 The Seasar Foundation. All Rights Reserved.