[Jiemamy-notify] commit [1906] Dialectインターフェイスを整備。 /

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2008年 9月 10日 (水) 20:32:30 JST


Revision: 1906
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=jiemamy&view=rev&rev=1906
Author:   daisuke_m
Date:     2008-09-10 20:32:30 +0900 (Wed, 10 Sep 2008)

Log Message:
-----------
Dialectインターフェイスを整備。 /
ForEachUtilに例外スロー機構を搭載。

Modified Paths:
--------------
    artemis/trunk/org.jiemamy.composer/src/main/java/org/jiemamy/composer/importer/DatabaseImporter.java
    artemis/trunk/org.jiemamy.core/META-INF/MANIFEST.MF
    artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/exception/IllegalDataTypeMappingException.java
    artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/Dialect.java
    artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/interpreter/DatabaseReader.java
    artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/model/typedef/datatype/SpecialDataType.java
    artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/utils/ForEachUtil.java
    artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/utils/visitor/AbstractCollectionVisitor.java
    artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/utils/visitor/AbstractMapVisitor.java
    artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/utils/visitor/AbstractResultSetVisitor.java
    artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/utils/visitor/impl/EntityNamesVisitor.java
    artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/utils/visitor/impl/PrimaryKeyVisitor.java
    artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/utils/visitor/impl/SizeVisitor.java
    artemis/trunk/org.jiemamy.core/src/test/java/org/jiemamy/core/model/typedef/datatype/impl/IntegerDataTypeMock.java
    artemis/trunk/org.jiemamy.core/src/test/java/org/jiemamy/core/model/typedef/datatype/impl/NumericDataTypeMock.java
    artemis/trunk/org.jiemamy.core/src/test/java/org/jiemamy/core/model/typedef/datatype/impl/TimestampDataTypeMock.java
    artemis/trunk/org.jiemamy.core/src/test/java/org/jiemamy/core/model/typedef/datatype/impl/VarcharDataTypeMock.java
    artemis/trunk/org.jiemamy.dialect/src/main/java/org/jiemamy/dialect/AbstractDialect.java
    artemis/trunk/org.jiemamy.dialect/src/main/java/org/jiemamy/dialect/DefaultQuoter.java
    artemis/trunk/org.jiemamy.dialect/src/main/java/org/jiemamy/dialect/generic/GeneralDialect.java
    artemis/trunk/org.jiemamy.dialect/src/main/java/org/jiemamy/dialect/generic/GenericReservedWords.java
    artemis/trunk/org.jiemamy.dialect.mysql/src/main/java/org/jiemamy/dialect/mysql/MySqlDialect.java
    artemis/trunk/org.jiemamy.dialect.mysql/src/main/java/org/jiemamy/dialect/mysql/MySqlReservedWords.java
    artemis/trunk/org.jiemamy.dialect.mysql/src/main/java/org/jiemamy/dialect/mysql/datatype/IntegerDataType.java
    artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/PostgresqlDialect.java
    artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/PostgresqlQuoter.java
    artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/PostgresqlReservedWords.java
    artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/BigIntegerDataType.java
    artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/BigSerialDataType.java
    artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/BitDataType.java
    artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/BlobDataType.java
    artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/BooleanDataType.java
    artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/CharacterDataType.java
    artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/DateDataType.java
    artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/DecimalDataType.java
    artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/DoubleDataType.java
    artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/FloatDataType.java
    artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/IntegerDataType.java
    artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/IntervalDataType.java
    artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/MoneyDataType.java
    artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/NumericDataType.java
    artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/RealDataType.java
    artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/SerialDataType.java
    artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/SmallIntegerDataType.java
    artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/TextDataType.java
    artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/TimeDataType.java
    artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/TimestampDataType.java
    artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/VarbitDataType.java
    artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/VarcharDataType.java
    artemis/trunk/org.jiemamy.dialect.postgresql/src/test/java/org/jiemamy/dialect/postgresql/PostgresqlDialectTest.java
    artemis/trunk/org.jiemamy.dialect.sql99/src/main/java/org/jiemamy/dialect/sql99/Sql99Dialect.java
    artemis/trunk/org.jiemamy.dialect.sql99/src/main/java/org/jiemamy/dialect/sql99/Sql99ReservedWords.java

Added Paths:
-----------
    artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/advisor/
    artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/advisor/ConnectionAdvisor.java
    artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/advisor/DefaultConnectionAdvisor.java
    artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/mapping/
    artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/mapping/DataTypeMapping.java
    artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/mapping/GeneralDataTypeMapping.java
    artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/mapping/MappingInfo.java
    artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/mapping/SpecialDataTypeMapping.java
    artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/quoter/
    artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/quoter/Quoter.java
    artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/validator/
    artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/validator/AbstractIdentifierValidator.java
    artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/validator/IdentifierValidator.java
    artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/validator/ReservedWordsProvider.java
    artemis/trunk/org.jiemamy.dialect/src/main/java/org/jiemamy/dialect/generic/GenericValidator.java
    artemis/trunk/org.jiemamy.dialect.mysql/src/main/java/org/jiemamy/dialect/mysql/MySqlIdentifierValidator.java
    artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/PostgresqlIdentifierValidator.java
    artemis/trunk/org.jiemamy.dialect.sql99/src/main/java/org/jiemamy/dialect/sql99/Sql99IdentifierValidator.java

Removed Paths:
-------------
    artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/DataTypeMapping.java
    artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/GeneralDataTypeMapping.java
    artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/MappingInfo.java
    artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/Quoter.java
    artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/SpecialDataTypeMapping.java
    artemis/trunk/org.jiemamy.dialect/src/main/java/org/jiemamy/dialect/generic/ReservedWordsProvider.java


-------------- next part --------------
Modified: artemis/trunk/org.jiemamy.composer/src/main/java/org/jiemamy/composer/importer/DatabaseImporter.java
===================================================================
--- artemis/trunk/org.jiemamy.composer/src/main/java/org/jiemamy/composer/importer/DatabaseImporter.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.composer/src/main/java/org/jiemamy/composer/importer/DatabaseImporter.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -86,8 +86,7 @@
 		
 		Connection connection = null;
 		try {
-			// FIXME instanceofじゃダメなんだよな。でもこれダサイw
-			if (GeneralDialect.class.getName().equals(dialect.getClass().getName())) {
+			if (dialect instanceof GeneralDialect) {
 				throw new GenericModelingModeException();
 			}
 			
@@ -106,11 +105,8 @@
 			
 			DatabaseReader reader = new DatabaseReader(dialect, readingCtx);
 			
-			Exception e;
-			e = reader.readEnities(connection, new EntityImportVisitor(connection, rootModel, ctx));
-			throwIfNotNull(e);
-			e = reader.readRelations(connection, new RelationImportVisitor(connection, rootModel, ctx));
-			throwIfNotNull(e);
+			reader.readEnities(connection, new EntityImportVisitor(connection, rootModel, ctx));
+			reader.readRelations(connection, new RelationImportVisitor(connection, rootModel, ctx));
 		} catch (RuntimeException e) {
 			// ランタイムは再スロー
 			throw e;
@@ -135,7 +131,7 @@
 	 * {@link DatabaseReader}に対するストラテジとも言える。
 	 * @author daisuke
 	 */
-	class EntityImportVisitor extends AbstractResultSetVisitor<Exception> {
+	class EntityImportVisitor extends AbstractResultSetVisitor<Void> {
 		
 		/** DB接続 */
 		private Connection connection;
@@ -175,16 +171,12 @@
 		/**
 		 * {@inheritDoc}
 		 */
-		public Exception visit(ResultSet entity) {
-			try {
-				if (entityTypes.contains(entity.getString("TABLE_TYPE"))
-						&& selectedEntities.contains(entity.getString("TABLE_NAME"))) {
-					AbstractEntityModel entityModel = dialect.createEntity(rootModel, entity, connection);
-					entityModel.setDescription(entity.getString("REMARKS"));
-					rootModel.getNodes().add(entityModel);
-				}
-			} catch (SQLException e) {
-				return e;
+		public Void visit(ResultSet entity) throws SQLException {
+			if (entityTypes.contains(entity.getString("TABLE_TYPE"))
+					&& selectedEntities.contains(entity.getString("TABLE_NAME"))) {
+				AbstractEntityModel entityModel = dialect.createEntity(rootModel, entity, connection);
+				entityModel.setDescription(entity.getString("REMARKS"));
+				rootModel.getNodes().add(entityModel);
 			}
 			return null;
 		}
@@ -195,7 +187,7 @@
 	 * {@link DatabaseReader}に対するストラテジとも言える。
 	 * @author daisuke
 	 */
-	class RelationImportVisitor extends AbstractResultSetVisitor<Exception> {
+	class RelationImportVisitor extends AbstractResultSetVisitor<Void> {
 		
 		/** DB接続 */
 		@SuppressWarnings("unused")
@@ -222,14 +214,14 @@
 		/**
 		 * {@inheritDoc}
 		 */
-		public Exception visit(ResultSet keys) {
+		public Void visit(ResultSet keys) throws SQLException {
+			String fkName = keys.getString("FK_NAME");
+			String fkTableName = keys.getString("FKTABLE_NAME");
+			String fkColumnName = keys.getString("FKCOLUMN_NAME");
+			String pkTableName = keys.getString("PKTABLE_NAME");
+			String pkColumnName = keys.getString("PKCOLUMN_NAME");
+			
 			try {
-				String fkName = keys.getString("FK_NAME");
-				String fkTableName = keys.getString("FKTABLE_NAME");
-				String fkColumnName = keys.getString("FKCOLUMN_NAME");
-				String pkTableName = keys.getString("PKTABLE_NAME");
-				String pkColumnName = keys.getString("PKCOLUMN_NAME");
-				
 				TableModel source = rootModel.process(new GetTableProcessor(fkTableName));
 				TableModel target = rootModel.process(new GetTableProcessor(pkTableName));
 				
@@ -252,9 +244,8 @@
 					fkModels.put(fkName, fkModel);
 				}
 			} catch (TooManyElementsException e) {
-				return e;
-			} catch (SQLException e) {
-				return e;
+				// TODO Auto-generated catch block
+				e.printStackTrace();
 			}
 			return null;
 		}

Modified: artemis/trunk/org.jiemamy.core/META-INF/MANIFEST.MF
===================================================================
--- artemis/trunk/org.jiemamy.core/META-INF/MANIFEST.MF	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.core/META-INF/MANIFEST.MF	2008-09-10 11:32:30 UTC (rev 1906)
@@ -251,8 +251,12 @@
  org.jiemamy.core.event.model,
  org.jiemamy.core.exception,
  org.jiemamy.core.extension.dialect,
+ org.jiemamy.core.extension.dialect.advisor,
+ org.jiemamy.core.extension.dialect.mapping,
  org.jiemamy.core.extension.dialect.parser,
  org.jiemamy.core.extension.dialect.parser.expression,
+ org.jiemamy.core.extension.dialect.quoter,
+ org.jiemamy.core.extension.dialect.validator,
  org.jiemamy.core.extension.exporter,
  org.jiemamy.core.extension.importer,
  org.jiemamy.core.interpreter,

Modified: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/exception/IllegalDataTypeMappingException.java
===================================================================
--- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/exception/IllegalDataTypeMappingException.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/exception/IllegalDataTypeMappingException.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -18,7 +18,7 @@
  */
 package org.jiemamy.core.exception;
 
-import org.jiemamy.core.extension.dialect.DataTypeMapping;
+import org.jiemamy.core.extension.dialect.mapping.DataTypeMapping;
 import org.jiemamy.core.model.typedef.datatype.AbstractDataType;
 
 /**

Deleted: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/DataTypeMapping.java
===================================================================
--- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/DataTypeMapping.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/DataTypeMapping.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -1,72 +0,0 @@
-/*
- * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others.
- * Created on 2008/08/30
- *
- * This file is part of Jiemamy.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
- * either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-package org.jiemamy.core.extension.dialect;
-
-import java.util.List;
-
-import org.jiemamy.core.exception.DataTypeNotFoundException;
-import org.jiemamy.core.model.typedef.datatype.DataType;
-import org.jiemamy.core.model.typedef.datatype.GeneralDataType;
-import org.jiemamy.core.model.typedef.datatype.AbstractDataType;
-import org.jiemamy.core.model.typedef.datatype.SpecialDataType;
-
-/**
- * データ型同士の対応関係(マッピング)を表現するクラス。
- * @author daisuke
- */
-public interface DataTypeMapping {
-	
-	/**
-	 * 登録されたデータ型を全て取得する。
-	 * @return 登録されたデータ型のリスト
-	 */
-	public List<Class<? extends AbstractDataType>> getAllModelingDataTypes();
-	
-	/**
-	 * データ型から型名を取得する。
-	 * @param dataType データ型
-	 * @return 型名
-	 */
-	public String getTypeName(DataType dataType);
-	
-	/**
-	 * 特殊データ型から一般データ型を取得する。
-	 * 
-	 * <p>この時、多くの情報が失われることに注意して使用する。</p>
-	 * 
-	 * @param specialDataType 特殊データ型
-	 * @return 一般データ型
-	 */
-	public GeneralDataType resolveGeneralDataType(SpecialDataType specialDataType);
-	
-	/**
-	 * 一般データ型から特殊データ型を取得する。
-	 * @param generalDataType 一般データ型
-	 * @return 特殊データ型
-	 */
-	public SpecialDataType resolveSpecialDataType(GeneralDataType generalDataType);
-	
-	/**
-	 * 型名から特殊データ型
-	 * @param typeName 型名
-	 * @return 特殊データ型
-	 * @throws DataTypeNotFoundException 該当するデータ型が存在しない場合。
-	 */
-	public SpecialDataType resolveSpecialDataType(String typeName) throws DataTypeNotFoundException;
-}

Modified: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/Dialect.java
===================================================================
--- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/Dialect.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/Dialect.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -22,7 +22,11 @@
 import java.sql.ResultSet;
 import java.sql.SQLException;
 
+import org.jiemamy.core.extension.dialect.advisor.ConnectionAdvisor;
+import org.jiemamy.core.extension.dialect.mapping.DataTypeMapping;
 import org.jiemamy.core.extension.dialect.parser.ModelParser;
+import org.jiemamy.core.extension.dialect.quoter.Quoter;
+import org.jiemamy.core.extension.dialect.validator.IdentifierValidator;
 import org.jiemamy.core.model.RootModel;
 import org.jiemamy.core.model.node.AbstractEntityModel;
 
@@ -43,7 +47,13 @@
 	AbstractEntityModel createEntity(RootModel rootModel, ResultSet entity, Connection connection) throws SQLException;
 	
 	/**
-	 * モデリング用DataType・汎用型・{@link java.sql.Types}の値・文字列間のマッピング情報を取得する。
+	 * このSQL方言用の{@link ConnectionAdvisor}を取得する。
+	 * @return {@link ConnectionAdvisor}
+	 */
+	ConnectionAdvisor getAdvisor();
+	
+	/**
+	 * モデリング用DataType・一般型・型名間のマッピング情報を取得する。
 	 * @return マッピング情報
 	 */
 	DataTypeMapping getDataTypeMapping();
@@ -61,22 +71,8 @@
 	Quoter getQuoter();
 	
 	/**
-	 * 指定した語が、識別子として適切かどうかを調べる。
-	 * 
-	 * @param word 語
-	 * @return 適切であればtrue
+	 * このSQL方言用の{@link IdentifierValidator}を取得する。
+	 * @return {@link IdentifierValidator}
 	 */
-	boolean isValidIdentifier(String word);
-	
-	/**
-	 * エンティティ・リレーションの読み出し前に行うべき処理。
-	 * @param connection DB接続
-	 */
-	void setUpRead(Connection connection);
-	
-	/**
-	 * エンティティ・リレーションの読み出し後に行うべき処理。
-	 * @param connection DB接続
-	 */
-	void tearDownRead(Connection connection);
+	IdentifierValidator getValidator();
 }

Deleted: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/GeneralDataTypeMapping.java
===================================================================
--- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/GeneralDataTypeMapping.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/GeneralDataTypeMapping.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -1,83 +0,0 @@
-/*
- * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others.
- * Created on 2008/08/30
- *
- * This file is part of Jiemamy.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
- * either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-package org.jiemamy.core.extension.dialect;
-
-import java.util.List;
-
-import org.seasar.framework.util.tiger.CollectionsUtil;
-
-import org.jiemamy.core.exception.DataTypeNotFoundException;
-import org.jiemamy.core.model.typedef.datatype.DataType;
-import org.jiemamy.core.model.typedef.datatype.GeneralDataType;
-import org.jiemamy.core.model.typedef.datatype.AbstractDataType;
-import org.jiemamy.core.model.typedef.datatype.SpecialDataType;
-
-/**
- * 一般SQL方言における、データ型同士のマッピング情報を保持するクラス。
- * @author daisuke
- */
-public class GeneralDataTypeMapping implements DataTypeMapping {
-	
-	private List<Class<? extends AbstractDataType>> entries = CollectionsUtil.newArrayList();
-	
-
-	/**
-	 * {@inheritDoc}
-	 */
-	public List<Class<? extends AbstractDataType>> getAllModelingDataTypes() {
-		return entries;
-	}
-	
-	/**
-	 * {@inheritDoc}
-	 */
-	public String getTypeName(DataType dataType) {
-		return dataType.toString();
-	}
-	
-	/**
-	 * ジェネリックデータ型を登録する。
-	 * @param clazz データ型クラス
-	 */
-	public void register(Class<? extends GeneralDataType> clazz) {
-		entries.add(clazz);
-	}
-	
-	/**
-	 * {@inheritDoc}
-	 */
-	public GeneralDataType resolveGeneralDataType(SpecialDataType specialDataType) {
-		throw new UnsupportedOperationException();
-	}
-	
-	/**
-	 * {@inheritDoc}
-	 */
-	public SpecialDataType resolveSpecialDataType(GeneralDataType generalDataType) {
-		throw new UnsupportedOperationException();
-	}
-	
-	/**
-	 * {@inheritDoc}
-	 */
-	public SpecialDataType resolveSpecialDataType(String typeName) throws DataTypeNotFoundException {
-		throw new UnsupportedOperationException();
-	}
-	
-}

Deleted: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/MappingInfo.java
===================================================================
--- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/MappingInfo.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/MappingInfo.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -1,50 +0,0 @@
-/*
- * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others.
- * Created on 2008/08/27
- *
- * This file is part of Jiemamy.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
- * either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-package org.jiemamy.core.extension.dialect;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import org.jiemamy.core.model.typedef.datatype.GeneralDataType;
-
-/**
- * マッピング情報を指定するアノテーション。
- * @author daisuke
- */
- @ Target(ElementType.TYPE)
- @ Retention(RetentionPolicy.RUNTIME)
-public @interface MappingInfo {
-	
-	/**
-	 * エイリアス型名の配列
-	 */
-	String[] alias() default {};
-	
-	/**
-	 * 一般データ型のクラス
-	 */
-	Class<? extends GeneralDataType> generic();
-	
-	/**
-	 * 型名
-	 */
-	String typeName();
-}

Deleted: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/Quoter.java
===================================================================
--- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/Quoter.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/Quoter.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -1,50 +0,0 @@
-/*
- * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others.
- * Created on 2008/09/09
- *
- * This file is part of Jiemamy.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
- * either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-package org.jiemamy.core.extension.dialect;
-
-/**
- * SQL文中の引用符処理を行うインターフェイス。
- * @author daisuke
- */
-public interface Quoter {
-	
-	/**
-	 * 引用符で囲む。
-	 * 
-	 * <p>input -> 'input' など。</p>
-	 * 
-	 * @param input 入力文字列
-	 * @param kind 引用の種類
-	 * @return 囲んだ結果
-	 */
-	String quote(String input, QuoteKind kind);
-	
-
-	/**
-	 * 引用の種類。
-	 * @author daisuke
-	 */
-	public enum QuoteKind {
-		/** 識別子 */
-		IDENTIFIER,
-
-		/** データ */
-		DATA
-	}
-}

Deleted: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/SpecialDataTypeMapping.java
===================================================================
--- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/SpecialDataTypeMapping.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/SpecialDataTypeMapping.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -1,149 +0,0 @@
-/*
- * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others.
- * Created on 2008/08/29
- *
- * This file is part of Jiemamy.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
- * either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-package org.jiemamy.core.extension.dialect;
-
-import java.util.Collection;
-import java.util.List;
-
-import org.apache.commons.lang.ArrayUtils;
-import org.seasar.framework.util.tiger.CollectionsUtil;
-
-import org.jiemamy.core.exception.DataTypeNotFoundException;
-import org.jiemamy.core.exception.IllegalDataTypeImplementationException;
-import org.jiemamy.core.exception.IllegalDialectImplementation;
-import org.jiemamy.core.model.typedef.datatype.DataType;
-import org.jiemamy.core.model.typedef.datatype.GeneralDataType;
-import org.jiemamy.core.model.typedef.datatype.AbstractDataType;
-import org.jiemamy.core.model.typedef.datatype.SpecialDataType;
-import org.jiemamy.core.model.typedef.datatype.adapter.DataTypeAdapter;
-
-/**
- * 特殊SQL方言における、データ型同士のマッピング情報を保持するクラス。
- * @author daisuke
- */
-public class SpecialDataTypeMapping implements DataTypeMapping {
-	
-	private List<Class<? extends AbstractDataType>> classes = CollectionsUtil.newArrayList();
-	
-
-	/**
-	 * {@inheritDoc}
-	 */
-	public List<Class<? extends AbstractDataType>> getAllModelingDataTypes() {
-		return classes;
-	}
-	
-	/**
-	 * {@inheritDoc}
-	 */
-	public String getTypeName(DataType dataType) {
-		for (Class<? extends AbstractDataType> clazz : classes) {
-			if (clazz == dataType.getClass()) {
-				return clazz.getAnnotation(MappingInfo.class).typeName();
-			}
-		}
-		throw new IllegalDialectImplementation("no such concrete data type: " + dataType.getClass().getName());
-	}
-	
-	/**
-	 * 特殊データ型を登録する。
-	 * @param clazz 特殊データ型クラス
-	 */
-	public void register(Class<? extends SpecialDataType> clazz) {
-		classes.add(clazz);
-	}
-	
-	/**
-	 * {@inheritDoc}
-	 */
-	public GeneralDataType resolveGeneralDataType(SpecialDataType specialDataType) {
-		for (Class<? extends AbstractDataType> clazz : classes) {
-			if (clazz == specialDataType.getClass()) {
-				try {
-					GeneralDataType generalDataType = clazz.getAnnotation(MappingInfo.class).generic().newInstance();
-					copyAdapter(specialDataType.getAdapters(), generalDataType);
-					return generalDataType;
-				} catch (InstantiationException e) {
-					throw new IllegalDataTypeImplementationException(clazz.getAnnotation(MappingInfo.class).generic(),
-							e);
-				} catch (IllegalAccessException e) {
-					throw new IllegalDataTypeImplementationException(clazz.getAnnotation(MappingInfo.class).generic(),
-							e);
-				}
-			}
-		}
-		throw new IllegalDialectImplementation("no such concrete data type: " + specialDataType.getClass().getName());
-	}
-	
-	/**
-	 * {@inheritDoc}
-	 */
-	public SpecialDataType resolveSpecialDataType(GeneralDataType generalDataType) {
-		for (Class<? extends AbstractDataType> clazz : classes) {
-			if (clazz.getAnnotation(MappingInfo.class).generic() == generalDataType.getClass()) {
-				try {
-					SpecialDataType specialDataType = (SpecialDataType) clazz.newInstance();
-					copyAdapter(generalDataType.getAdapters(), specialDataType);
-					return specialDataType;
-				} catch (InstantiationException e) {
-					throw new IllegalDataTypeImplementationException(clazz, e);
-				} catch (IllegalAccessException e) {
-					throw new IllegalDataTypeImplementationException(clazz, e);
-				}
-			}
-		}
-		return null;
-	}
-	
-	/**
-	 * {@inheritDoc}
-	 */
-	public SpecialDataType resolveSpecialDataType(String typeName) throws DataTypeNotFoundException {
-		for (Class<? extends AbstractDataType> clazz : classes) {
-			if (clazz.getAnnotation(MappingInfo.class).typeName().equals(typeName)
-					|| ArrayUtils.contains(clazz.getAnnotation(MappingInfo.class).alias(), typeName)) {
-				try {
-					return (SpecialDataType) clazz.newInstance();
-				} catch (InstantiationException e) {
-					throw new IllegalDataTypeImplementationException(clazz, e);
-				} catch (IllegalAccessException e) {
-					throw new IllegalDataTypeImplementationException(clazz, e);
-				}
-			}
-		}
-		throw new DataTypeNotFoundException(typeName);
-	}
-	
-	/**
-	 * 与えられたアダプタが持つ情報を、自分のアダプタにコピーする。
-	 * 
-	 * <p>自分が同一のアダプタを持たない場合、その情報は破棄される。</p>
-	 * 
-	 * @param adapters コピー元アダプタのコレクション
-	 * @param dataType コピー先のデータ型
-	 */
-	private void copyAdapter(Collection<DataTypeAdapter> adapters, DataType dataType) {
-		for (DataTypeAdapter adapter : adapters) {
-			if (dataType.hasAdapter(adapter.getClass())) {
-				dataType.getAdapter(adapter.getClass()).copy(adapter);
-			}
-		}
-	}
-	
-}

Added: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/advisor/ConnectionAdvisor.java
===================================================================
--- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/advisor/ConnectionAdvisor.java	                        (rev 0)
+++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/advisor/ConnectionAdvisor.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others.
+ * Created on 2008/09/10
+ *
+ * This file is part of Jiemamy.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ */
+package org.jiemamy.core.extension.dialect.advisor;
+
+import java.sql.Connection;
+
+/**
+ * DBメタデータの読み出し前後に行うべき処理を司るインターフェイス。
+ * @author daisuke
+ */
+public interface ConnectionAdvisor {
+	
+	/**
+	 * エンティティ・リレーションの読み出し前に行うべき処理。
+	 * @param connection DB接続
+	 */
+	void setUpRead(Connection connection);
+	
+	/**
+	 * エンティティ・リレーションの読み出し後に行うべき処理。
+	 * @param connection DB接続
+	 */
+	void tearDownRead(Connection connection);
+}


Property changes on: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/advisor/ConnectionAdvisor.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/advisor/DefaultConnectionAdvisor.java
===================================================================
--- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/advisor/DefaultConnectionAdvisor.java	                        (rev 0)
+++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/advisor/DefaultConnectionAdvisor.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others.
+ * Created on 2008/09/10
+ *
+ * This file is part of Jiemamy.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ */
+package org.jiemamy.core.extension.dialect.advisor;
+
+import java.sql.Connection;
+
+/**
+ * {@link ConnectionAdvisor}のデフォルト実装。
+ * @author daisuke
+ */
+public class DefaultConnectionAdvisor implements ConnectionAdvisor {
+	
+	/**
+	 * {@inheritDoc}
+	 */
+	public void setUpRead(Connection connection) {
+		// nothing to do
+	}
+	
+	/**
+	 * {@inheritDoc}
+	 */
+	public void tearDownRead(Connection connection) {
+		// nothing to do
+	}
+	
+}


Property changes on: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/advisor/DefaultConnectionAdvisor.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Copied: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/mapping/DataTypeMapping.java (from rev 1901, artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/DataTypeMapping.java)
===================================================================
--- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/mapping/DataTypeMapping.java	                        (rev 0)
+++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/mapping/DataTypeMapping.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others.
+ * Created on 2008/08/30
+ *
+ * This file is part of Jiemamy.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ */
+package org.jiemamy.core.extension.dialect.mapping;
+
+import java.util.List;
+
+import org.jiemamy.core.exception.DataTypeNotFoundException;
+import org.jiemamy.core.model.typedef.datatype.DataType;
+import org.jiemamy.core.model.typedef.datatype.GeneralDataType;
+import org.jiemamy.core.model.typedef.datatype.AbstractDataType;
+import org.jiemamy.core.model.typedef.datatype.SpecialDataType;
+
+/**
+ * データ型同士の対応関係(マッピング)を表現するクラス。
+ * @author daisuke
+ */
+public interface DataTypeMapping {
+	
+	/**
+	 * 登録されたデータ型を全て取得する。
+	 * @return 登録されたデータ型のリスト
+	 */
+	public List<Class<? extends AbstractDataType>> getAllModelingDataTypes();
+	
+	/**
+	 * データ型から型名を取得する。
+	 * @param dataType データ型
+	 * @return 型名
+	 */
+	public String getTypeName(DataType dataType);
+	
+	/**
+	 * 特殊データ型から一般データ型を取得する。
+	 * 
+	 * <p>この時、多くの情報が失われることに注意して使用する。</p>
+	 * 
+	 * @param specialDataType 特殊データ型
+	 * @return 一般データ型
+	 */
+	public GeneralDataType resolveGeneralDataType(SpecialDataType specialDataType);
+	
+	/**
+	 * 一般データ型から特殊データ型を取得する。
+	 * @param generalDataType 一般データ型
+	 * @return 特殊データ型
+	 */
+	public SpecialDataType resolveSpecialDataType(GeneralDataType generalDataType);
+	
+	/**
+	 * 型名から特殊データ型
+	 * @param typeName 型名
+	 * @return 特殊データ型
+	 * @throws DataTypeNotFoundException 該当するデータ型が存在しない場合。
+	 */
+	public SpecialDataType resolveSpecialDataType(String typeName) throws DataTypeNotFoundException;
+}


Property changes on: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/mapping/DataTypeMapping.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Copied: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/mapping/GeneralDataTypeMapping.java (from rev 1901, artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/GeneralDataTypeMapping.java)
===================================================================
--- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/mapping/GeneralDataTypeMapping.java	                        (rev 0)
+++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/mapping/GeneralDataTypeMapping.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -0,0 +1,83 @@
+/*
+ * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others.
+ * Created on 2008/08/30
+ *
+ * This file is part of Jiemamy.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ */
+package org.jiemamy.core.extension.dialect.mapping;
+
+import java.util.List;
+
+import org.seasar.framework.util.tiger.CollectionsUtil;
+
+import org.jiemamy.core.exception.DataTypeNotFoundException;
+import org.jiemamy.core.model.typedef.datatype.DataType;
+import org.jiemamy.core.model.typedef.datatype.GeneralDataType;
+import org.jiemamy.core.model.typedef.datatype.AbstractDataType;
+import org.jiemamy.core.model.typedef.datatype.SpecialDataType;
+
+/**
+ * 一般SQL方言における、データ型同士のマッピング情報を保持するクラス。
+ * @author daisuke
+ */
+public class GeneralDataTypeMapping implements DataTypeMapping {
+	
+	private List<Class<? extends AbstractDataType>> entries = CollectionsUtil.newArrayList();
+	
+
+	/**
+	 * {@inheritDoc}
+	 */
+	public List<Class<? extends AbstractDataType>> getAllModelingDataTypes() {
+		return entries;
+	}
+	
+	/**
+	 * {@inheritDoc}
+	 */
+	public String getTypeName(DataType dataType) {
+		return dataType.toString();
+	}
+	
+	/**
+	 * ジェネリックデータ型を登録する。
+	 * @param clazz データ型クラス
+	 */
+	public void register(Class<? extends GeneralDataType> clazz) {
+		entries.add(clazz);
+	}
+	
+	/**
+	 * {@inheritDoc}
+	 */
+	public GeneralDataType resolveGeneralDataType(SpecialDataType specialDataType) {
+		throw new UnsupportedOperationException();
+	}
+	
+	/**
+	 * {@inheritDoc}
+	 */
+	public SpecialDataType resolveSpecialDataType(GeneralDataType generalDataType) {
+		throw new UnsupportedOperationException();
+	}
+	
+	/**
+	 * {@inheritDoc}
+	 */
+	public SpecialDataType resolveSpecialDataType(String typeName) throws DataTypeNotFoundException {
+		throw new UnsupportedOperationException();
+	}
+	
+}


Property changes on: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/mapping/GeneralDataTypeMapping.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Copied: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/mapping/MappingInfo.java (from rev 1901, artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/MappingInfo.java)
===================================================================
--- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/mapping/MappingInfo.java	                        (rev 0)
+++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/mapping/MappingInfo.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others.
+ * Created on 2008/08/27
+ *
+ * This file is part of Jiemamy.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ */
+package org.jiemamy.core.extension.dialect.mapping;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.jiemamy.core.model.typedef.datatype.GeneralDataType;
+
+/**
+ * マッピング情報を指定するアノテーション。
+ * @author daisuke
+ */
+ @ Target(ElementType.TYPE)
+ @ Retention(RetentionPolicy.RUNTIME)
+public @interface MappingInfo {
+	
+	/**
+	 * エイリアス型名の配列
+	 */
+	String[] alias() default {};
+	
+	/**
+	 * 一般データ型のクラス
+	 */
+	Class<? extends GeneralDataType> generic();
+	
+	/**
+	 * 型名
+	 */
+	String typeName();
+}


Property changes on: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/mapping/MappingInfo.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Copied: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/mapping/SpecialDataTypeMapping.java (from rev 1901, artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/SpecialDataTypeMapping.java)
===================================================================
--- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/mapping/SpecialDataTypeMapping.java	                        (rev 0)
+++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/mapping/SpecialDataTypeMapping.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -0,0 +1,149 @@
+/*
+ * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others.
+ * Created on 2008/08/29
+ *
+ * This file is part of Jiemamy.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ */
+package org.jiemamy.core.extension.dialect.mapping;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.apache.commons.lang.ArrayUtils;
+import org.seasar.framework.util.tiger.CollectionsUtil;
+
+import org.jiemamy.core.exception.DataTypeNotFoundException;
+import org.jiemamy.core.exception.IllegalDataTypeImplementationException;
+import org.jiemamy.core.exception.IllegalDialectImplementation;
+import org.jiemamy.core.model.typedef.datatype.DataType;
+import org.jiemamy.core.model.typedef.datatype.GeneralDataType;
+import org.jiemamy.core.model.typedef.datatype.AbstractDataType;
+import org.jiemamy.core.model.typedef.datatype.SpecialDataType;
+import org.jiemamy.core.model.typedef.datatype.adapter.DataTypeAdapter;
+
+/**
+ * 特殊SQL方言における、データ型同士のマッピング情報を保持するクラス。
+ * @author daisuke
+ */
+public class SpecialDataTypeMapping implements DataTypeMapping {
+	
+	private List<Class<? extends AbstractDataType>> classes = CollectionsUtil.newArrayList();
+	
+
+	/**
+	 * {@inheritDoc}
+	 */
+	public List<Class<? extends AbstractDataType>> getAllModelingDataTypes() {
+		return classes;
+	}
+	
+	/**
+	 * {@inheritDoc}
+	 */
+	public String getTypeName(DataType dataType) {
+		for (Class<? extends AbstractDataType> clazz : classes) {
+			if (clazz == dataType.getClass()) {
+				return clazz.getAnnotation(MappingInfo.class).typeName();
+			}
+		}
+		throw new IllegalDialectImplementation("no such concrete data type: " + dataType.getClass().getName());
+	}
+	
+	/**
+	 * 特殊データ型を登録する。
+	 * @param clazz 特殊データ型クラス
+	 */
+	public void register(Class<? extends SpecialDataType> clazz) {
+		classes.add(clazz);
+	}
+	
+	/**
+	 * {@inheritDoc}
+	 */
+	public GeneralDataType resolveGeneralDataType(SpecialDataType specialDataType) {
+		for (Class<? extends AbstractDataType> clazz : classes) {
+			if (clazz == specialDataType.getClass()) {
+				try {
+					GeneralDataType generalDataType = clazz.getAnnotation(MappingInfo.class).generic().newInstance();
+					copyAdapter(specialDataType.getAdapters(), generalDataType);
+					return generalDataType;
+				} catch (InstantiationException e) {
+					throw new IllegalDataTypeImplementationException(clazz.getAnnotation(MappingInfo.class).generic(),
+							e);
+				} catch (IllegalAccessException e) {
+					throw new IllegalDataTypeImplementationException(clazz.getAnnotation(MappingInfo.class).generic(),
+							e);
+				}
+			}
+		}
+		throw new IllegalDialectImplementation("no such concrete data type: " + specialDataType.getClass().getName());
+	}
+	
+	/**
+	 * {@inheritDoc}
+	 */
+	public SpecialDataType resolveSpecialDataType(GeneralDataType generalDataType) {
+		for (Class<? extends AbstractDataType> clazz : classes) {
+			if (clazz.getAnnotation(MappingInfo.class).generic() == generalDataType.getClass()) {
+				try {
+					SpecialDataType specialDataType = (SpecialDataType) clazz.newInstance();
+					copyAdapter(generalDataType.getAdapters(), specialDataType);
+					return specialDataType;
+				} catch (InstantiationException e) {
+					throw new IllegalDataTypeImplementationException(clazz, e);
+				} catch (IllegalAccessException e) {
+					throw new IllegalDataTypeImplementationException(clazz, e);
+				}
+			}
+		}
+		return null;
+	}
+	
+	/**
+	 * {@inheritDoc}
+	 */
+	public SpecialDataType resolveSpecialDataType(String typeName) throws DataTypeNotFoundException {
+		for (Class<? extends AbstractDataType> clazz : classes) {
+			if (clazz.getAnnotation(MappingInfo.class).typeName().equals(typeName)
+					|| ArrayUtils.contains(clazz.getAnnotation(MappingInfo.class).alias(), typeName)) {
+				try {
+					return (SpecialDataType) clazz.newInstance();
+				} catch (InstantiationException e) {
+					throw new IllegalDataTypeImplementationException(clazz, e);
+				} catch (IllegalAccessException e) {
+					throw new IllegalDataTypeImplementationException(clazz, e);
+				}
+			}
+		}
+		throw new DataTypeNotFoundException(typeName);
+	}
+	
+	/**
+	 * 与えられたアダプタが持つ情報を、自分のアダプタにコピーする。
+	 * 
+	 * <p>自分が同一のアダプタを持たない場合、その情報は破棄される。</p>
+	 * 
+	 * @param adapters コピー元アダプタのコレクション
+	 * @param dataType コピー先のデータ型
+	 */
+	private void copyAdapter(Collection<DataTypeAdapter> adapters, DataType dataType) {
+		for (DataTypeAdapter adapter : adapters) {
+			if (dataType.hasAdapter(adapter.getClass())) {
+				dataType.getAdapter(adapter.getClass()).copy(adapter);
+			}
+		}
+	}
+	
+}


Property changes on: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/mapping/SpecialDataTypeMapping.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Copied: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/quoter/Quoter.java (from rev 1904, artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/Quoter.java)
===================================================================
--- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/quoter/Quoter.java	                        (rev 0)
+++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/quoter/Quoter.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others.
+ * Created on 2008/09/09
+ *
+ * This file is part of Jiemamy.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ */
+package org.jiemamy.core.extension.dialect.quoter;
+
+/**
+ * SQL文中の引用符処理を行うインターフェイス。
+ * @author daisuke
+ */
+public interface Quoter {
+	
+	/**
+	 * 引用符で囲む。
+	 * 
+	 * <p>input -> 'input' など。</p>
+	 * 
+	 * @param input 入力文字列
+	 * @param kind 引用の種類
+	 * @return 囲んだ結果
+	 */
+	String quote(String input, QuoteKind kind);
+	
+
+	/**
+	 * 引用の種類。
+	 * @author daisuke
+	 */
+	public enum QuoteKind {
+		/** 識別子 */
+		IDENTIFIER,
+
+		/** データ */
+		DATA
+	}
+}


Property changes on: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/quoter/Quoter.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/validator/AbstractIdentifierValidator.java
===================================================================
--- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/validator/AbstractIdentifierValidator.java	                        (rev 0)
+++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/validator/AbstractIdentifierValidator.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others.
+ * Created on 2008/09/10
+ *
+ * This file is part of Jiemamy.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ */
+package org.jiemamy.core.extension.dialect.validator;
+
+import java.util.Arrays;
+import java.util.regex.Pattern;
+
+
+/**
+ * TODO for daisuke
+ * @author daisuke
+ */
+public abstract class AbstractIdentifierValidator implements IdentifierValidator {
+	
+	private Pattern identifierPattern;
+	
+	private ReservedWordsProvider reservedWords;
+	
+
+	/**
+	 * コンストラクタ。
+	 * @param patternString 
+	 * @param reservedWords 
+	 * @category instance creation
+	 */
+	public AbstractIdentifierValidator(String patternString, ReservedWordsProvider reservedWords) {
+		identifierPattern = Pattern.compile(patternString);
+		this.reservedWords = reservedWords;
+	}
+	
+	/**
+	 * {@inheritDoc}
+	 */
+	public boolean validate(String word) {
+		if (identifierPattern.matcher(word).matches() == false) {
+			return false;
+		}
+		return Arrays.asList(reservedWords.getReservedWords()).contains(word) == false;
+	}
+	
+}


Property changes on: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/validator/AbstractIdentifierValidator.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/validator/IdentifierValidator.java
===================================================================
--- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/validator/IdentifierValidator.java	                        (rev 0)
+++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/validator/IdentifierValidator.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others.
+ * Created on 2008/09/10
+ *
+ * This file is part of Jiemamy.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ */
+package org.jiemamy.core.extension.dialect.validator;
+
+/**
+ * 識別子の妥当性を判断するインターフェイス。
+ * @author daisuke
+ */
+public interface IdentifierValidator {
+	
+	/**
+	 * 指定した語が、識別子として適切かどうかを調べる。
+	 * @param word 語
+	 * @return 適切であればtrue
+	 */
+	boolean validate(String word);
+}


Property changes on: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/validator/IdentifierValidator.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/validator/ReservedWordsProvider.java
===================================================================
--- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/validator/ReservedWordsProvider.java	                        (rev 0)
+++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/extension/dialect/validator/ReservedWordsProvider.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others.
+ * Created on 2008/08/24
+ *
+ * This file is part of Jiemamy.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ */
+package org.jiemamy.core.extension.dialect.validator;
+
+/**
+ * 予約語プロバイダ。
+ * @author daisuke
+ */
+public interface ReservedWordsProvider {
+	
+	/**
+	 * 予約語の配列を取得する。
+	 * @return 予約語の配列
+	 */
+	String[] getReservedWords();
+}

Modified: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/interpreter/DatabaseReader.java
===================================================================
--- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/interpreter/DatabaseReader.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/interpreter/DatabaseReader.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -43,9 +43,8 @@
 public class DatabaseReader {
 	
 	// THINK DBを読み込んだ結果、modelを「出力する」主体はReaderである為、現在の実装のようにDialectに丸投げ委譲、
-	// というのは責務の重心がおかしい。
-	// Dialectは必要な部分のみReaderから問い合わせられるだけの立場であり、基本的にモデルを組み立てる責務は
-	// Reader側にあるものではないか?
+	// というのは責務の重心がおかしい。Dialectは必要な部分のみReaderから問い合わせられるだけの立場であり、
+	// 基本的にモデルを組み立てる責務はReader側にあるものではないか?
 	
 	private final Dialect dialect;
 	
@@ -72,7 +71,7 @@
 	 * @throws SQLException 
 	 */
 	public <T>T readEnities(Connection connection, AbstractResultSetVisitor<T> visitor) throws SQLException {
-		dialect.setUpRead(connection);
+		dialect.getAdvisor().setUpRead(connection);
 		
 		String schema = ctx.getValue("schema"); // DatabaseImporter.SCHEMA
 		DatabaseMetaData meta = connection.getMetaData();
@@ -80,7 +79,7 @@
 		ResultSet entities = meta.getTables(null, schema, "%", null);
 		T result = ForEachUtil.accept(entities, visitor);
 		
-		dialect.tearDownRead(connection);
+		dialect.getAdvisor().tearDownRead(connection);
 		return result;
 	}
 	
@@ -93,7 +92,7 @@
 	 * @throws SQLException 
 	 */
 	public <T>T readRelations(Connection connection, AbstractResultSetVisitor<T> visitor) throws SQLException {
-		dialect.setUpRead(connection);
+		dialect.getAdvisor().setUpRead(connection);
 		
 		String schema = ctx.getValue("schema"); // DatabaseImporter.SCHEMA
 		DatabaseMetaData meta = connection.getMetaData();
@@ -105,7 +104,7 @@
 			ForEachUtil.accept(relations, visitor);
 		}
 		
-		dialect.tearDownRead(connection);
+		dialect.getAdvisor().tearDownRead(connection);
 		return null; // FIXME 複数やるから、Tを単純に返せないな。
 	}
 }

Modified: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/model/typedef/datatype/SpecialDataType.java
===================================================================
--- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/model/typedef/datatype/SpecialDataType.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/model/typedef/datatype/SpecialDataType.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -18,7 +18,7 @@
  */
 package org.jiemamy.core.model.typedef.datatype;
 
-import org.jiemamy.core.extension.dialect.MappingInfo;
+import org.jiemamy.core.extension.dialect.mapping.MappingInfo;
 
 /**
  * DBに依存した、特殊データ型クラス。

Modified: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/utils/ForEachUtil.java
===================================================================
--- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/utils/ForEachUtil.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/utils/ForEachUtil.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -36,8 +36,9 @@
 	 * @param target 処理対象コレクション
 	 * @param visitor ビジター
 	 * @return accept結果
+	 * @throws Exception 
 	 */
-	public static <T, R>R accept(Iterable<T> target, CollectionVisitor<T, R> visitor) {
+	public static <T, R, E extends Exception>R accept(Iterable<T> target, CollectionVisitor<T, R, E> visitor) throws E {
 		for (T connection : target) {
 			R result = visitor.visit(connection);
 			if (result != null) {
@@ -52,12 +53,13 @@
 	 * @param <K> Mapのキーの型
 	 * @param <V> Mapの値の型
 	 * @param <R> 戻り値の型
-	 * @param target 処理対象コレクション
+	 * @param targetMap 処理対象コレクション
 	 * @param visitor ビジター
 	 * @return accept結果
+	 * @throws E 
 	 */
-	public static <K, V, R>R accept(Map<K, V> target, MapVisitor<K, V, R> visitor) {
-		for (Map.Entry<K, V> entry : target.entrySet()) {
+	public static <K, V, R, E extends Exception>R accept(Map<K, V> targetMap, MapVisitor<K, V, R, E> visitor) throws E {
+		for (Map.Entry<K, V> entry : targetMap.entrySet()) {
 			R result = visitor.visit(entry.getKey(), entry.getValue());
 			if (result != null) {
 				return result;
@@ -74,7 +76,8 @@
 	 * @return accept結果
 	 * @throws SQLException 
 	 */
-	public static <R>R accept(ResultSet target, CollectionVisitor<ResultSet, R> visitor) throws SQLException {
+	public static <R>R accept(ResultSet target, CollectionVisitor<ResultSet, R, SQLException> visitor)
+			throws SQLException {
 		while (target.next()) {
 			visitor.visit(target);
 		}
@@ -95,7 +98,7 @@
 	 * @param <T> {@link Collection}が保持する型
 	 * @param <R> acceptが返すべき戻り値の型
 	 */
-	public interface CollectionVisitor<T, R> {
+	public interface CollectionVisitor<T, R, E extends Exception> {
 		
 		/**
 		 * ループが終了した後、acceptが返すべき戻り値を取得する。
@@ -108,7 +111,7 @@
 		 * @param element 処理対象要素
 		 * @return 引き続きacceptを継続する場合null、ループを終了する場合acceptが返すべき戻り値を返す。
 		 */
-		R visit(T element);
+		R visit(T element) throws E;
 	}
 	
 	/**
@@ -118,7 +121,7 @@
 	 * @param <V> 処理対象{@link Map}の値の型
 	 * @param <R> forEachが返すべき戻り値の型
 	 */
-	public interface MapVisitor<K, V, R> {
+	public interface MapVisitor<K, V, R, E extends Exception> {
 		
 		/**
 		 * ループが終了した後、acceptが返すべき戻り値を取得する。
@@ -132,7 +135,7 @@
 		 * @param value 処理対象の値
 		 * @return 引き続きacceptを継続する場合null、ループを終了する場合acceptが返すべき戻り値を返す。
 		 */
-		R visit(K key, V value);
+		R visit(K key, V value) throws E;
 	}
 	
 }

Modified: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/utils/visitor/AbstractCollectionVisitor.java
===================================================================
--- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/utils/visitor/AbstractCollectionVisitor.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/utils/visitor/AbstractCollectionVisitor.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -28,7 +28,8 @@
  * @param <T> Collectionが保持する型
  * @param <R> forEachが返すべき戻り値の型
  */
-public abstract class AbstractCollectionVisitor<T, R> implements ForEachUtil.CollectionVisitor<T, R> {
+public abstract class AbstractCollectionVisitor<T, R, E extends Exception> implements
+		ForEachUtil.CollectionVisitor<T, R, E> {
 	
 	/** ループが終了した後、forEachが返すべき戻り値 */
 	protected R finalResult;

Modified: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/utils/visitor/AbstractMapVisitor.java
===================================================================
--- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/utils/visitor/AbstractMapVisitor.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/utils/visitor/AbstractMapVisitor.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -29,7 +29,7 @@
  * @param <V> MapのValueの型
  * @param <R> forEachが返すべき戻り値の型
  */
-public abstract class AbstractMapVisitor<K, V, R> implements ForEachUtil.MapVisitor<K, V, R> {
+public abstract class AbstractMapVisitor<K, V, R, E extends Exception> implements ForEachUtil.MapVisitor<K, V, R, E> {
 	
 	/** ループが終了した後、forEachが返すべき戻り値 */
 	protected R finalResult;

Modified: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/utils/visitor/AbstractResultSetVisitor.java
===================================================================
--- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/utils/visitor/AbstractResultSetVisitor.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/utils/visitor/AbstractResultSetVisitor.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -19,6 +19,7 @@
 package org.jiemamy.core.utils.visitor;
 
 import java.sql.ResultSet;
+import java.sql.SQLException;
 
 import org.jiemamy.core.utils.ForEachUtil;
 
@@ -27,7 +28,7 @@
  * @author daisuke
  * @param <R> 戻り値の型
  */
-public abstract class AbstractResultSetVisitor<R> implements ForEachUtil.CollectionVisitor<ResultSet, R> {
+public abstract class AbstractResultSetVisitor<R> implements ForEachUtil.CollectionVisitor<ResultSet, R, SQLException> {
 	
 	/** ループが終了した後、forEachが返すべき戻り値 */
 	protected R finalResult;

Modified: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/utils/visitor/impl/EntityNamesVisitor.java
===================================================================
--- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/utils/visitor/impl/EntityNamesVisitor.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/utils/visitor/impl/EntityNamesVisitor.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -33,13 +33,10 @@
 	
 	/**
 	 * {@inheritDoc}
+	 * @throws SQLException 
 	 */
-	public List<String> visit(ResultSet entity) {
-		try {
-			finalResult.add(entity.getString("TABLE_NAME"));
-		} catch (SQLException ignoree) {
-			// ignore
-		}
+	public List<String> visit(ResultSet entity) throws SQLException {
+		finalResult.add(entity.getString("TABLE_NAME"));
 		return null;
 	}
 	

Modified: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/utils/visitor/impl/PrimaryKeyVisitor.java
===================================================================
--- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/utils/visitor/impl/PrimaryKeyVisitor.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/utils/visitor/impl/PrimaryKeyVisitor.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -30,7 +30,7 @@
  * 主キーカラムのリスト取得するビジター。
  * @author daisuke
  */
-public class PrimaryKeyVisitor extends AbstractCollectionVisitor<ColumnModel, List<ColumnModel>> {
+public class PrimaryKeyVisitor extends AbstractCollectionVisitor<ColumnModel, List<ColumnModel>, RuntimeException> {
 	
 	/**
 	 * 主キーカラムのリストを取得する処理。

Modified: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/utils/visitor/impl/SizeVisitor.java
===================================================================
--- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/utils/visitor/impl/SizeVisitor.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/core/utils/visitor/impl/SizeVisitor.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -27,7 +27,7 @@
  * @author daisuke
  * @param <T> {@link Collection}が保持する型
  */
-public class SizeVisitor<T> extends AbstractCollectionVisitor<T, Integer> {
+public class SizeVisitor<T> extends AbstractCollectionVisitor<T, Integer, RuntimeException> {
 	
 	/**
 	 * {@inheritDoc}

Modified: artemis/trunk/org.jiemamy.core/src/test/java/org/jiemamy/core/model/typedef/datatype/impl/IntegerDataTypeMock.java
===================================================================
--- artemis/trunk/org.jiemamy.core/src/test/java/org/jiemamy/core/model/typedef/datatype/impl/IntegerDataTypeMock.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.core/src/test/java/org/jiemamy/core/model/typedef/datatype/impl/IntegerDataTypeMock.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -18,7 +18,7 @@
  */
 package org.jiemamy.core.model.typedef.datatype.impl;
 
-import org.jiemamy.core.extension.dialect.MappingInfo;
+import org.jiemamy.core.extension.dialect.mapping.MappingInfo;
 import org.jiemamy.core.model.typedef.datatype.SpecialDataType;
 
 /**

Modified: artemis/trunk/org.jiemamy.core/src/test/java/org/jiemamy/core/model/typedef/datatype/impl/NumericDataTypeMock.java
===================================================================
--- artemis/trunk/org.jiemamy.core/src/test/java/org/jiemamy/core/model/typedef/datatype/impl/NumericDataTypeMock.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.core/src/test/java/org/jiemamy/core/model/typedef/datatype/impl/NumericDataTypeMock.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -18,7 +18,7 @@
  */
 package org.jiemamy.core.model.typedef.datatype.impl;
 
-import org.jiemamy.core.extension.dialect.MappingInfo;
+import org.jiemamy.core.extension.dialect.mapping.MappingInfo;
 import org.jiemamy.core.model.typedef.datatype.SpecialDataType;
 import org.jiemamy.core.model.typedef.datatype.adapter.PrecisionedDataType;
 

Modified: artemis/trunk/org.jiemamy.core/src/test/java/org/jiemamy/core/model/typedef/datatype/impl/TimestampDataTypeMock.java
===================================================================
--- artemis/trunk/org.jiemamy.core/src/test/java/org/jiemamy/core/model/typedef/datatype/impl/TimestampDataTypeMock.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.core/src/test/java/org/jiemamy/core/model/typedef/datatype/impl/TimestampDataTypeMock.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -18,7 +18,7 @@
  */
 package org.jiemamy.core.model.typedef.datatype.impl;
 
-import org.jiemamy.core.extension.dialect.MappingInfo;
+import org.jiemamy.core.extension.dialect.mapping.MappingInfo;
 import org.jiemamy.core.model.typedef.datatype.SpecialDataType;
 import org.jiemamy.core.model.typedef.datatype.adapter.TimezonedDataType;
 

Modified: artemis/trunk/org.jiemamy.core/src/test/java/org/jiemamy/core/model/typedef/datatype/impl/VarcharDataTypeMock.java
===================================================================
--- artemis/trunk/org.jiemamy.core/src/test/java/org/jiemamy/core/model/typedef/datatype/impl/VarcharDataTypeMock.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.core/src/test/java/org/jiemamy/core/model/typedef/datatype/impl/VarcharDataTypeMock.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -18,7 +18,7 @@
  */
 package org.jiemamy.core.model.typedef.datatype.impl;
 
-import org.jiemamy.core.extension.dialect.MappingInfo;
+import org.jiemamy.core.extension.dialect.mapping.MappingInfo;
 import org.jiemamy.core.model.typedef.datatype.SpecialDataType;
 import org.jiemamy.core.model.typedef.datatype.adapter.SizedDataType;
 

Modified: artemis/trunk/org.jiemamy.dialect/src/main/java/org/jiemamy/dialect/AbstractDialect.java
===================================================================
--- artemis/trunk/org.jiemamy.dialect/src/main/java/org/jiemamy/dialect/AbstractDialect.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.dialect/src/main/java/org/jiemamy/dialect/AbstractDialect.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -23,17 +23,18 @@
 import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.List;
-import java.util.regex.Pattern;
 
 import org.jiemamy.core.exception.DataTypeNotFoundException;
 import org.jiemamy.core.exception.IllegalDataTypeMappingException;
-import org.jiemamy.core.extension.dialect.DataTypeMapping;
 import org.jiemamy.core.extension.dialect.Dialect;
-import org.jiemamy.core.extension.dialect.Quoter;
-import org.jiemamy.core.extension.dialect.SpecialDataTypeMapping;
+import org.jiemamy.core.extension.dialect.advisor.ConnectionAdvisor;
+import org.jiemamy.core.extension.dialect.advisor.DefaultConnectionAdvisor;
+import org.jiemamy.core.extension.dialect.mapping.DataTypeMapping;
+import org.jiemamy.core.extension.dialect.mapping.SpecialDataTypeMapping;
 import org.jiemamy.core.extension.dialect.parser.ModelParser;
+import org.jiemamy.core.extension.dialect.quoter.Quoter;
+import org.jiemamy.core.extension.dialect.validator.IdentifierValidator;
 import org.jiemamy.core.model.RootModel;
 import org.jiemamy.core.model.node.AbstractEntityModel;
 import org.jiemamy.core.model.node.TableModel;
@@ -50,8 +51,6 @@
 import org.jiemamy.core.utils.processor.root.creation.CreateNewTableProcessor;
 import org.jiemamy.core.utils.processor.root.creation.CreateNewViewProcessor;
 import org.jiemamy.core.utils.visitor.AbstractResultSetVisitor;
-import org.jiemamy.dialect.generic.GenericReservedWords;
-import org.jiemamy.dialect.generic.ReservedWordsProvider;
 
 /**
  * SQL方言実装クラスの標準的な実装クラス。
@@ -59,43 +58,32 @@
  */
 public abstract class AbstractDialect implements Dialect {
 	
-	private ReservedWordsProvider reservedWords;
-	
-	private Pattern identifierPattern;
-	
 	private SpecialDataTypeMapping dataTypeMapping = new SpecialDataTypeMapping();
 	
 	private Quoter quoter;
 	
+	private IdentifierValidator validator;
+	
+	private ConnectionAdvisor advisor = new DefaultConnectionAdvisor();
+	
 
 	/**
 	 * コンストラクタ。
+	 * @param validator 
 	 * @category instance creation
 	 */
-	public AbstractDialect() {
-		this("^[A-Z][0-9A-Z]+$", new DefaultQuoter(), new GenericReservedWords());
+	public AbstractDialect(IdentifierValidator validator) {
+		this(validator, new DefaultQuoter());
 	}
 	
 	/**
 	 * コンストラクタ。
-	 * @param identifierPattern 
-	 * @param reservedWords 
-	 * @category instance creation
-	 */
-	public AbstractDialect(String identifierPattern, ReservedWordsProvider reservedWords) {
-		this(identifierPattern, new DefaultQuoter(), reservedWords);
-	}
-	
-	/**
-	 * コンストラクタ。
-	 * @param identifierPattern
+	 * @param validator
 	 * @param quoter 
-	 * @param reservedWords
 	 * @category instance creation
 	 */
-	protected AbstractDialect(String identifierPattern, Quoter quoter, ReservedWordsProvider reservedWords) {
-		this.reservedWords = reservedWords;
-		this.identifierPattern = Pattern.compile(identifierPattern);
+	protected AbstractDialect(IdentifierValidator validator, Quoter quoter) {
+		this.validator = validator;
 		this.quoter = quoter;
 	}
 	
@@ -117,6 +105,13 @@
 	/**
 	 * {@inheritDoc}
 	 */
+	public ConnectionAdvisor getAdvisor() {
+		return advisor;
+	}
+	
+	/**
+	 * {@inheritDoc}
+	 */
 	public DataTypeMapping getDataTypeMapping() {
 		return dataTypeMapping;
 	}
@@ -139,28 +134,11 @@
 	/**
 	 * {@inheritDoc}
 	 */
-	public boolean isValidIdentifier(String word) {
-		if (identifierPattern.matcher(word).matches() == false) {
-			return false;
-		}
-		return Arrays.asList(reservedWords.getReservedWords()).contains(word) == false;
+	public IdentifierValidator getValidator() {
+		return validator;
 	}
 	
 	/**
-	 * {@inheritDoc}
-	 */
-	public void setUpRead(Connection connection) {
-		// nothing to do
-	}
-	
-	/**
-	 * {@inheritDoc}
-	 */
-	public void tearDownRead(Connection connection) {
-		// nothing to do
-	}
-	
-	/**
 	 * データ型を登録する。
 	 * @param clazz 登録するデータ型クラス
 	 */
@@ -190,7 +168,7 @@
 			columnsResult = meta.getColumns("", null/* FIXME schema */, tableName, "%");
 			ForEachUtil.accept(columnsResult, new AbstractResultSetVisitor<List<ColumnModel>>() {
 				
-				public List<ColumnModel> visit(ResultSet element) {
+				public List<ColumnModel> visit(ResultSet element) throws SQLException {
 					AbstractDataType dataType;
 					try {
 						dataType = getDataTypeMapping().resolveSpecialDataType(element.getString("TYPE_NAME"));
@@ -218,9 +196,6 @@
 						finalResult.add(column);
 					} catch (DataTypeNotFoundException e) {
 						throw new IllegalDataTypeMappingException(e);
-					} catch (SQLException e) {
-						// TODO Auto-generated catch block
-						e.printStackTrace();
 					}
 					return null;
 				}

Modified: artemis/trunk/org.jiemamy.dialect/src/main/java/org/jiemamy/dialect/DefaultQuoter.java
===================================================================
--- artemis/trunk/org.jiemamy.dialect/src/main/java/org/jiemamy/dialect/DefaultQuoter.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.dialect/src/main/java/org/jiemamy/dialect/DefaultQuoter.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -18,7 +18,7 @@
  */
 package org.jiemamy.dialect;
 
-import org.jiemamy.core.extension.dialect.Quoter;
+import org.jiemamy.core.extension.dialect.quoter.Quoter;
 
 /**
  * TODO for daisuke

Modified: artemis/trunk/org.jiemamy.dialect/src/main/java/org/jiemamy/dialect/generic/GeneralDialect.java
===================================================================
--- artemis/trunk/org.jiemamy.dialect/src/main/java/org/jiemamy/dialect/generic/GeneralDialect.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.dialect/src/main/java/org/jiemamy/dialect/generic/GeneralDialect.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -20,14 +20,16 @@
 
 import java.sql.Connection;
 import java.sql.ResultSet;
-import java.util.Arrays;
-import java.util.regex.Pattern;
 
-import org.jiemamy.core.extension.dialect.DataTypeMapping;
 import org.jiemamy.core.extension.dialect.Dialect;
-import org.jiemamy.core.extension.dialect.GeneralDataTypeMapping;
-import org.jiemamy.core.extension.dialect.Quoter;
+import org.jiemamy.core.extension.dialect.advisor.ConnectionAdvisor;
+import org.jiemamy.core.extension.dialect.advisor.DefaultConnectionAdvisor;
+import org.jiemamy.core.extension.dialect.mapping.DataTypeMapping;
+import org.jiemamy.core.extension.dialect.mapping.GeneralDataTypeMapping;
 import org.jiemamy.core.extension.dialect.parser.ModelParser;
+import org.jiemamy.core.extension.dialect.quoter.Quoter;
+import org.jiemamy.core.extension.dialect.validator.IdentifierValidator;
+import org.jiemamy.core.extension.dialect.validator.ReservedWordsProvider;
 import org.jiemamy.core.model.RootModel;
 import org.jiemamy.core.model.node.AbstractEntityModel;
 import org.jiemamy.dialect.datatype.generic.GenericBigIntegerDataType;
@@ -59,9 +61,9 @@
 	
 	private GeneralDataTypeMapping dataTypeMapping = new GeneralDataTypeMapping();
 	
-	private ReservedWordsProvider reservedWords;
+	private IdentifierValidator validator = new GenericValidator();
 	
-	private Pattern identifierPattern;
+	private ConnectionAdvisor advisor = new DefaultConnectionAdvisor();
 	
 
 	/**
@@ -78,8 +80,6 @@
 		dataTypeMapping.register(GenericClobDataType.class);
 		dataTypeMapping.register(GenericBlobDataType.class);
 		dataTypeMapping.register(GenericTimestampDataType.class);
-		identifierPattern = Pattern.compile("^[A-Z][0-9A-Z]+$");
-		reservedWords = (new GenericReservedWords());
 	}
 	
 	/**
@@ -89,8 +89,6 @@
 	 * @category  instance creation
 	 */
 	protected GeneralDialect(String identifierPattern, ReservedWordsProvider reservedWords) {
-		this.reservedWords = reservedWords;
-		this.identifierPattern = Pattern.compile(identifierPattern);
 	}
 	
 	/**
@@ -103,6 +101,13 @@
 	/**
 	 * {@inheritDoc}
 	 */
+	public ConnectionAdvisor getAdvisor() {
+		return advisor;
+	}
+	
+	/**
+	 * {@inheritDoc}
+	 */
 	public DataTypeMapping getDataTypeMapping() {
 		return dataTypeMapping;
 	}
@@ -124,22 +129,8 @@
 	/**
 	 * {@inheritDoc}
 	 */
-	public boolean isValidIdentifier(String word) {
-		if (identifierPattern.matcher(word).matches() == false) {
-			return false;
-		}
-		return Arrays.asList(reservedWords.getReservedWords()).contains(word) == false;
+	public IdentifierValidator getValidator() {
+		return validator;
 	}
 	
-	/**
-	 * {@inheritDoc}
-	 */
-	public void setUpRead(Connection connection) {
-	}
-	
-	/**
-	 * {@inheritDoc}
-	 */
-	public void tearDownRead(Connection connection) {
-	}
 }

Modified: artemis/trunk/org.jiemamy.dialect/src/main/java/org/jiemamy/dialect/generic/GenericReservedWords.java
===================================================================
--- artemis/trunk/org.jiemamy.dialect/src/main/java/org/jiemamy/dialect/generic/GenericReservedWords.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.dialect/src/main/java/org/jiemamy/dialect/generic/GenericReservedWords.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -18,6 +18,8 @@
  */
 package org.jiemamy.dialect.generic;
 
+import org.jiemamy.core.extension.dialect.validator.ReservedWordsProvider;
+
 /**
  * 一般SQL方言における予約語を提供するクラス。
  * @author daisuke

Added: artemis/trunk/org.jiemamy.dialect/src/main/java/org/jiemamy/dialect/generic/GenericValidator.java
===================================================================
--- artemis/trunk/org.jiemamy.dialect/src/main/java/org/jiemamy/dialect/generic/GenericValidator.java	                        (rev 0)
+++ artemis/trunk/org.jiemamy.dialect/src/main/java/org/jiemamy/dialect/generic/GenericValidator.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others.
+ * Created on 2008/09/10
+ *
+ * This file is part of Jiemamy.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ */
+package org.jiemamy.dialect.generic;
+
+import org.jiemamy.core.extension.dialect.validator.AbstractIdentifierValidator;
+
+/**
+ * TODO for daisuke
+ * @author daisuke
+ */
+public class GenericValidator extends AbstractIdentifierValidator {
+	
+	/**
+	 * コンストラクタ。
+	 * 
+	 * @category instance creation
+	 */
+	public GenericValidator() {
+		super("^[A-Z][0-9A-Z]+$", new GenericReservedWords());
+	}
+	
+}


Property changes on: artemis/trunk/org.jiemamy.dialect/src/main/java/org/jiemamy/dialect/generic/GenericValidator.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Deleted: artemis/trunk/org.jiemamy.dialect/src/main/java/org/jiemamy/dialect/generic/ReservedWordsProvider.java
===================================================================
--- artemis/trunk/org.jiemamy.dialect/src/main/java/org/jiemamy/dialect/generic/ReservedWordsProvider.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.dialect/src/main/java/org/jiemamy/dialect/generic/ReservedWordsProvider.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -1,32 +0,0 @@
-/*
- * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others.
- * Created on 2008/08/24
- *
- * This file is part of Jiemamy.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
- * either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-package org.jiemamy.dialect.generic;
-
-/**
- * 予約語プロバイダ。
- * @author daisuke
- */
-public interface ReservedWordsProvider {
-	
-	/**
-	 * 予約語の配列を取得する。
-	 * @return 予約語の配列
-	 */
-	String[] getReservedWords();
-}

Modified: artemis/trunk/org.jiemamy.dialect.mysql/src/main/java/org/jiemamy/dialect/mysql/MySqlDialect.java
===================================================================
--- artemis/trunk/org.jiemamy.dialect.mysql/src/main/java/org/jiemamy/dialect/mysql/MySqlDialect.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.dialect.mysql/src/main/java/org/jiemamy/dialect/mysql/MySqlDialect.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -39,7 +39,8 @@
 	 * @category instance creation
 	 */
 	public MySqlDialect() {
-		super("^[09-a-zA-Z]$", new MySqlReservedWords());
+		super(new MySqlIdentifierValidator());
+		
 		registerDataType(IntegerDataType.class);
 	}
 	

Added: artemis/trunk/org.jiemamy.dialect.mysql/src/main/java/org/jiemamy/dialect/mysql/MySqlIdentifierValidator.java
===================================================================
--- artemis/trunk/org.jiemamy.dialect.mysql/src/main/java/org/jiemamy/dialect/mysql/MySqlIdentifierValidator.java	                        (rev 0)
+++ artemis/trunk/org.jiemamy.dialect.mysql/src/main/java/org/jiemamy/dialect/mysql/MySqlIdentifierValidator.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others.
+ * Created on 2008/09/10
+ *
+ * This file is part of Jiemamy.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ */
+package org.jiemamy.dialect.mysql;
+
+import org.jiemamy.core.extension.dialect.validator.AbstractIdentifierValidator;
+
+/**
+ * TODO for daisuke
+ * @author daisuke
+ */
+public class MySqlIdentifierValidator extends AbstractIdentifierValidator {
+	
+	/**
+	 * コンストラクタ。
+	 * @category instance creation
+	 */
+	public MySqlIdentifierValidator() {
+		super("^[09-a-zA-Z]$", new MySqlReservedWords());
+	}
+	
+}


Property changes on: artemis/trunk/org.jiemamy.dialect.mysql/src/main/java/org/jiemamy/dialect/mysql/MySqlIdentifierValidator.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: artemis/trunk/org.jiemamy.dialect.mysql/src/main/java/org/jiemamy/dialect/mysql/MySqlReservedWords.java
===================================================================
--- artemis/trunk/org.jiemamy.dialect.mysql/src/main/java/org/jiemamy/dialect/mysql/MySqlReservedWords.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.dialect.mysql/src/main/java/org/jiemamy/dialect/mysql/MySqlReservedWords.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -18,7 +18,7 @@
  */
 package org.jiemamy.dialect.mysql;
 
-import org.jiemamy.dialect.generic.ReservedWordsProvider;
+import org.jiemamy.core.extension.dialect.validator.ReservedWordsProvider;
 
 /**
  * MySQLの予約語を提供するクラス。

Modified: artemis/trunk/org.jiemamy.dialect.mysql/src/main/java/org/jiemamy/dialect/mysql/datatype/IntegerDataType.java
===================================================================
--- artemis/trunk/org.jiemamy.dialect.mysql/src/main/java/org/jiemamy/dialect/mysql/datatype/IntegerDataType.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.dialect.mysql/src/main/java/org/jiemamy/dialect/mysql/datatype/IntegerDataType.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -18,7 +18,7 @@
  */
 package org.jiemamy.dialect.mysql.datatype;
 
-import org.jiemamy.core.extension.dialect.MappingInfo;
+import org.jiemamy.core.extension.dialect.mapping.MappingInfo;
 import org.jiemamy.core.model.typedef.datatype.SpecialDataType;
 import org.jiemamy.dialect.datatype.generic.GenericIntegerDataType;
 

Modified: artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/PostgresqlDialect.java
===================================================================
--- artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/PostgresqlDialect.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/PostgresqlDialect.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -55,7 +55,7 @@
 	 * @category  instance creation
 	 */
 	public PostgresqlDialect() {
-		super("^[0-9a-zA-Z]$", new PostgresqlQuoter(), new PostgresqlReservedWords());
+		super(new PostgresqlIdentifierValidator(), new PostgresqlQuoter());
 		
 		registerDataType(IntegerDataType.class);
 		registerDataType(SmallIntegerDataType.class);

Added: artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/PostgresqlIdentifierValidator.java
===================================================================
--- artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/PostgresqlIdentifierValidator.java	                        (rev 0)
+++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/PostgresqlIdentifierValidator.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others.
+ * Created on 2008/09/10
+ *
+ * This file is part of Jiemamy.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ */
+package org.jiemamy.dialect.postgresql;
+
+import org.jiemamy.core.extension.dialect.validator.AbstractIdentifierValidator;
+
+/**
+ * TODO for daisuke
+ * @author daisuke
+ */
+public class PostgresqlIdentifierValidator extends AbstractIdentifierValidator {
+	
+	/**
+	 * コンストラクタ。
+	 * @category instance creation
+	 */
+	public PostgresqlIdentifierValidator() {
+		super("^[0-9a-zA-Z]$", new PostgresqlReservedWords());
+	}
+	
+}


Property changes on: artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/PostgresqlIdentifierValidator.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/PostgresqlQuoter.java
===================================================================
--- artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/PostgresqlQuoter.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/PostgresqlQuoter.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -18,7 +18,7 @@
  */
 package org.jiemamy.dialect.postgresql;
 
-import org.jiemamy.core.extension.dialect.Quoter;
+import org.jiemamy.core.extension.dialect.quoter.Quoter;
 
 /**
  * TODO for daisuke

Modified: artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/PostgresqlReservedWords.java
===================================================================
--- artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/PostgresqlReservedWords.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/PostgresqlReservedWords.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -18,7 +18,7 @@
  */
 package org.jiemamy.dialect.postgresql;
 
-import org.jiemamy.dialect.generic.ReservedWordsProvider;
+import org.jiemamy.core.extension.dialect.validator.ReservedWordsProvider;
 
 /**
  * PostgreSQLの予約語を提供するクラス。

Modified: artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/BigIntegerDataType.java
===================================================================
--- artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/BigIntegerDataType.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/BigIntegerDataType.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -18,7 +18,7 @@
  */
 package org.jiemamy.dialect.postgresql.datatype;
 
-import org.jiemamy.core.extension.dialect.MappingInfo;
+import org.jiemamy.core.extension.dialect.mapping.MappingInfo;
 import org.jiemamy.core.model.typedef.datatype.SpecialDataType;
 import org.jiemamy.dialect.datatype.generic.GenericBigIntegerDataType;
 

Modified: artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/BigSerialDataType.java
===================================================================
--- artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/BigSerialDataType.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/BigSerialDataType.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -18,7 +18,7 @@
  */
 package org.jiemamy.dialect.postgresql.datatype;
 
-import org.jiemamy.core.extension.dialect.MappingInfo;
+import org.jiemamy.core.extension.dialect.mapping.MappingInfo;
 import org.jiemamy.core.model.typedef.datatype.SpecialDataType;
 import org.jiemamy.dialect.datatype.generic.GenericBigIntegerDataType;
 

Modified: artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/BitDataType.java
===================================================================
--- artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/BitDataType.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/BitDataType.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -18,7 +18,7 @@
  */
 package org.jiemamy.dialect.postgresql.datatype;
 
-import org.jiemamy.core.extension.dialect.MappingInfo;
+import org.jiemamy.core.extension.dialect.mapping.MappingInfo;
 import org.jiemamy.core.model.typedef.datatype.SpecialDataType;
 import org.jiemamy.core.model.typedef.datatype.adapter.SizedDataType;
 import org.jiemamy.dialect.datatype.generic.GenericIntegerDataType;

Modified: artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/BlobDataType.java
===================================================================
--- artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/BlobDataType.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/BlobDataType.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -18,7 +18,7 @@
  */
 package org.jiemamy.dialect.postgresql.datatype;
 
-import org.jiemamy.core.extension.dialect.MappingInfo;
+import org.jiemamy.core.extension.dialect.mapping.MappingInfo;
 import org.jiemamy.core.model.typedef.datatype.SpecialDataType;
 import org.jiemamy.dialect.datatype.generic.GenericBlobDataType;
 

Modified: artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/BooleanDataType.java
===================================================================
--- artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/BooleanDataType.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/BooleanDataType.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -18,7 +18,7 @@
  */
 package org.jiemamy.dialect.postgresql.datatype;
 
-import org.jiemamy.core.extension.dialect.MappingInfo;
+import org.jiemamy.core.extension.dialect.mapping.MappingInfo;
 import org.jiemamy.core.model.typedef.datatype.SpecialDataType;
 import org.jiemamy.dialect.datatype.generic.GenericIntegerDataType;
 

Modified: artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/CharacterDataType.java
===================================================================
--- artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/CharacterDataType.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/CharacterDataType.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -18,7 +18,7 @@
  */
 package org.jiemamy.dialect.postgresql.datatype;
 
-import org.jiemamy.core.extension.dialect.MappingInfo;
+import org.jiemamy.core.extension.dialect.mapping.MappingInfo;
 import org.jiemamy.core.model.typedef.datatype.SpecialDataType;
 import org.jiemamy.core.model.typedef.datatype.adapter.SizedDataType;
 import org.jiemamy.dialect.datatype.generic.GenericCharacterDataType;

Modified: artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/DateDataType.java
===================================================================
--- artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/DateDataType.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/DateDataType.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -18,7 +18,7 @@
  */
 package org.jiemamy.dialect.postgresql.datatype;
 
-import org.jiemamy.core.extension.dialect.MappingInfo;
+import org.jiemamy.core.extension.dialect.mapping.MappingInfo;
 import org.jiemamy.core.model.typedef.datatype.SpecialDataType;
 import org.jiemamy.dialect.datatype.generic.GenericTimestampDataType;
 

Modified: artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/DecimalDataType.java
===================================================================
--- artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/DecimalDataType.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/DecimalDataType.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -18,7 +18,7 @@
  */
 package org.jiemamy.dialect.postgresql.datatype;
 
-import org.jiemamy.core.extension.dialect.MappingInfo;
+import org.jiemamy.core.extension.dialect.mapping.MappingInfo;
 import org.jiemamy.core.model.typedef.datatype.SpecialDataType;
 import org.jiemamy.core.model.typedef.datatype.adapter.PrecisionedDataType;
 import org.jiemamy.dialect.datatype.generic.GenericNumericDataType;

Modified: artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/DoubleDataType.java
===================================================================
--- artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/DoubleDataType.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/DoubleDataType.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -18,7 +18,7 @@
  */
 package org.jiemamy.dialect.postgresql.datatype;
 
-import org.jiemamy.core.extension.dialect.MappingInfo;
+import org.jiemamy.core.extension.dialect.mapping.MappingInfo;
 import org.jiemamy.core.model.typedef.datatype.SpecialDataType;
 import org.jiemamy.dialect.datatype.generic.GenericRealDataType;
 

Modified: artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/FloatDataType.java
===================================================================
--- artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/FloatDataType.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/FloatDataType.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -18,7 +18,7 @@
  */
 package org.jiemamy.dialect.postgresql.datatype;
 
-import org.jiemamy.core.extension.dialect.MappingInfo;
+import org.jiemamy.core.extension.dialect.mapping.MappingInfo;
 import org.jiemamy.core.model.typedef.datatype.SpecialDataType;
 import org.jiemamy.dialect.datatype.generic.GenericRealDataType;
 

Modified: artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/IntegerDataType.java
===================================================================
--- artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/IntegerDataType.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/IntegerDataType.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -18,7 +18,7 @@
  */
 package org.jiemamy.dialect.postgresql.datatype;
 
-import org.jiemamy.core.extension.dialect.MappingInfo;
+import org.jiemamy.core.extension.dialect.mapping.MappingInfo;
 import org.jiemamy.core.model.typedef.datatype.SpecialDataType;
 import org.jiemamy.dialect.datatype.generic.GenericIntegerDataType;
 

Modified: artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/IntervalDataType.java
===================================================================
--- artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/IntervalDataType.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/IntervalDataType.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -18,7 +18,7 @@
  */
 package org.jiemamy.dialect.postgresql.datatype;
 
-import org.jiemamy.core.extension.dialect.MappingInfo;
+import org.jiemamy.core.extension.dialect.mapping.MappingInfo;
 import org.jiemamy.core.model.typedef.datatype.SpecialDataType;
 import org.jiemamy.dialect.datatype.generic.GenericIntegerDataType;
 

Modified: artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/MoneyDataType.java
===================================================================
--- artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/MoneyDataType.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/MoneyDataType.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -18,7 +18,7 @@
  */
 package org.jiemamy.dialect.postgresql.datatype;
 
-import org.jiemamy.core.extension.dialect.MappingInfo;
+import org.jiemamy.core.extension.dialect.mapping.MappingInfo;
 import org.jiemamy.core.model.typedef.datatype.SpecialDataType;
 import org.jiemamy.dialect.datatype.generic.GenericIntegerDataType;
 

Modified: artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/NumericDataType.java
===================================================================
--- artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/NumericDataType.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/NumericDataType.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -18,7 +18,7 @@
  */
 package org.jiemamy.dialect.postgresql.datatype;
 
-import org.jiemamy.core.extension.dialect.MappingInfo;
+import org.jiemamy.core.extension.dialect.mapping.MappingInfo;
 import org.jiemamy.core.model.typedef.datatype.SpecialDataType;
 import org.jiemamy.core.model.typedef.datatype.adapter.PrecisionedDataType;
 import org.jiemamy.dialect.datatype.generic.GenericNumericDataType;

Modified: artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/RealDataType.java
===================================================================
--- artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/RealDataType.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/RealDataType.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -18,7 +18,7 @@
  */
 package org.jiemamy.dialect.postgresql.datatype;
 
-import org.jiemamy.core.extension.dialect.MappingInfo;
+import org.jiemamy.core.extension.dialect.mapping.MappingInfo;
 import org.jiemamy.core.model.typedef.datatype.SpecialDataType;
 import org.jiemamy.dialect.datatype.generic.GenericRealDataType;
 

Modified: artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/SerialDataType.java
===================================================================
--- artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/SerialDataType.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/SerialDataType.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -18,7 +18,7 @@
  */
 package org.jiemamy.dialect.postgresql.datatype;
 
-import org.jiemamy.core.extension.dialect.MappingInfo;
+import org.jiemamy.core.extension.dialect.mapping.MappingInfo;
 import org.jiemamy.core.model.typedef.datatype.SpecialDataType;
 import org.jiemamy.dialect.datatype.generic.GenericIntegerDataType;
 

Modified: artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/SmallIntegerDataType.java
===================================================================
--- artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/SmallIntegerDataType.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/SmallIntegerDataType.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -18,7 +18,7 @@
  */
 package org.jiemamy.dialect.postgresql.datatype;
 
-import org.jiemamy.core.extension.dialect.MappingInfo;
+import org.jiemamy.core.extension.dialect.mapping.MappingInfo;
 import org.jiemamy.core.model.typedef.datatype.SpecialDataType;
 import org.jiemamy.dialect.datatype.generic.GenericIntegerDataType;
 

Modified: artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/TextDataType.java
===================================================================
--- artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/TextDataType.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/TextDataType.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -18,7 +18,7 @@
  */
 package org.jiemamy.dialect.postgresql.datatype;
 
-import org.jiemamy.core.extension.dialect.MappingInfo;
+import org.jiemamy.core.extension.dialect.mapping.MappingInfo;
 import org.jiemamy.core.model.typedef.datatype.SpecialDataType;
 import org.jiemamy.dialect.datatype.generic.GenericClobDataType;
 

Modified: artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/TimeDataType.java
===================================================================
--- artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/TimeDataType.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/TimeDataType.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -18,7 +18,7 @@
  */
 package org.jiemamy.dialect.postgresql.datatype;
 
-import org.jiemamy.core.extension.dialect.MappingInfo;
+import org.jiemamy.core.extension.dialect.mapping.MappingInfo;
 import org.jiemamy.core.model.typedef.datatype.SpecialDataType;
 import org.jiemamy.core.model.typedef.datatype.adapter.TimezonedDataType;
 import org.jiemamy.dialect.datatype.generic.GenericTimestampDataType;

Modified: artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/TimestampDataType.java
===================================================================
--- artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/TimestampDataType.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/TimestampDataType.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -18,7 +18,7 @@
  */
 package org.jiemamy.dialect.postgresql.datatype;
 
-import org.jiemamy.core.extension.dialect.MappingInfo;
+import org.jiemamy.core.extension.dialect.mapping.MappingInfo;
 import org.jiemamy.core.model.typedef.datatype.SpecialDataType;
 import org.jiemamy.core.model.typedef.datatype.adapter.TimezonedDataType;
 import org.jiemamy.dialect.datatype.generic.GenericTimestampDataType;

Modified: artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/VarbitDataType.java
===================================================================
--- artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/VarbitDataType.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/VarbitDataType.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -18,7 +18,7 @@
  */
 package org.jiemamy.dialect.postgresql.datatype;
 
-import org.jiemamy.core.extension.dialect.MappingInfo;
+import org.jiemamy.core.extension.dialect.mapping.MappingInfo;
 import org.jiemamy.core.model.typedef.datatype.SpecialDataType;
 import org.jiemamy.core.model.typedef.datatype.adapter.SizedDataType;
 import org.jiemamy.dialect.datatype.generic.GenericIntegerDataType;

Modified: artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/VarcharDataType.java
===================================================================
--- artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/VarcharDataType.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/VarcharDataType.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -18,7 +18,7 @@
  */
 package org.jiemamy.dialect.postgresql.datatype;
 
-import org.jiemamy.core.extension.dialect.MappingInfo;
+import org.jiemamy.core.extension.dialect.mapping.MappingInfo;
 import org.jiemamy.core.model.typedef.datatype.SpecialDataType;
 import org.jiemamy.core.model.typedef.datatype.adapter.SizedDataType;
 import org.jiemamy.dialect.datatype.generic.GenericVarcharDataType;

Modified: artemis/trunk/org.jiemamy.dialect.postgresql/src/test/java/org/jiemamy/dialect/postgresql/PostgresqlDialectTest.java
===================================================================
--- artemis/trunk/org.jiemamy.dialect.postgresql/src/test/java/org/jiemamy/dialect/postgresql/PostgresqlDialectTest.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.dialect.postgresql/src/test/java/org/jiemamy/dialect/postgresql/PostgresqlDialectTest.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -31,8 +31,8 @@
 import org.junit.Test;
 
 import org.jiemamy.core.exception.DataTypeNotFoundException;
-import org.jiemamy.core.extension.dialect.DataTypeMapping;
 import org.jiemamy.core.extension.dialect.Dialect;
+import org.jiemamy.core.extension.dialect.mapping.DataTypeMapping;
 import org.jiemamy.core.model.typedef.datatype.AbstractDataType;
 import org.jiemamy.core.model.typedef.datatype.DataType;
 import org.jiemamy.core.model.typedef.datatype.GeneralDataType;

Modified: artemis/trunk/org.jiemamy.dialect.sql99/src/main/java/org/jiemamy/dialect/sql99/Sql99Dialect.java
===================================================================
--- artemis/trunk/org.jiemamy.dialect.sql99/src/main/java/org/jiemamy/dialect/sql99/Sql99Dialect.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.dialect.sql99/src/main/java/org/jiemamy/dialect/sql99/Sql99Dialect.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -39,7 +39,7 @@
 	 * @category instance creation
 	 */
 	public Sql99Dialect() {
-		super("^[09-a-zA-Z]$", new Sql99ReservedWords());
+		super(new Sql99IdentifierValidator());
 		registerDataType(IntegerDataType.class);
 	}
 	

Added: artemis/trunk/org.jiemamy.dialect.sql99/src/main/java/org/jiemamy/dialect/sql99/Sql99IdentifierValidator.java
===================================================================
--- artemis/trunk/org.jiemamy.dialect.sql99/src/main/java/org/jiemamy/dialect/sql99/Sql99IdentifierValidator.java	                        (rev 0)
+++ artemis/trunk/org.jiemamy.dialect.sql99/src/main/java/org/jiemamy/dialect/sql99/Sql99IdentifierValidator.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others.
+ * Created on 2008/09/10
+ *
+ * This file is part of Jiemamy.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ */
+package org.jiemamy.dialect.sql99;
+
+import org.jiemamy.core.extension.dialect.validator.AbstractIdentifierValidator;
+
+/**
+ * TODO for daisuke
+ * @author daisuke
+ */
+public class Sql99IdentifierValidator extends AbstractIdentifierValidator {
+	
+	/**
+	 * コンストラクタ。
+	 * @category instance creation
+	 */
+	public Sql99IdentifierValidator() {
+		super("^[09-a-zA-Z]$", new Sql99ReservedWords());
+	}
+	
+}


Property changes on: artemis/trunk/org.jiemamy.dialect.sql99/src/main/java/org/jiemamy/dialect/sql99/Sql99IdentifierValidator.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: artemis/trunk/org.jiemamy.dialect.sql99/src/main/java/org/jiemamy/dialect/sql99/Sql99ReservedWords.java
===================================================================
--- artemis/trunk/org.jiemamy.dialect.sql99/src/main/java/org/jiemamy/dialect/sql99/Sql99ReservedWords.java	2008-09-10 09:56:04 UTC (rev 1905)
+++ artemis/trunk/org.jiemamy.dialect.sql99/src/main/java/org/jiemamy/dialect/sql99/Sql99ReservedWords.java	2008-09-10 11:32:30 UTC (rev 1906)
@@ -18,7 +18,7 @@
  */
 package org.jiemamy.dialect.sql99;
 
-import org.jiemamy.dialect.generic.ReservedWordsProvider;
+import org.jiemamy.core.extension.dialect.validator.ReservedWordsProvider;
 
 /**
  * SQL99の予約語を提供するクラス。


Jiemamy-notify メーリングリストの案内
Back to archive index