001 /* 002 * Copyright (c) 2009 The openGion Project. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 013 * either express or implied. See the License for the specific language 014 * governing permissions and limitations under the License. 015 */ 016 package org.opengion.hayabusa.db; 017 018 import java.sql.SQLData; 019 import java.sql.SQLInput; 020 import java.sql.SQLOutput; 021 import java.sql.SQLException; 022 023 /** 024 * SQLData インターフェースを継承した シス?変数の受け渡し用オブジェクトです? 025 * 行番号??と改?ード[A:追?C:変更/D:削除]を持って?す? 026 * 027 * @og.group ??/Shell制御 028 * 029 * @version 4.0 030 * @author Kazuhiko Hasegawa 031 * @since JDK5.0, 032 */ 033 public class DBSysArg implements SQLData { 034 private String sql_type ; 035 036 private int lineNo; 037 private String codeKaihai; 038 private String curdate; // 4.3.0.0 (2008/07/22) 039 private String pgid; // 4.3.0.0 (2008/07/22) 040 private String userid; // 4.3.0.0 (2008/07/22) 041 042 /** 043 * ?ォルトコンストラクター 044 */ 045 public DBSysArg() { 046 sql_type = null; 047 lineNo = -1; 048 codeKaihai = null; 049 curdate = null; 050 pgid = null; 051 userid = null; 052 } 053 054 /** 055 * すべての属???を指定して、新しい DBSysArg オブジェクトを作?します? 056 * 057 * @og.rev 4.3.0.0 (2008/07/22) 引数に日付?PG、ユーザーIDを追? 058 * 059 * @param type ??タベ?スタイプ文字? 060 * @param no 行番号 061 * @param cdkh 改?ー?A:追?C:変更 D:削除 062 * @param time 現在時間の?? 063 * @param pg プログラ?称 064 * @param user ユーザーID 065 */ 066 // public DBSysArg( final String type,final int no,final String cdkh ) { 067 public DBSysArg( final String type,final int no,final String cdkh, final String time, final String pg, final String user ) { 068 sql_type = type; 069 lineNo = no; 070 codeKaihai = cdkh; 071 curdate = time; 072 pgid = pg; 073 userid = user; 074 } 075 076 // ============================================================ 077 // implements SQLData 078 // ============================================================ 079 080 /** 081 * ???タイプ???を返します? 082 * 083 * @return ???タイプ??? 084 * @throws SQLException ※ こ?実?ら? SQLException は、throw されません? 085 */ 086 public String getSQLTypeName() throws SQLException { 087 return sql_type; 088 } 089 090 /** 091 * ??タベ?ス?より?属?を取得し、オブジェクトを構築します? 092 * 093 * @og.rev 4.3.0.0 (2008/07/22) 日付?PG、ユーザーIDを追? 094 * 095 * @param stream ストリー? 096 * @param typeName ???タイプ??? 097 * @throws SQLException ??タベ?スアクセスエラー 098 */ 099 public void readSQL( final SQLInput stream, final String typeName ) throws SQLException { 100 sql_type = typeName; 101 102 lineNo = stream.readInt(); 103 codeKaihai = stream.readString(); 104 curdate = stream.readString(); 105 pgid = stream.readString(); 106 userid = stream.readString(); 107 } 108 109 /** 110 * ??タベ?ス?に?属?を設定します? 111 * 112 * @og.rev 4.3.0.0 (2008/07/22) 日付?PG、ユーザーIDを追? 113 * 114 * @param stream ストリー? 115 * @throws SQLException ??タベ?スアクセスエラー 116 */ 117 public void writeSQL( final SQLOutput stream ) throws SQLException { 118 stream.writeInt( lineNo ); 119 stream.writeString( codeKaihai ); 120 stream.writeString( curdate ); 121 stream.writeString( pgid ); 122 stream.writeString( userid ); 123 } 124 }