svnno****@sourc*****
svnno****@sourc*****
2009年 2月 24日 (火) 23:31:54 JST
Revision: 2729 http://svn.sourceforge.jp/view?root=jiemamy&view=rev&rev=2729 Author: daisuke_m Date: 2009-02-24 23:31:54 +0900 (Tue, 24 Feb 2009) Log Message: ----------- javadoc / refactor / ミス修正 Modified Paths: -------------- artemis/trunk/jiemamy-artemis-test/src/test/java/org/jiemamy/serializer/JiemamySerializerTest.java artemis/trunk/jiemamy-composer/src/main/java/org/jiemamy/composer/exporter/SqlExporter.java artemis/trunk/jiemamy-composer/src/main/java/org/jiemamy/composer/importer/DatabaseImporter.java artemis/trunk/jiemamy-composer/src/test/java/org/jiemamy/composer/exporter/SqlExporterTest.java artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/dialect/AbstractDialect.java artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/dialect/DefaultDataTypeResolver.java artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/dialect/generic/GenericDialect.java artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/formatter/DefaultSqlFormatter.java artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/LogMarker.java artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/metadata/TableMeta.java artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/metadata/TypeInfoMeta.java artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/model/KeyConstraintUtil.java artemis/trunk/jiemamy-core/src/test/java/org/jiemamy/dialect/DefaultSqlEmitterTest.java artemis/trunk/jiemamy-core/src/test/java/org/jiemamy/utils/ListUtilTest.java artemis/trunk/jiemamy-core/src/test/java/org/jiemamy/utils/model/RootModelUtilTest.java artemis/trunk/jiemamy-dialect-mysql/src/main/java/org/jiemamy/dialect/mysql/MySqlEmitter.java artemis/trunk/jiemamy-dialect-mysql/src/main/java/org/jiemamy/dialect/mysql/adapter/StorageEngine.java artemis/trunk/jiemamy-dialect-mysql/src/test/java/org/jiemamy/dialect/mysql/MySqlEmitterTest.java zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/exception/TooManyElementsException.java zeus/trunk/jiemamy-spec-view/src/main/java/org/jiemamy/model/DiagramPresentations.java -------------- next part -------------- Modified: artemis/trunk/jiemamy-artemis-test/src/test/java/org/jiemamy/serializer/JiemamySerializerTest.java =================================================================== --- artemis/trunk/jiemamy-artemis-test/src/test/java/org/jiemamy/serializer/JiemamySerializerTest.java 2009-02-24 13:28:20 UTC (rev 2728) +++ artemis/trunk/jiemamy-artemis-test/src/test/java/org/jiemamy/serializer/JiemamySerializerTest.java 2009-02-24 14:31:54 UTC (rev 2729) @@ -43,9 +43,13 @@ import org.jiemamy.Jiemamy; import org.jiemamy.JiemamyFactory; +import org.jiemamy.model.DiagramPresentationModel; +import org.jiemamy.model.DiagramPresentations; import org.jiemamy.model.RootModel; import org.jiemamy.model.entity.TableModel; import org.jiemamy.model.entity.ViewModel; +import org.jiemamy.model.node.NodeAdapter; +import org.jiemamy.model.node.StickyModel; import org.jiemamy.test.ViewTestModelBuilder; import org.jiemamy.utils.XpathUtil; @@ -156,9 +160,11 @@ ViewModel view = (ViewModel) CollectionUtils.get(rootModel.getEntities(), 2); assertThat(view.getName(), is("V_HIGH_SAL_EMP")); - // FIXME -// assertThat(CollectionUtils.get(rootModel.getEntities(), 3), instanceOf(StickyModel.class)); -// StickyModel sticky = (StickyModel) CollectionUtils.get(rootModel.getEntities(), 3); -// assertThat(sticky.getContents(), is("メモーー")); + DiagramPresentations diagramPresentations = rootModel.getAdapter(DiagramPresentations.class); + DiagramPresentationModel diagramPresentation = diagramPresentations.get(0); + NodeAdapter node = (NodeAdapter) CollectionUtils.get(diagramPresentation.getFigureProfiles().keySet(), 3); + assertThat(node, instanceOf(StickyModel.class)); + StickyModel sticky = (StickyModel) node; + assertThat(sticky.getContents(), is("メモーー")); } } Modified: artemis/trunk/jiemamy-composer/src/main/java/org/jiemamy/composer/exporter/SqlExporter.java =================================================================== --- artemis/trunk/jiemamy-composer/src/main/java/org/jiemamy/composer/exporter/SqlExporter.java 2009-02-24 13:28:20 UTC (rev 2728) +++ artemis/trunk/jiemamy-composer/src/main/java/org/jiemamy/composer/exporter/SqlExporter.java 2009-02-24 14:31:54 UTC (rev 2729) @@ -28,6 +28,7 @@ import org.apache.commons.io.IOUtils; import org.apache.commons.lang.CharEncoding; import org.apache.commons.lang.ObjectUtils; +import org.apache.commons.lang.SystemUtils; import org.apache.commons.lang.Validate; import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang.builder.ToStringStyle; @@ -85,6 +86,7 @@ writer = new OutputStreamWriter(new FileOutputStream(outputFile), CharEncoding.UTF_8); for (SqlStatement stmt : statements) { writer.write(stmt.toString()); + writer.write(SystemUtils.LINE_SEPARATOR); } } catch (IOException e) { throw new ExportException(e); Modified: artemis/trunk/jiemamy-composer/src/main/java/org/jiemamy/composer/importer/DatabaseImporter.java =================================================================== --- artemis/trunk/jiemamy-composer/src/main/java/org/jiemamy/composer/importer/DatabaseImporter.java 2009-02-24 13:28:20 UTC (rev 2728) +++ artemis/trunk/jiemamy-composer/src/main/java/org/jiemamy/composer/importer/DatabaseImporter.java 2009-02-24 14:31:54 UTC (rev 2729) @@ -206,8 +206,6 @@ && (selectedEntities == null || selectedEntities.contains(entity.getString("TABLE_NAME")))) { EntityModel entityModel = dialect.createEntity(rootModel, entity, meta); if (entityModel != null) { - entityModel.setDescription(entity.getString("REMARKS")); - // UNDONE 制約などその他情報なども rootModel.getEntities().add(entityModel); } } Modified: artemis/trunk/jiemamy-composer/src/test/java/org/jiemamy/composer/exporter/SqlExporterTest.java =================================================================== --- artemis/trunk/jiemamy-composer/src/test/java/org/jiemamy/composer/exporter/SqlExporterTest.java 2009-02-24 13:28:20 UTC (rev 2728) +++ artemis/trunk/jiemamy-composer/src/test/java/org/jiemamy/composer/exporter/SqlExporterTest.java 2009-02-24 14:31:54 UTC (rev 2729) @@ -40,6 +40,7 @@ import org.jiemamy.composer.Exporter; import org.jiemamy.model.RootModel; import org.jiemamy.test.ReflectionDialectProvider; +import org.jiemamy.test.TestModelBuilder; /** * {@link SqlExporter}のテストクラス。 @@ -66,6 +67,8 @@ @Before public void setUp() throws Exception { Jiemamy jiemamy = Jiemamy.newInstance(new Artemis(), new ReflectionDialectProvider()); + TestModelBuilder mb = new TestModelBuilder(jiemamy); + mb.build(); factory = jiemamy.getFactory(); } @@ -87,6 +90,7 @@ @Test public void test01_モデルからSQLファイルがエクスポートできることを確認する() throws Exception { File outputFile = new File(FILENAME); + deleteFile(outputFile); assertThat(outputFile.exists(), is(false)); RootModel model = factory.getRootModel(); @@ -111,7 +115,6 @@ } finally { IOUtils.closeQuietly(reader); - deleteFile(outputFile); } } Modified: artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/dialect/AbstractDialect.java =================================================================== --- artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/dialect/AbstractDialect.java 2009-02-24 13:28:20 UTC (rev 2728) +++ artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/dialect/AbstractDialect.java 2009-02-24 14:31:54 UTC (rev 2729) @@ -24,6 +24,7 @@ import java.util.ArrayList; import java.util.List; +import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -56,7 +57,7 @@ private static Logger logger = LoggerFactory.getLogger(AbstractDialect.class); /** {@link DataTypeResolver} */ - private DataTypeResolver dataTypeResolver = new DefaultDataTypeResolver(); + private DataTypeResolver dataTypeResolver = new DefaultDataTypeResolver(this); /** {@link ConnectionAdvisor} */ private ConnectionAdvisor advisor = new DefaultConnectionAdvisor(); @@ -77,6 +78,11 @@ } else if ("VIEW".equals(type)) { result = createView(factory, name, meta); } + String remarks = entity.getString("REMARKS"); + if (StringUtils.isEmpty(remarks) == false) { + result.setDescription(remarks); + } + // UNDONE 制約などその他情報なども return result; } Modified: artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/dialect/DefaultDataTypeResolver.java =================================================================== --- artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/dialect/DefaultDataTypeResolver.java 2009-02-24 13:28:20 UTC (rev 2728) +++ artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/dialect/DefaultDataTypeResolver.java 2009-02-24 14:31:54 UTC (rev 2729) @@ -18,10 +18,7 @@ */ package org.jiemamy.dialect; -import java.util.Arrays; -import java.util.EnumSet; import java.util.List; -import java.util.Set; import org.apache.commons.lang.Validate; import org.apache.commons.lang.builder.ToStringBuilder; @@ -50,23 +47,23 @@ */ public class DefaultDataTypeResolver implements DataTypeResolver { - private final Set<DataTypeCategory> sizedDataType; + private final Dialect dialect; /** * インスタンスを生成する。 + * + * @param dialect */ - public DefaultDataTypeResolver() { - sizedDataType = - EnumSet.of(DataTypeCategory.CHARACTER, DataTypeCategory.BIT, DataTypeCategory.BIT, - DataTypeCategory.VARCHAR, DataTypeCategory.CLOB, DataTypeCategory.VARBIT); + public DefaultDataTypeResolver(Dialect dialect) { + this.dialect = dialect; } public List<Token> resolveDataType(DataType dataType, ReferenceResolver resolver) { List<Token> tokens = CollectionsUtil.newArrayList(); BuiltinDataType builtinDataType = DataTypeUtil.toBuiltinDataType(dataType, resolver); tokens.add(Keyword.of(builtinDataType.getTypeName())); - if (sizedDataType.contains(builtinDataType.getCategory()) + if (isSupport(SizedDataTypeAdapter.class, builtinDataType.getCategory()) && builtinDataType.hasAdapter(SizedDataTypeAdapter.class)) { Integer size = builtinDataType.getAdapter(SizedDataTypeAdapter.class).getSize(); if (size != null) { @@ -75,8 +72,8 @@ tokens.add(Separator.RIGHT_PAREN); } } - if (Arrays.asList(DataTypeCategory.FLOAT, DataTypeCategory.NUMERIC, DataTypeCategory.DECIMAL).contains( - builtinDataType.getCategory()) + + if (isSupport(PrecisionedDataTypeAdapter.class, builtinDataType.getCategory()) && builtinDataType.hasAdapter(PrecisionedDataTypeAdapter.class)) { PrecisionedDataTypeAdapter adapter = builtinDataType.getAdapter(PrecisionedDataTypeAdapter.class); Integer prec = adapter.getPrecision(); @@ -91,16 +88,12 @@ tokens.add(Separator.RIGHT_PAREN); } } - if (Arrays.asList(DataTypeCategory.TIME, DataTypeCategory.TIMESTAMP).contains(builtinDataType.getCategory()) + if (isSupport(TimezonedDataTypeAdapter.class, builtinDataType.getCategory()) && builtinDataType.hasAdapter(TimezonedDataTypeAdapter.class)) { TimezonedDataTypeAdapter adapter = builtinDataType.getAdapter(TimezonedDataTypeAdapter.class); Boolean withTimezone = adapter.isWithTimezone(); if (withTimezone != null) { - if (withTimezone) { - tokens.add(Keyword.WITH); - } else { - tokens.add(Keyword.WITHOUT); - } + tokens.add(withTimezone ? Keyword.WITH : Keyword.WITHOUT); tokens.add(Keyword.TIMEZONE); } } @@ -127,4 +120,13 @@ return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE); } + private boolean isSupport(Class<?> adapterClass, DataTypeCategory dataTypeCategory) { + List<BuiltinDataTypeMold> allDataTypes = dialect.getAllDataTypes(); + for (BuiltinDataTypeMold mold : allDataTypes) { + if (mold.getCategory() == dataTypeCategory && mold.getSupportedAdapterClasses().contains(adapterClass)) { + return true; + } + } + return false; + } } Modified: artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/dialect/generic/GenericDialect.java =================================================================== --- artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/dialect/generic/GenericDialect.java 2009-02-24 13:28:20 UTC (rev 2728) +++ artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/dialect/generic/GenericDialect.java 2009-02-24 14:31:54 UTC (rev 2729) @@ -48,7 +48,7 @@ */ public class GenericDialect implements Dialect { - private DataTypeResolver dataTypeResolver = new DefaultDataTypeResolver(); + private DataTypeResolver dataTypeResolver = new DefaultDataTypeResolver(this); private ConnectionAdvisor advisor = new DefaultConnectionAdvisor(); @@ -56,6 +56,7 @@ static { List<BuiltinDataTypeMold> list = CollectionsUtil.newArrayList(); + // FIXME 適当 list.add(new BuiltinDataTypeMoldImpl(DataTypeCategory.CHARACTER, SizedDataTypeAdapter.class)); list.add(new BuiltinDataTypeMoldImpl(DataTypeCategory.VARCHAR, SizedDataTypeAdapter.class)); list.add(new BuiltinDataTypeMoldImpl(DataTypeCategory.CLOB, SizedDataTypeAdapter.class)); @@ -92,7 +93,6 @@ } public List<BuiltinDataTypeMold> getAllDataTypes() { - // FIXME 適当 return allDataTypes; } Modified: artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/formatter/DefaultSqlFormatter.java =================================================================== --- artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/formatter/DefaultSqlFormatter.java 2009-02-24 13:28:20 UTC (rev 2728) +++ artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/formatter/DefaultSqlFormatter.java 2009-02-24 14:31:54 UTC (rev 2729) @@ -33,7 +33,16 @@ public static final String WHITESPACE = " "; + /** + * トークンがセパレータかどうか調べる。{@code null}だった場合は無条件で{@code true}を返す。 + * + * @param token トークン + * @return セパレータまたは{@code null}の場合{@code true}、そうでない場合は{@code false} + */ public static boolean isSeparator(Token token) { + if (token == null) { + return true; + } return token instanceof Separator; } @@ -41,8 +50,7 @@ StringBuilder sb = new StringBuilder(); Token lastToken = null; for (Token token : stmt.toTokens()) { - if ((isSeparator(lastToken) == false && isSeparator(token) == false) || lastToken == null - || lastToken.equals(Separator.COMMA)) { + if ((isSeparator(lastToken) == false && isSeparator(token) == false) || Separator.COMMA.equals(lastToken)) { sb.append(WHITESPACE); } sb.append(token); Modified: artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/LogMarker.java =================================================================== --- artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/LogMarker.java 2009-02-24 13:28:20 UTC (rev 2728) +++ artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/LogMarker.java 2009-02-24 14:31:54 UTC (rev 2729) @@ -22,7 +22,7 @@ import org.slf4j.MarkerFactory; /** - * TODO for daisuke + * SLF4J用、ログマーカーを提供する定数クラス。 * * <p>cf. <a * href="http://d.hatena.ne.jp/taichitaichi/20090220/1235124140">http://d.hatena.ne.jp/taichitaichi/20090220/1235124140</a></p> Modified: artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/metadata/TableMeta.java =================================================================== --- artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/metadata/TableMeta.java 2009-02-24 13:28:20 UTC (rev 2728) +++ artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/metadata/TableMeta.java 2009-02-24 14:31:54 UTC (rev 2729) @@ -102,13 +102,13 @@ * @author daisuke */ public enum RefGeneration { - /** TODO for daisuke */ + /** システムテーブル */ SYSTEM, - /** TODO for daisuke */ + /** ユーザテーブル */ USER, - /** TODO for daisuke */ + /** 派生テーブル */ DERIVED } Modified: artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/metadata/TypeInfoMeta.java =================================================================== --- artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/metadata/TypeInfoMeta.java 2009-02-24 13:28:20 UTC (rev 2728) +++ artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/metadata/TypeInfoMeta.java 2009-02-24 14:31:54 UTC (rev 2729) @@ -28,6 +28,7 @@ /** * DBから読み出したデータ型情報の保持クラス。 + * * {@link DatabaseMetaData#getTypeInfo()}の結果の一つを表す値クラス。 * @author daisuke */ @@ -90,6 +91,7 @@ /** * インスタンスを生成する。 + * * @param typeInfo * @throws SQLException * @throws IllegalArgumentException 引数に{@code null}を与えた場合 @@ -165,7 +167,10 @@ } /** - * TODO for daisuke + * can you use "WHERE" based on this type. + * + * <p>THINK 何のこっちゃ。</p> + * * @author daisuke */ public static enum Searchable { Modified: artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/model/KeyConstraintUtil.java =================================================================== --- artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/model/KeyConstraintUtil.java 2009-02-24 13:28:20 UTC (rev 2728) +++ artemis/trunk/jiemamy-core/src/main/java/org/jiemamy/utils/model/KeyConstraintUtil.java 2009-02-24 14:31:54 UTC (rev 2729) @@ -84,10 +84,10 @@ } /** - * TODO for daisuke + * キーカラム名のカンマ区切りの文字列に変換する。 * - * @param keyModel - * @return + * @param keyModel 変換対象キー + * @return キーカラム名のカンマ区切りの文字列 */ public static String toStringKeyColumns(KeyConstraintModel keyModel) { // TODO keyModel.getName()も活用 Modified: artemis/trunk/jiemamy-core/src/test/java/org/jiemamy/dialect/DefaultSqlEmitterTest.java =================================================================== --- artemis/trunk/jiemamy-core/src/test/java/org/jiemamy/dialect/DefaultSqlEmitterTest.java 2009-02-24 13:28:20 UTC (rev 2728) +++ artemis/trunk/jiemamy-core/src/test/java/org/jiemamy/dialect/DefaultSqlEmitterTest.java 2009-02-24 14:31:54 UTC (rev 2729) @@ -26,9 +26,12 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.jiemamy.Artemis; import org.jiemamy.Jiemamy; import org.jiemamy.model.sql.SqlStatement; +import org.jiemamy.test.ReflectionDialectProvider; import org.jiemamy.test.TestModelBuilder2; +import org.jiemamy.utils.model.RootModelUtil; /** * {@link DefaultSqlEmitter}のテストクラス。 @@ -51,10 +54,11 @@ */ @Before public void setUp() throws Exception { - TestModelBuilder2 testModelBuilder = new TestModelBuilder2(); + jiemamy = Jiemamy.newInstance(new Artemis(), new ReflectionDialectProvider()); + TestModelBuilder2 testModelBuilder = new TestModelBuilder2(jiemamy); testModelBuilder.build(); - jiemamy = testModelBuilder.getJiemamy(); - sqlEmitter = new DefaultSqlEmitter(new DefaultDataTypeResolver()); + Dialect dialect = RootModelUtil.getDialect(testModelBuilder.rootModel); + sqlEmitter = new DefaultSqlEmitter(new DefaultDataTypeResolver(dialect)); } /** Modified: artemis/trunk/jiemamy-core/src/test/java/org/jiemamy/utils/ListUtilTest.java =================================================================== --- artemis/trunk/jiemamy-core/src/test/java/org/jiemamy/utils/ListUtilTest.java 2009-02-24 13:28:20 UTC (rev 2728) +++ artemis/trunk/jiemamy-core/src/test/java/org/jiemamy/utils/ListUtilTest.java 2009-02-24 14:31:54 UTC (rev 2729) @@ -30,7 +30,7 @@ import org.junit.Test; /** - * TODO for daisuke + * {@link ListUtil}のテストクラス。 * * @author daisuke */ Modified: artemis/trunk/jiemamy-core/src/test/java/org/jiemamy/utils/model/RootModelUtilTest.java =================================================================== --- artemis/trunk/jiemamy-core/src/test/java/org/jiemamy/utils/model/RootModelUtilTest.java 2009-02-24 13:28:20 UTC (rev 2728) +++ artemis/trunk/jiemamy-core/src/test/java/org/jiemamy/utils/model/RootModelUtilTest.java 2009-02-24 14:31:54 UTC (rev 2729) @@ -77,7 +77,8 @@ } /** - * TODO for daisuke + * {@link RootModelUtil#setDialect(RootModel, Class)}, + * {@link RootModelUtil#setDialect(RootModel, Dialect)}のテストクラス。 * * @throws Exception */ Modified: artemis/trunk/jiemamy-dialect-mysql/src/main/java/org/jiemamy/dialect/mysql/MySqlEmitter.java =================================================================== --- artemis/trunk/jiemamy-dialect-mysql/src/main/java/org/jiemamy/dialect/mysql/MySqlEmitter.java 2009-02-24 13:28:20 UTC (rev 2728) +++ artemis/trunk/jiemamy-dialect-mysql/src/main/java/org/jiemamy/dialect/mysql/MySqlEmitter.java 2009-02-24 14:31:54 UTC (rev 2729) @@ -42,7 +42,7 @@ import org.jiemamy.utils.CollectionsUtil; /** - * TODO for daisuke + * MySQL用のSqlEmitter実装クラス。 * * @author daisuke */ Modified: artemis/trunk/jiemamy-dialect-mysql/src/main/java/org/jiemamy/dialect/mysql/adapter/StorageEngine.java =================================================================== --- artemis/trunk/jiemamy-dialect-mysql/src/main/java/org/jiemamy/dialect/mysql/adapter/StorageEngine.java 2009-02-24 13:28:20 UTC (rev 2728) +++ artemis/trunk/jiemamy-dialect-mysql/src/main/java/org/jiemamy/dialect/mysql/adapter/StorageEngine.java 2009-02-24 14:31:54 UTC (rev 2729) @@ -19,23 +19,23 @@ package org.jiemamy.dialect.mysql.adapter; /** - * MySQLのストレージエンジンを表すインターフェイス。 + * MySQLのストレージエンジンを保持するモデルのインターフェイス。 * * @author daisuke */ public interface StorageEngine { /** - * TODO for daisuke + * ストレージエンジンを取得する。 * - * @return + * @return ストレージエンジン */ StorageEngineType getType(); /** - * TODO for daisuke + * ストレージエンジンを設定する。 * - * @param type + * @param type ストレージエンジン */ void setType(StorageEngineType type); } Modified: artemis/trunk/jiemamy-dialect-mysql/src/test/java/org/jiemamy/dialect/mysql/MySqlEmitterTest.java =================================================================== --- artemis/trunk/jiemamy-dialect-mysql/src/test/java/org/jiemamy/dialect/mysql/MySqlEmitterTest.java 2009-02-24 13:28:20 UTC (rev 2728) +++ artemis/trunk/jiemamy-dialect-mysql/src/test/java/org/jiemamy/dialect/mysql/MySqlEmitterTest.java 2009-02-24 14:31:54 UTC (rev 2729) @@ -28,12 +28,14 @@ import org.jiemamy.Jiemamy; import org.jiemamy.dialect.DefaultDataTypeResolver; +import org.jiemamy.dialect.Dialect; import org.jiemamy.dialect.SqlEmitter; import org.jiemamy.dialect.mysql.adapter.StandardEngine; import org.jiemamy.dialect.mysql.adapter.StorageEngine; import org.jiemamy.dialect.mysql.adapter.StorageEngineImpl; import org.jiemamy.model.sql.SqlStatement; import org.jiemamy.test.TestModelBuilder; +import org.jiemamy.utils.model.RootModelUtil; /** * TODO for daisuke @@ -62,8 +64,10 @@ mb.tableDept.registerAdapter(new StorageEngineImpl()); mb.tableDept.getAdapter(StorageEngine.class).setType(StandardEngine.InnoDB); + Dialect dialect = RootModelUtil.getDialect(mb.rootModel); + jiemamy = mb.getJiemamy(); - sqlEmitter = new MySqlEmitter(new DefaultDataTypeResolver()); + sqlEmitter = new MySqlEmitter(new DefaultDataTypeResolver(dialect)); } /** Modified: zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/exception/TooManyElementsException.java =================================================================== --- zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/exception/TooManyElementsException.java 2009-02-24 13:28:20 UTC (rev 2728) +++ zeus/trunk/jiemamy-spec-core/src/main/java/org/jiemamy/exception/TooManyElementsException.java 2009-02-24 14:31:54 UTC (rev 2729) @@ -24,7 +24,7 @@ /** * 問い合わせの結果、同名の要素が複数存在する時スローされる例外。 * - * THINK hasManyElement(String name)メソッド+ {@link IllegalStateException}を検討 + * <p>THINK hasManyElement(String name)メソッド+ {@link IllegalStateException}を検討</p> * * @author daisuke */ Modified: zeus/trunk/jiemamy-spec-view/src/main/java/org/jiemamy/model/DiagramPresentations.java =================================================================== --- zeus/trunk/jiemamy-spec-view/src/main/java/org/jiemamy/model/DiagramPresentations.java 2009-02-24 13:28:20 UTC (rev 2728) +++ zeus/trunk/jiemamy-spec-view/src/main/java/org/jiemamy/model/DiagramPresentations.java 2009-02-24 14:31:54 UTC (rev 2729) @@ -20,7 +20,9 @@ /** * ダイアグラム表現の集合を表すモデルインターフェイス。 - * THINK implements java.util.List の方がいい? + * + * <p>THINK implements java.util.List の方がいい?</p> + * * @author daisuke */ @Adapter(AdapterType.MODEL)