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.plugin.table;
017
018 /**
019 * TableFilter_INDEX_HSQLDB ã�¯ã€�TableUpda インターフェースを継承ã�—ã�Ÿã€�DBTableModel 処ç�?”¨ã�®
020 * 実è£?‚¯ãƒ©ã‚¹ã�§ã�™ã?ã�¨ã��ã�«ã€�HSQLDB用ã�®ã‚¤ãƒ³ãƒ?ƒƒã‚¯ã‚¹ä½œæ?スクリプトを作æ?ã�—ã�¾ã�™ã?
021 *
022 * ã�“ã�“ã�§ã�¯ã€�テーブルä¸?¦§ã�®æ¤œç´¢çµ�果よりã€�GF07 ã�®ã‚¤ãƒ³ãƒ?ƒƒã‚¯ã‚¹ã‚«ãƒ©ãƒ?®šç¾©ãƒ??ブルã�‹ã‚‰
023 * å¿?¦�ã�ªæƒ??ã‚’å�–å¾—ã�—ã€�テーブル作æ?スクリプトを作æ?ã�—ã�¾ã�™ã?
024 * 出力ファイルã�¯ã€�テーブルå��ï¼?I.sql" ã�¨ã�?�†å‘½å��è¦�則ã�§ä½œæ?ã�—ã�¾ã�™ã?
025 * 検索���SYSTEM_ID,TBLSYU,TABLE_NAME,NAME_JA,TABLESPACE_NAME,INITIAL_EXTENT,NEXT_EXTENT,COMMENTS)
026 * ã�®é ?›®ã‚’å�–å¾—ã�™ã‚‹å¿?¦�ã�Œã�‚りã�¾ã�™ã?
027 *
028 * @og.rev 4.0.0.0 (2005/08/31) æ–°è¦�作æ?
029 *
030 * @version 0.9.0 2000/10/17
031 * @author Kazuhiko Hasegawa
032 * @since JDK1.1,
033 */
034 public class TableFilter_INDEX_HSQLDB extends TableFilter_INDEX {
035 //* ã�“ã?プãƒã‚°ãƒ©ãƒ??VERSIONæ–?—å?ã‚’è¨å®šã�—ã�¾ã�™ã? {@value} */
036 private static final String VERSION = "5.7.2.0 (2014/01/10)" ;
037
038 // 5.7.2.0 (2014/01/10) 特別処ç�?isXml=true ã�®æ™‚ã�«ã€�UNIQ ã�®ã�Ÿã‚�ã€�å?ç�?�—ã�ªã�‹ã�£ã�Ÿå?å�ˆã?ã€�EXEC_END_TAG ã‚’å?ã�•ã�ªã�??
039 private boolean useUniq = false;
040
041 /**
042 * インãƒ?ƒƒã‚¯ã‚¹ä½œæ?ã�®å‡¦ç�?‚’実行ã�—ã�¾ã�™ã?
043 *
044 * ã�Ÿã� ã�—ã?UNIQ ã�¨ UNIQSEQ ã�«ã�¯ã€�IDENTITY を付ã�‘ã�¦ã�?‚‹ç‚ºã€�PRIMARY KEY 制ç´?‚’付ã�‘ã�¾ã�›ã‚“ã€?
045 *
046 * @og.rev 5.7.2.0 (2014/01/10) ??½°?Œï¾žï¾™ä½œæ?時ã�«ã€�IDENTITY を付ã�‘ã�¦ã�?‚‹å ´å�ˆã?ã€�PRIMARY KEY 制ç´?‚’付ã�‘ã�ªã�??
047 *
048 * @param clmNo カラãƒ?•ªå�·é…�å?
049 * @param data ?‘行å?ã�®ãƒ??ã‚¿é…�å?
050 * @param clms カラ���(CSV形�
051 *
052 * @return 作æ?ã�•れã�Ÿï¼‘行å?ã�®æ–?—å?
053 */
054 @Override
055 protected String makeLineList( final int[] clmNo,final String[] data,final String clms ) {
056
057 // 5.7.2.0 (2014/01/10) IDENTITY を付ã�‘ã‚‹æ�¡ä»¶ã�¨å�Œã�˜åˆ¤å®šåŸºæº–を使ã�?�¾ã�™ã?
058 // ※ useUniq ?Œï¾—ク?žã?ã€�makeEndLine メソãƒ?ƒ‰ã�®æ�¡ä»¶åˆ¤å®šã�«ã‚‚使ã�?�¾ã�™ã?
059 useUniq = ( "UNIQ".equalsIgnoreCase( clms ) || "UNIQSEQ".equalsIgnoreCase( clms ) );
060
061 return (useUniq) ? "" : super.makeLineList( clmNo,data,clms );
062 }
063
064 /**
065 * 定義ã�®æœ?¾Œã?部åˆ??処ç�?‚’実行ã�—ã�¾ã�™ã?
066 *
067 * @og.rev 5.7.2.0 (2014/01/10) UNIQ カラãƒ?�§ã€�å?ç�?�—ã�ªã�‹ã�£ã�Ÿå?å�ˆã?ã€�EXEC_END_TAG ã‚’å?ã�•ã�ªã�??
068 *
069 * @param clmNo カラãƒ?•ªå�·é…�å?
070 * @param data ?‘行å?ã�®ãƒ??ã‚¿é…�å?
071 *
072 * @return 定義ã�®æœ?¾Œã?部åˆ?
073 */
074 @Override
075 protected String makeEndLine( final int[] clmNo,final String[] data ) {
076 // return ";";
077 // return ( isXml ? EXEC_END_TAG : ";" );
078
079 return (useUniq) ? "" : ( isXml ? EXEC_END_TAG : ";" );
080
081 }
082 }