[Jiemamy-notify] commit [2220] refactor

Zurück zum Archiv-Index

svnno****@sourc***** svnno****@sourc*****
2008年 12月 7日 (日) 23:44:54 JST


Revision: 2220
          http://svn.sourceforge.jp/view?root=jiemamy&view=rev&rev=2220
Author:   daisuke_m
Date:     2008-12-07 23:44:54 +0900 (Sun, 07 Dec 2008)

Log Message:
-----------
refactor

Modified Paths:
--------------
    artemis/trunk/org.jiemamy.dialect/src/main/java/org/jiemamy/dialect/AbstractDialect.java
    artemis/trunk/org.jiemamy.dialect/src/main/java/org/jiemamy/dialect/general/GeneralDialect.java
    artemis/trunk/org.jiemamy.project/documents/components.odp
    artemis/trunk/org.jiemamy.serializer/src/main/java/org/jiemamy/model/RootCommand.java
    zeus/trunk/org.jiemamy.spec.core/src/main/java/org/jiemamy/model/JiemamyModelFactory.java


-------------- next part --------------
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-12-05 15:53:03 UTC (rev 2219)
+++ artemis/trunk/org.jiemamy.dialect/src/main/java/org/jiemamy/dialect/AbstractDialect.java	2008-12-07 14:44:54 UTC (rev 2220)
@@ -40,6 +40,7 @@
 import org.jiemamy.extension.dialect.mapping.DataTypeMapping;
 import org.jiemamy.model.ColumnModel;
 import org.jiemamy.model.FactoryStrategy;
+import org.jiemamy.model.JiemamyModelFactory;
 import org.jiemamy.model.RootModel;
 import org.jiemamy.model.constraint.NotNullConstraintModel;
 import org.jiemamy.model.constraint.PrimaryKeyConstraintModel;
@@ -127,14 +128,23 @@
 	 * {@inheritDoc}
 	 */
 	public RootModel toRootModel(List<SqlStatement> statements, FactoryStrategy strategy) {
-		throw new UnsupportedOperationException();
+		JiemamyModelFactory.init(strategy);
+		RootModel rootModel = JiemamyModelFactory.newRootModel();
+		
+		// TODO
+		
+		return rootModel;
 	}
 	
 	/**
 	 * {@inheritDoc}
 	 */
 	public List<SqlStatement> toStatements(RootModel rootModel) {
-		throw new UnsupportedOperationException();
+		List<SqlStatement> result = CollectionsUtil.newArrayList();
+		
+		// TODO
+		
+		return result;
 	}
 	
 	/**

Modified: artemis/trunk/org.jiemamy.dialect/src/main/java/org/jiemamy/dialect/general/GeneralDialect.java
===================================================================
--- artemis/trunk/org.jiemamy.dialect/src/main/java/org/jiemamy/dialect/general/GeneralDialect.java	2008-12-05 15:53:03 UTC (rev 2219)
+++ artemis/trunk/org.jiemamy.dialect/src/main/java/org/jiemamy/dialect/general/GeneralDialect.java	2008-12-07 14:44:54 UTC (rev 2220)
@@ -24,7 +24,6 @@
 
 import org.jiemamy.core.extension.dialect.DefaultConnectionAdvisor;
 import org.jiemamy.core.extension.dialect.mapping.GeneralDataTypeMapping;
-import org.jiemamy.core.extension.dialect.validator.ReservedWordsProvider;
 import org.jiemamy.dialect.general.datatype.GenericBigIntegerDataType;
 import org.jiemamy.dialect.general.datatype.GenericBlobDataType;
 import org.jiemamy.dialect.general.datatype.GenericCharacterDataType;
@@ -85,15 +84,6 @@
 	}
 	
 	/**
-	 * コンストラクタ。
-	 * @param identifierPattern
-	 * @param reservedWords
-	 * @category  instance creation
-	 */
-	protected GeneralDialect(String identifierPattern, ReservedWordsProvider reservedWords) {
-	}
-	
-	/**
 	 * {@inheritDoc}
 	 */
 	public AbstractEntityModel createEntity(RootModel rootModel, ResultSet entity, DatabaseMetaData meta) {

Modified: artemis/trunk/org.jiemamy.project/documents/components.odp
===================================================================
(Binary files differ)

Modified: artemis/trunk/org.jiemamy.serializer/src/main/java/org/jiemamy/model/RootCommand.java
===================================================================
--- artemis/trunk/org.jiemamy.serializer/src/main/java/org/jiemamy/model/RootCommand.java	2008-12-05 15:53:03 UTC (rev 2219)
+++ artemis/trunk/org.jiemamy.serializer/src/main/java/org/jiemamy/model/RootCommand.java	2008-12-07 14:44:54 UTC (rev 2220)
@@ -70,7 +70,7 @@
 			rootModel = JiemamyModelFactory.newRootModel();
 		} else {
 			UUID uuid = UUID.fromString(id);
-			rootModel = JiemamyModelFactory.createRoot(uuid);
+			rootModel = JiemamyModelFactory.newRootModel(uuid);
 		}
 		modelInfo.setRootModel(rootModel);
 		super.start(element, modelInfo, attributes);

Modified: zeus/trunk/org.jiemamy.spec.core/src/main/java/org/jiemamy/model/JiemamyModelFactory.java
===================================================================
--- zeus/trunk/org.jiemamy.spec.core/src/main/java/org/jiemamy/model/JiemamyModelFactory.java	2008-12-05 15:53:03 UTC (rev 2219)
+++ zeus/trunk/org.jiemamy.spec.core/src/main/java/org/jiemamy/model/JiemamyModelFactory.java	2008-12-07 14:44:54 UTC (rev 2220)
@@ -39,15 +39,6 @@
 	
 
 	/**
-	 * 新しい {@link RootModel} のインスタンスを取得する。
-	 * @return {@link RootModel}のインスタンス。
-	 * @throws IllegalStateException ファクトリが初期化されていない場合
-	 */
-	public static RootModel newRootModel() {
-		return newModel(null, RootModel.class);
-	}
-	
-	/**
 	* インスタンス生成戦略を取得する。
 	* @return インスタンス生成戦略
 	 * @throws IllegalStateException ファクトリが初期化されていない場合
@@ -74,12 +65,21 @@
 	}
 	
 	/**
+	 * 新しい {@link RootModel} のインスタンスを取得する。
+	 * @return {@link RootModel}のインスタンス。
+	 * @throws IllegalStateException ファクトリが初期化されていない場合
+	 */
+	public static RootModel newRootModel() {
+		return newModel(null, RootModel.class);
+	}
+	
+	/**
 	 * 指定したIDを持つ、新しい {@link RootModel} のインスタンスを取得する。
 	 * @param id 生成される {@link RootModel} が持つモデルID
 	 * @return {@link RootModel}のインスタンス。
 	 * @throws IllegalStateException ファクトリが初期化されていない場合
 	 */
-	static RootModel createRoot(UUID id) {
+	static RootModel newRootModel(UUID id) {
 		return newModel(null, RootModel.class, id);
 	}
 	


Jiemamy-notify メーリングリストの案内
Zurück zum Archiv-Index