jp.co.quickbinder.api.common.tools
クラス Tools

java.lang.Object
  上位を拡張 jp.co.quickbinder.api.common.tools.Tools

public class Tools
extends Object

ツールクラス

 便利な関数を管理します。
 


コンストラクタの概要
Tools()
          コンストラクタ
 
メソッドの概要
 String dateToString(Date date)
          yyyy/MM/dd|HH:mm:ssフォーマットの日時文字列を生成します。
 String getDivisionID(String dataid, String uniqueid)
          IDを分割して返却します。
 Date getReckoningDate(Date dt, int baseMonth, int afterYear)
          指定日付の指定の年数後の起算年月日の取得
 String getSqlForReadOnly()
          DB2用のSQL文字列の取得 FOR READ ONLYの文字列を返却し未コミットのデータを取得できるようにする(デットロック回避の為) DB2以外は''(空文字列)を返却
 String getSqlWithUR()
          DB2用のSQL文字列の取得 'WITH UR'の文字列を返却し未コミットのデータを取得できるようにする(デットロック回避の為) DB2以外は''(空文字列)を返却
 boolean isNull(String str)
          引数をNull判定します。
 void putlog(String logtype, String logcomment, String userid, String dbid, String treeid, String dataid, int beforeFlg)
          ログ出力
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

Tools

public Tools()
コンストラクタ

メソッドの詳細

isNull

public boolean isNull(String str)
引数をNull判定します。

パラメータ:
str - 文字列
戻り値:
{boolean}true(null) false(not null)

dateToString

public String dateToString(Date date)
yyyy/MM/dd|HH:mm:ssフォーマットの日時文字列を生成します。

パラメータ:
date - 日時
戻り値:
yyyy/MM/dd|HH:mm:ssフォーマットの日時文字列

getSqlWithUR

public String getSqlWithUR()
DB2用のSQL文字列の取得 'WITH UR'の文字列を返却し未コミットのデータを取得できるようにする(デットロック回避の為) DB2以外は''(空文字列)を返却

戻り値:
DB2の場合、' WITH UR'の文字列。DB2以外は''を返却

getSqlForReadOnly

public String getSqlForReadOnly()
DB2用のSQL文字列の取得 FOR READ ONLYの文字列を返却し未コミットのデータを取得できるようにする(デットロック回避の為) DB2以外は''(空文字列)を返却

戻り値:
DB2の場合、' FOR READ ONLY'の文字列。DB2以外は''を返却

getDivisionID

public String getDivisionID(String dataid,
                            String uniqueid)
IDを分割して返却します。

パラメータ:
dataid - [必須] データID
uniqueid - [任意] ユニークID
戻り値:
ret([dataIDの先頭3バイト]"/"[dataIDの次の3バイト]"/"[dataIDの次の3バイト])

getReckoningDate

public Date getReckoningDate(Date dt,
                             int baseMonth,
                             int afterYear)
指定日付の指定の年数後の起算年月日の取得

パラメータ:
dt - 指定日付
baseMonth - 起算月
afterYear - 指定日付の何年後かを指定
戻り値:
{Date} 指定年数後の起算年月日

putlog

public void putlog(String logtype,
                   String logcomment,
                   String userid,
                   String dbid,
                   String treeid,
                   String dataid,
                   int beforeFlg)
ログ出力

パラメータ:
logtype - ログタイプ
logcomment - ログコメント
userid - ユーザID
dbid - DBID
treeid - 階層ID
dataid - データID
beforeFlg - 更新テーブル・フラグ(1:未公開テーブル 0:公開中テーブル)