svnno****@sourc*****
svnno****@sourc*****
2008年 12月 24日 (水) 18:29:44 JST
Revision: 2295 http://svn.sourceforge.jp/view?root=jiemamy&view=rev&rev=2295 Author: daisuke_m Date: 2008-12-24 18:29:44 +0900 (Wed, 24 Dec 2008) Log Message: ----------- Jiemamy.init() を追加。 / ModelBuilderを追加。 Modified Paths: -------------- artemis/trunk/org.jiemamy.composer/src/test/java/org/jiemamy/composer/importer/DatabaseImporterTest.java artemis/trunk/org.jiemamy.core/src/test/java/org/jiemamy/model/RootModelImplTest.java artemis/trunk/org.jiemamy.core/src/test/java/org/jiemamy/model/node/TableModelImplTest.java artemis/trunk/org.jiemamy.dialect/src/test/java/org/jiemamy/dialect/generic/GenericDialectTest.java artemis/trunk/org.jiemamy.dialect/src/test/java/org/jiemamy/dialect/openjpa/OpenJpaGenerateSqlTest.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/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.event/src/test/java/org/jiemamy/model/RootModelEventTest.java artemis/trunk/org.jiemamy.event/src/test/java/org/jiemamy/util/ObservableListTest.java artemis/trunk/org.jiemamy.event/src/test/java/org/jiemamy/util/ObservableMapTest.java artemis/trunk/org.jiemamy.serializer/src/test/java/org/jiemamy/internal/serializer/sax/ModelInputStreamTest.java artemis/trunk/org.jiemamy.serializer/src/test/java/org/jiemamy/serializer/ApplicationModelCreator.java Added Paths: ----------- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/BigIntegerDesc.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/BlobDesc.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/CharacterDesc.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/ClobDesc.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/GenericDesc.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/IntegerDesc.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/NumericDesc.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/RealDesc.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/TimestampDesc.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/VarcharDesc.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/utils/builder/ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/utils/builder/ColumnBuilder.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/utils/builder/ForeignKeyBuilder.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/utils/builder/ModelBuilder.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/utils/builder/TableBuilder.java artemis/trunk/org.jiemamy.core/src/test/java/org/jiemamy/utils/builder/ artemis/trunk/org.jiemamy.core/src/test/java/org/jiemamy/utils/builder/ModelBuilderTest.java Removed Paths: ------------- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/BigIntegerDataTypeDescriptor.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/BlobDataTypeDescriptor.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/CharacterDataTypeDescriptor.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/ClobDataTypeDescriptor.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/GenericDataTypeDescriptor.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/IntegerDataTypeDescriptor.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/NumericDataTypeDescriptor.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/RealDataTypeDescriptor.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/TimestampDataTypeDescriptor.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/VarcharDataTypeDescriptor.java -------------- next part -------------- Modified: artemis/trunk/org.jiemamy.composer/src/test/java/org/jiemamy/composer/importer/DatabaseImporterTest.java =================================================================== --- artemis/trunk/org.jiemamy.composer/src/test/java/org/jiemamy/composer/importer/DatabaseImporterTest.java 2008-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.composer/src/test/java/org/jiemamy/composer/importer/DatabaseImporterTest.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -46,8 +46,8 @@ import org.jiemamy.model.attribute.ColumnModel; import org.jiemamy.model.connection.ForeignKeyModel; import org.jiemamy.model.constraint.PrimaryKeyConstraintModel; -import org.jiemamy.model.datatype.IntegerDataTypeDescriptor; -import org.jiemamy.model.datatype.VarcharDataTypeDescriptor; +import org.jiemamy.model.datatype.IntegerDesc; +import org.jiemamy.model.datatype.VarcharDesc; import org.jiemamy.model.datatype.adapter.SizedDataTypeAdapter; import org.jiemamy.model.node.AbstractEntityModel; import org.jiemamy.model.node.TableModel; @@ -128,7 +128,7 @@ ColumnModel column1 = pollTable.getColumns().get(0); logger.info(" Column - " + column1.getName()); assertThat(column1.getName(), is("poll_id")); - assertThat(column1.getDataTypeDescriptor(), instanceOf(IntegerDataTypeDescriptor.class)); + assertThat(column1.getDataTypeDescriptor(), instanceOf(IntegerDesc.class)); // FIXME この仕様はまだ未実装 // assertThat(column1.getDataTypeDescriptor().hasAdapter(SerialDataTypeAdapter.class), is(true)); assertThat(column1.getConstraints().has(PrimaryKeyConstraintModel.class), is(true)); @@ -136,9 +136,9 @@ ColumnModel column2 = pollTable.getColumns().get(1); logger.info(" Column - " + column2.getName()); assertThat(column2.getName(), is("title")); - assertThat(column2.getDataTypeDescriptor(), instanceOf(VarcharDataTypeDescriptor.class)); + assertThat(column2.getDataTypeDescriptor(), instanceOf(VarcharDesc.class)); assertThat(column2.getDataTypeDescriptor().getAdapter(SizedDataTypeAdapter.class).getSize(), is(128)); - assertThat(column2.getDataTypeDescriptorAs(VarcharDataTypeDescriptor.class).getSize(), is(128)); + assertThat(column2.getDataTypeDescriptorAs(VarcharDesc.class).getSize(), is(128)); assertThat(column2.getConstraints().has(PrimaryKeyConstraintModel.class), is(false)); ForeignKeyModel foreignKeyModel = (ForeignKeyModel) pollTable.getTargetConnections().iterator().next(); @@ -182,7 +182,7 @@ ctx.setValue(DatabaseImporter.DIALECT, dialect); ctx.setValue(DatabaseImporter.DATABASE_NAME, "jpoll"); ctx.setValue(DatabaseImporter.DRIVER_JAR_PATH, new URL[] { - new File("./src/test/resources/postgresql-8.3-603.jdbc3.jar").toURL() + new File("./lib/h2-1.1.102.jar").toURL() }); ctx.setValue(DatabaseImporter.DRIVER_CLASS_NAME, "org.h2.Driver"); ctx.setValue(DatabaseImporter.URI, "jdbc:h2:./src/test/resources/database/testdb"); Deleted: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/BigIntegerDataTypeDescriptor.java =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/BigIntegerDataTypeDescriptor.java 2008-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/BigIntegerDataTypeDescriptor.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -1,28 +0,0 @@ -/* - * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. - * Created on 2008/07/19 - * - * 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.model.datatype; - -/** - * BIGINTEGER型の汎用DataTypeクラス。 - * @author daisuke - */ - @ SuppressWarnings("serial") -public class BigIntegerDataTypeDescriptor extends AbstractDataTypeDescriptor { - -} Copied: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/BigIntegerDesc.java (from rev 2294, artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/BigIntegerDataTypeDescriptor.java) =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/BigIntegerDesc.java (rev 0) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/BigIntegerDesc.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -0,0 +1,28 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. + * Created on 2008/07/19 + * + * 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.model.datatype; + +/** + * BIGINTEGER型の汎用DataTypeクラス。 + * @author daisuke + */ + @ SuppressWarnings("serial") +public class BigIntegerDesc extends AbstractDataTypeDescriptor { + +} Deleted: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/BlobDataTypeDescriptor.java =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/BlobDataTypeDescriptor.java 2008-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/BlobDataTypeDescriptor.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -1,28 +0,0 @@ -/* - * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. - * Created on 2008/07/19 - * - * 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.model.datatype; - -/** - * BLOB型の汎用DataTypeクラス。 - * @author daisuke - */ - @ SuppressWarnings("serial") -public class BlobDataTypeDescriptor extends AbstractDataTypeDescriptor { - -} Copied: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/BlobDesc.java (from rev 2294, artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/BlobDataTypeDescriptor.java) =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/BlobDesc.java (rev 0) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/BlobDesc.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -0,0 +1,28 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. + * Created on 2008/07/19 + * + * 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.model.datatype; + +/** + * BLOB型の汎用DataTypeクラス。 + * @author daisuke + */ + @ SuppressWarnings("serial") +public class BlobDesc extends AbstractDataTypeDescriptor { + +} Deleted: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/CharacterDataTypeDescriptor.java =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/CharacterDataTypeDescriptor.java 2008-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/CharacterDataTypeDescriptor.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -1,56 +0,0 @@ -/* - * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. - * Created on 2008/07/19 - * - * 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.model.datatype; - -import org.jiemamy.model.datatype.adapter.SizedDataTypeAdapter; - -/** - * CHARACTER型の汎用DataTypeクラス。 - * @author daisuke - */ - @ SuppressWarnings("serial") -public class CharacterDataTypeDescriptor extends AbstractDataTypeDescriptor { - - /** - * コンストラクタ。 - * @category instance creation - */ - public CharacterDataTypeDescriptor() { - this(1); - } - - /** - * コンストラクタ。 - * @param size - * @category instance creation - */ - public CharacterDataTypeDescriptor(int size) { - SizedDataTypeAdapter adapter = new SizedDataTypeAdapter(); - adapter.setSize(size); - registerAdapter(adapter); - } - - public int getSize() { - return getAdapter(SizedDataTypeAdapter.class).getSize(); - } - - public void setSize(int size) { - getAdapter(SizedDataTypeAdapter.class).setSize(size); - } -} Copied: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/CharacterDesc.java (from rev 2294, artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/CharacterDataTypeDescriptor.java) =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/CharacterDesc.java (rev 0) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/CharacterDesc.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -0,0 +1,56 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. + * Created on 2008/07/19 + * + * 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.model.datatype; + +import org.jiemamy.model.datatype.adapter.SizedDataTypeAdapter; + +/** + * CHARACTER型の汎用DataTypeクラス。 + * @author daisuke + */ + @ SuppressWarnings("serial") +public class CharacterDesc extends AbstractDataTypeDescriptor { + + /** + * コンストラクタ。 + * @category instance creation + */ + public CharacterDesc() { + this(1); + } + + /** + * コンストラクタ。 + * @param size + * @category instance creation + */ + public CharacterDesc(int size) { + SizedDataTypeAdapter adapter = new SizedDataTypeAdapter(); + adapter.setSize(size); + registerAdapter(adapter); + } + + public int getSize() { + return getAdapter(SizedDataTypeAdapter.class).getSize(); + } + + public void setSize(int size) { + getAdapter(SizedDataTypeAdapter.class).setSize(size); + } +} Deleted: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/ClobDataTypeDescriptor.java =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/ClobDataTypeDescriptor.java 2008-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/ClobDataTypeDescriptor.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -1,28 +0,0 @@ -/* - * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. - * Created on 2008/07/19 - * - * 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.model.datatype; - -/** - * CLOB型の汎用DataTypeクラス。 - * @author daisuke - */ - @ SuppressWarnings("serial") -public class ClobDataTypeDescriptor extends AbstractDataTypeDescriptor { - -} Copied: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/ClobDesc.java (from rev 2294, artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/ClobDataTypeDescriptor.java) =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/ClobDesc.java (rev 0) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/ClobDesc.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -0,0 +1,28 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. + * Created on 2008/07/19 + * + * 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.model.datatype; + +/** + * CLOB型の汎用DataTypeクラス。 + * @author daisuke + */ + @ SuppressWarnings("serial") +public class ClobDesc extends AbstractDataTypeDescriptor { + +} Deleted: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/GenericDataTypeDescriptor.java =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/GenericDataTypeDescriptor.java 2008-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/GenericDataTypeDescriptor.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -1,28 +0,0 @@ -/* - * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. - * Created on 2008/12/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.model.datatype; - - -/** - * 一般的な型記述子。 - * @author daisuke - */ -public class GenericDataTypeDescriptor extends AbstractDataTypeDescriptor { - -} Copied: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/GenericDesc.java (from rev 2294, artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/GenericDataTypeDescriptor.java) =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/GenericDesc.java (rev 0) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/GenericDesc.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -0,0 +1,28 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. + * Created on 2008/12/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.model.datatype; + + +/** + * 一般的な型記述子。 + * @author daisuke + */ +public class GenericDesc extends AbstractDataTypeDescriptor { + +} Property changes on: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/GenericDesc.java ___________________________________________________________________ Name: svn:mime-type + text/plain Deleted: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/IntegerDataTypeDescriptor.java =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/IntegerDataTypeDescriptor.java 2008-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/IntegerDataTypeDescriptor.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -1,28 +0,0 @@ -/* - * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. - * Created on 2008/07/19 - * - * 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.model.datatype; - -/** - * INTEGER型の汎用DataTypeクラス。 - * @author daisuke - */ - @ SuppressWarnings("serial") -public class IntegerDataTypeDescriptor extends AbstractDataTypeDescriptor { - -} Copied: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/IntegerDesc.java (from rev 2294, artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/IntegerDataTypeDescriptor.java) =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/IntegerDesc.java (rev 0) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/IntegerDesc.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -0,0 +1,45 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. + * Created on 2008/07/19 + * + * 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.model.datatype; + +/** + * INTEGER型の汎用DataTypeクラス。 + * @author daisuke + */ + @ SuppressWarnings("serial") +public class IntegerDesc extends AbstractDataTypeDescriptor { + + private boolean serial; + + + public IntegerDesc() { + } + + public IntegerDesc(boolean serial) { + this.serial = serial; + } + + public boolean isSerial() { + return serial; + } + + public void setSerial(boolean serial) { + this.serial = serial; + } +} Deleted: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/NumericDataTypeDescriptor.java =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/NumericDataTypeDescriptor.java 2008-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/NumericDataTypeDescriptor.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -1,59 +0,0 @@ -/* - * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. - * Created on 2008/07/19 - * - * 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.model.datatype; - -import org.jiemamy.model.datatype.adapter.PrecisionedDataTypeAdapter; - -/** - * NUMERIC型の汎用DataTypeクラス。 - * @author daisuke - */ - @ SuppressWarnings("serial") -public class NumericDataTypeDescriptor extends AbstractDataTypeDescriptor { - - /** - * コンストラクタ。 - * @category instance creation - */ - public NumericDataTypeDescriptor() { - this(30, 15); // FIXME 適当 - } - - /** - * コンストラクタ。 - * @param precision - * @category instance creation - */ - public NumericDataTypeDescriptor(int precision) { - this(precision, 15); // FIXME 適当 - } - - /** - * コンストラクタ。 - * @param precision - * @param scale - * @category instance creation - */ - public NumericDataTypeDescriptor(int precision, int scale) { - PrecisionedDataTypeAdapter adapter = new PrecisionedDataTypeAdapter(); - adapter.setPrecision(precision); - adapter.setScale(scale); - registerAdapter(adapter); - } -} Copied: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/NumericDesc.java (from rev 2294, artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/NumericDataTypeDescriptor.java) =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/NumericDesc.java (rev 0) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/NumericDesc.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -0,0 +1,59 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. + * Created on 2008/07/19 + * + * 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.model.datatype; + +import org.jiemamy.model.datatype.adapter.PrecisionedDataTypeAdapter; + +/** + * NUMERIC型の汎用DataTypeクラス。 + * @author daisuke + */ + @ SuppressWarnings("serial") +public class NumericDesc extends AbstractDataTypeDescriptor { + + /** + * コンストラクタ。 + * @category instance creation + */ + public NumericDesc() { + this(30, 15); // FIXME 適当 + } + + /** + * コンストラクタ。 + * @param precision + * @category instance creation + */ + public NumericDesc(int precision) { + this(precision, 15); // FIXME 適当 + } + + /** + * コンストラクタ。 + * @param precision + * @param scale + * @category instance creation + */ + public NumericDesc(int precision, int scale) { + PrecisionedDataTypeAdapter adapter = new PrecisionedDataTypeAdapter(); + adapter.setPrecision(precision); + adapter.setScale(scale); + registerAdapter(adapter); + } +} Deleted: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/RealDataTypeDescriptor.java =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/RealDataTypeDescriptor.java 2008-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/RealDataTypeDescriptor.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -1,28 +0,0 @@ -/* - * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. - * Created on 2008/07/19 - * - * 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.model.datatype; - -/** - * REAL型の汎用DataTypeクラス。 - * @author daisuke - */ - @ SuppressWarnings("serial") -public class RealDataTypeDescriptor extends AbstractDataTypeDescriptor { - -} Copied: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/RealDesc.java (from rev 2294, artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/RealDataTypeDescriptor.java) =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/RealDesc.java (rev 0) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/RealDesc.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -0,0 +1,28 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. + * Created on 2008/07/19 + * + * 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.model.datatype; + +/** + * REAL型の汎用DataTypeクラス。 + * @author daisuke + */ + @ SuppressWarnings("serial") +public class RealDesc extends AbstractDataTypeDescriptor { + +} Deleted: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/TimestampDataTypeDescriptor.java =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/TimestampDataTypeDescriptor.java 2008-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/TimestampDataTypeDescriptor.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -1,48 +0,0 @@ -/* - * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. - * Created on 2008/07/19 - * - * 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.model.datatype; - -import org.jiemamy.model.datatype.adapter.TimezonedDataTypeAdapter; - -/** - * TIMESTAMP型の汎用DataTypeクラス。 - * @author daisuke - */ - @ SuppressWarnings("serial") -public class TimestampDataTypeDescriptor extends AbstractDataTypeDescriptor { - - /** - * コンストラクタ。 - * @category instance creation - */ - public TimestampDataTypeDescriptor() { - this(false); - } - - /** - * コンストラクタ。 - * @param withTimezone - * @category instance creation - */ - public TimestampDataTypeDescriptor(boolean withTimezone) { - TimezonedDataTypeAdapter adapter = new TimezonedDataTypeAdapter(); - adapter.setWithTimezone(withTimezone); - registerAdapter(adapter); - } -} Copied: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/TimestampDesc.java (from rev 2294, artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/TimestampDataTypeDescriptor.java) =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/TimestampDesc.java (rev 0) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/TimestampDesc.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -0,0 +1,48 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. + * Created on 2008/07/19 + * + * 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.model.datatype; + +import org.jiemamy.model.datatype.adapter.TimezonedDataTypeAdapter; + +/** + * TIMESTAMP型の汎用DataTypeクラス。 + * @author daisuke + */ + @ SuppressWarnings("serial") +public class TimestampDesc extends AbstractDataTypeDescriptor { + + /** + * コンストラクタ。 + * @category instance creation + */ + public TimestampDesc() { + this(false); + } + + /** + * コンストラクタ。 + * @param withTimezone + * @category instance creation + */ + public TimestampDesc(boolean withTimezone) { + TimezonedDataTypeAdapter adapter = new TimezonedDataTypeAdapter(); + adapter.setWithTimezone(withTimezone); + registerAdapter(adapter); + } +} Deleted: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/VarcharDataTypeDescriptor.java =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/VarcharDataTypeDescriptor.java 2008-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/VarcharDataTypeDescriptor.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -1,56 +0,0 @@ -/* - * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. - * Created on 2008/07/19 - * - * 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.model.datatype; - -import org.jiemamy.model.datatype.adapter.SizedDataTypeAdapter; - -/** - * VARCHAR型の汎用DataTypeクラス。 - * @author daisuke - */ - @ SuppressWarnings("serial") -public class VarcharDataTypeDescriptor extends AbstractDataTypeDescriptor { - - /** - * コンストラクタ。 - * @category instance creation - */ - public VarcharDataTypeDescriptor() { - this(1); - } - - /** - * コンストラクタ。 - * @param size - * @category instance creation - */ - public VarcharDataTypeDescriptor(int size) { - SizedDataTypeAdapter adapter = new SizedDataTypeAdapter(); - adapter.setSize(size); - registerAdapter(adapter); - } - - public int getSize() { - return getAdapter(SizedDataTypeAdapter.class).getSize(); - } - - public void setSize(int size) { - getAdapter(SizedDataTypeAdapter.class).setSize(size); - } -} Copied: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/VarcharDesc.java (from rev 2294, artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/VarcharDataTypeDescriptor.java) =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/VarcharDesc.java (rev 0) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/datatype/VarcharDesc.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -0,0 +1,56 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. + * Created on 2008/07/19 + * + * 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.model.datatype; + +import org.jiemamy.model.datatype.adapter.SizedDataTypeAdapter; + +/** + * VARCHAR型の汎用DataTypeクラス。 + * @author daisuke + */ + @ SuppressWarnings("serial") +public class VarcharDesc extends AbstractDataTypeDescriptor { + + /** + * コンストラクタ。 + * @category instance creation + */ + public VarcharDesc() { + this(1); + } + + /** + * コンストラクタ。 + * @param size + * @category instance creation + */ + public VarcharDesc(int size) { + SizedDataTypeAdapter adapter = new SizedDataTypeAdapter(); + adapter.setSize(size); + registerAdapter(adapter); + } + + public int getSize() { + return getAdapter(SizedDataTypeAdapter.class).getSize(); + } + + public void setSize(int size) { + getAdapter(SizedDataTypeAdapter.class).setSize(size); + } +} Added: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/utils/builder/ColumnBuilder.java =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/utils/builder/ColumnBuilder.java (rev 0) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/utils/builder/ColumnBuilder.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -0,0 +1,61 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. + * Created on 2008/12/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.utils.builder; + +import org.apache.commons.lang.Validate; + +import org.jiemamy.model.RootModel; +import org.jiemamy.model.attribute.ColumnModel; +import org.jiemamy.model.constraint.Constraint; +import org.jiemamy.model.datatype.DataTypeDescriptor; + +/** + * {@link ColumnModel}を構築するためのビルダークラス。 + * @author daisuke + */ +public class ColumnBuilder extends ModelBuilder<ColumnModel> { + + /** + * コンストラクタ。 + * @param rootModel + * @param name カラム名 + * @param type 型記述子 + * @throws IllegalArgumentException 引数に{@code null}を与えた場合 + * @category instance creation + */ + public ColumnBuilder(RootModel rootModel, String name, DataTypeDescriptor type) { + super(rootModel, ColumnModel.class); + Validate.notNull(name); + Validate.notNull(type); + model.setName(name); + model.setDataTypeDescriptor(type); + } + + /** + * {@inheritDoc} + */ + @Override + public void configure(ColumnModel columnModel) { + // nothing to do + } + + protected Constraint newConstraint(Class<? extends Constraint> clazz) { + return rootModel.newModel(clazz); + } +} Property changes on: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/utils/builder/ColumnBuilder.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/utils/builder/ForeignKeyBuilder.java =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/utils/builder/ForeignKeyBuilder.java (rev 0) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/utils/builder/ForeignKeyBuilder.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -0,0 +1,58 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. + * Created on 2008/12/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.utils.builder; + +import org.apache.commons.lang.Validate; + +import org.jiemamy.model.RootModel; +import org.jiemamy.model.connection.ForeignKeyModel; +import org.jiemamy.model.node.TableModel; + +/** + * {@link ForeignKeyModel}を構築するためのビルダークラス。 + * @author daisuke + */ +public class ForeignKeyBuilder extends ModelBuilder<ForeignKeyModel> { + + /** + * コンストラクタ。 + * @param rootModel + * @param source 参照元テーブル + * @param target 参照先テーブル + * @throws IllegalArgumentException 引数に{@code null}を与えた場合 + * @category instance creation + */ + public ForeignKeyBuilder(RootModel rootModel, TableModel source, TableModel target) { + super(rootModel, ForeignKeyModel.class); + Validate.notNull(source); + Validate.notNull(target); + model.setSource(source); + model.setTarget(target); + model.createMappings(rootModel, false); + } + + /** + * {@inheritDoc} + */ + @Override + public void configure(ForeignKeyModel foreignKeyModel) { + // nothing to do + } + +} Property changes on: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/utils/builder/ForeignKeyBuilder.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/utils/builder/ModelBuilder.java =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/utils/builder/ModelBuilder.java (rev 0) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/utils/builder/ModelBuilder.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -0,0 +1,67 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. + * Created on 2008/12/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.utils.builder; + +import org.apache.commons.lang.Validate; + +import org.jiemamy.model.RootModel; + +/** + * モデルオブジェクトを構築するためのビルダークラス。 + * @param <T> 構築するモデルの型 + * @author daisuke + */ +public abstract class ModelBuilder<T> { + + /** 構築元となる{@link RootModel} */ + RootModel rootModel; + + /** 構築対象モデル */ + T model; + + + /** + * コンストラクタ。 + * @param rootModel 構築元となる{@link RootModel} + * @param clazz 構築するオブジェクトを表す型 + * @throws IllegalArgumentException 引数に{@code null}を与えた場合 + * @category instance creation + */ + public ModelBuilder(RootModel rootModel, Class<T> clazz) { + Validate.notNull(rootModel); + Validate.notNull(clazz); + this.rootModel = rootModel; + model = rootModel.newModel(clazz); + } + + /** + * モデルを構築する。 + * @return model 構築されたモデル + */ + public T build() { + configure(model); + return model; + } + + /** + * モデルに追加の設定を行う。 + * @param model 設定対象モデル + */ + public abstract void configure(T model); +} Property changes on: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/utils/builder/ModelBuilder.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/utils/builder/TableBuilder.java =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/utils/builder/TableBuilder.java (rev 0) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/utils/builder/TableBuilder.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -0,0 +1,52 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. + * Created on 2008/12/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.utils.builder; + +import org.apache.commons.lang.Validate; + +import org.jiemamy.model.RootModel; +import org.jiemamy.model.node.TableModel; + +/** + * {@link TableModel}を構築するためのビルダークラス。 + * @author daisuke + */ +public class TableBuilder extends ModelBuilder<TableModel> { + + /** + * コンストラクタ。 + * @param rootModel + * @param name + * @throws IllegalArgumentException 引数に{@code null}を与えた場合 + * @category instance creation + */ + public TableBuilder(RootModel rootModel, String name) { + super(rootModel, TableModel.class); + Validate.notNull(name); + model.setName(name); + } + + /** + * {@inheritDoc} + */ + @Override + public void configure(TableModel model) { + // nothing to do + } +} Property changes on: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/utils/builder/TableBuilder.java ___________________________________________________________________ Name: svn:mime-type + text/plain Modified: artemis/trunk/org.jiemamy.core/src/test/java/org/jiemamy/model/RootModelImplTest.java =================================================================== --- artemis/trunk/org.jiemamy.core/src/test/java/org/jiemamy/model/RootModelImplTest.java 2008-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.core/src/test/java/org/jiemamy/model/RootModelImplTest.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -35,7 +35,7 @@ import org.jiemamy.model.connection.ForeignKeyModel; import org.jiemamy.model.dataset.InsertDataSetModel; import org.jiemamy.model.datatype.DomainModel; -import org.jiemamy.model.datatype.IntegerDataTypeDescriptor; +import org.jiemamy.model.datatype.IntegerDesc; import org.jiemamy.model.node.TableModel; /** @@ -144,7 +144,7 @@ DomainModel domain = rootModel.newModel(DomainModel.class); domain.setName("a"); - domain.setDataTypeDescriptor(new IntegerDataTypeDescriptor()); + domain.setDataTypeDescriptor(new IntegerDesc()); rootModel.appendModel(domain); rootModel.appendModel(source); rootModel.appendModel(target); @@ -192,10 +192,10 @@ // モデル構築 DomainModel domain1 = rootModel.newModel(DomainModel.class); domain1.setName("domain1"); - domain1.setDataTypeDescriptor(new IntegerDataTypeDescriptor()); + domain1.setDataTypeDescriptor(new IntegerDesc()); DomainModel domain2 = rootModel.newModel(DomainModel.class); domain2.setName("domain2"); - domain2.setDataTypeDescriptor(new IntegerDataTypeDescriptor()); + domain2.setDataTypeDescriptor(new IntegerDesc()); rootModel.appendModel(domain1); Modified: artemis/trunk/org.jiemamy.core/src/test/java/org/jiemamy/model/node/TableModelImplTest.java =================================================================== --- artemis/trunk/org.jiemamy.core/src/test/java/org/jiemamy/model/node/TableModelImplTest.java 2008-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.core/src/test/java/org/jiemamy/model/node/TableModelImplTest.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -37,7 +37,7 @@ import org.jiemamy.model.attribute.ColumnModel; import org.jiemamy.model.connection.ForeignKeyModel; import org.jiemamy.model.constraint.CheckConstraintModel; -import org.jiemamy.model.datatype.IntegerDataTypeDescriptor; +import org.jiemamy.model.datatype.IntegerDesc; import org.jiemamy.model.index.IndexModel; /** @@ -148,10 +148,10 @@ public void test03_appendModelとremoveModel経由で各種モデルが追加削除できること() throws Exception { ColumnModel column1 = rootModel.newModel(ColumnModel.class); column1.setName("col1"); - column1.setDataTypeDescriptor(new IntegerDataTypeDescriptor()); + column1.setDataTypeDescriptor(new IntegerDesc()); ColumnModel column2 = rootModel.newModel(ColumnModel.class); column2.setName("col2"); - column2.setDataTypeDescriptor(new IntegerDataTypeDescriptor()); + column2.setDataTypeDescriptor(new IntegerDesc()); tableModel.appendModel(column1); tableModel.appendModel(column2); @@ -198,11 +198,11 @@ public void test04_モデルIDの一致により他フィールドの内容に関わらずequalsがtrueとなる() throws Exception { ColumnModel column1 = rootModel.newModel(ColumnModel.class); column1.setName("column1"); - column1.setDataTypeDescriptor(new IntegerDataTypeDescriptor()); + column1.setDataTypeDescriptor(new IntegerDesc()); ColumnModel column2 = rootModel.newModel(ColumnModel.class); column2.setName("column2"); - column2.setDataTypeDescriptor(new IntegerDataTypeDescriptor()); + column2.setDataTypeDescriptor(new IntegerDesc()); ColumnModel column3 = rootModel.newModel(ColumnModel.class, column1.getId()); @@ -220,10 +220,10 @@ public void test08_RootModelからのクローニングが適切に行われること() throws Exception { ColumnModel column1 = rootModel.newModel(ColumnModel.class); column1.setName("column1"); - column1.setDataTypeDescriptor(new IntegerDataTypeDescriptor()); + column1.setDataTypeDescriptor(new IntegerDesc()); ColumnModel column2 = rootModel.newModel(ColumnModel.class); column2.setName("column2"); - column2.setDataTypeDescriptor(new IntegerDataTypeDescriptor()); + column2.setDataTypeDescriptor(new IntegerDesc()); tableModel.appendModel(column1); Added: artemis/trunk/org.jiemamy.core/src/test/java/org/jiemamy/utils/builder/ModelBuilderTest.java =================================================================== --- artemis/trunk/org.jiemamy.core/src/test/java/org/jiemamy/utils/builder/ModelBuilderTest.java (rev 0) +++ artemis/trunk/org.jiemamy.core/src/test/java/org/jiemamy/utils/builder/ModelBuilderTest.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -0,0 +1,316 @@ +/* + * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others. + * Created on 2008/12/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.utils.builder; + +import java.util.List; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import org.jiemamy.Artemis; +import org.jiemamy.ReflectionDialectAccessStrategy; +import org.jiemamy.exception.TooManyElementsException; +import org.jiemamy.model.Jiemamy; +import org.jiemamy.model.RootModel; +import org.jiemamy.model.attribute.ColumnModel; +import org.jiemamy.model.connection.ForeignKeyModel; +import org.jiemamy.model.constraint.PrimaryKeyConstraintModel; +import org.jiemamy.model.datatype.IntegerDesc; +import org.jiemamy.model.datatype.TimestampDesc; +import org.jiemamy.model.datatype.VarcharDesc; +import org.jiemamy.model.node.TableModel; +import org.jiemamy.model.sql.SqlStatement; + +/** + * TODO for daisuke + * @author daisuke + */ +public class ModelBuilderTest { + + private RootModel rootModel; + + + /** + * TODO for daisuke + * @throws java.lang.Exception + */ + @Before + public void setUp() throws Exception { + Jiemamy.init(new Artemis(), new ReflectionDialectAccessStrategy()); + rootModel = Jiemamy.newRootModel(); + } + + /** + * TODO for daisuke + * @throws java.lang.Exception + */ + @After + public void tearDown() throws Exception { + rootModel = null; + Jiemamy.dispose(); + } + + /** + * べた書きモデル構築。 + * @throws Exception + */ + @Test + public void test01() throws Exception { + rootModel.setDialectId("org.jiemamy.dialect.mysql.MySqlDialect"); + + // EMPテーブルのビルド + TableModel emp = rootModel.newModel(TableModel.class); + emp.setName("T_EMP"); + ColumnModel empId = rootModel.newModel(ColumnModel.class); + empId.setName("ID"); + empId.setDataTypeDescriptor(new IntegerDesc(true)); + empId.addConstraint(rootModel.newModel(PrimaryKeyConstraintModel.class)); + ColumnModel empName = rootModel.newModel(ColumnModel.class); + empName.setName("NAME"); + empName.setDataTypeDescriptor(new VarcharDesc(32)); + ColumnModel empDeptId = rootModel.newModel(ColumnModel.class); + empDeptId.setName("DEPT_ID"); + empDeptId.setDataTypeDescriptor(new IntegerDesc()); + ColumnModel empHiredate = rootModel.newModel(ColumnModel.class); + empHiredate.setName("HIREDATE"); + empHiredate.setDataTypeDescriptor(new TimestampDesc()); + + emp.appendModel(empId); + emp.appendModel(empName); + emp.appendModel(empDeptId); + emp.appendModel(empHiredate); + rootModel.appendModel(emp); + + // DEPTテーブルのビルド + TableModel dept = rootModel.newModel(TableModel.class); + dept.setName("T_DEPT"); + ColumnModel deptId = rootModel.newModel(ColumnModel.class); + deptId.setName("ID"); + deptId.setDataTypeDescriptor(new IntegerDesc(true)); + deptId.addConstraint(rootModel.newModel(PrimaryKeyConstraintModel.class)); + ColumnModel deptName = rootModel.newModel(ColumnModel.class); + deptName.setName("NAME"); + deptName.setDataTypeDescriptor(new VarcharDesc(32)); + ColumnModel deptLocation = rootModel.newModel(ColumnModel.class); + deptLocation.setName("LOCATION"); + deptLocation.setDataTypeDescriptor(new VarcharDesc(16)); + + dept.appendModel(deptId); + dept.appendModel(deptName); + dept.appendModel(deptLocation); + rootModel.appendModel(dept); + + // 外部キーの設定 + ForeignKeyModel fk = rootModel.newModel(ForeignKeyModel.class); + fk.setSource(emp); + fk.setTarget(dept); + fk.createMappings(rootModel, false); + fk.getMapping(deptId).setConstraintColumn(empDeptId); + rootModel.appendModel(fk); + + // モデルをSQLに変換し、表示 + System.out.println(rootModel); + List<SqlStatement> statements = Jiemamy.toStatements(rootModel); + for (SqlStatement statement : statements) { + System.out.println(statement.toString()); + } + + Jiemamy.dispose(); + } + + /** + * ModelBuilderを使用したモデル構築1。 + * @throws Exception + */ + @Test + public void test02() throws Exception { + rootModel.setDialectId("org.jiemamy.dialect.mysql.MySqlDialect"); + + // EMPテーブルのビルド + rootModel.appendModel(new ModelBuilder<TableModel>(rootModel, TableModel.class) { + + @Override + public void configure(TableModel table) { + table.setName("T_EMP"); + table.appendModel(new ModelBuilder<ColumnModel>(rootModel, ColumnModel.class) { + + @Override + public void configure(ColumnModel column) { + column.setName("ID"); + column.setDataTypeDescriptor(new IntegerDesc(true)); + column.addConstraint(rootModel.newModel(PrimaryKeyConstraintModel.class)); + } + }.build()); + table.appendModel(new ModelBuilder<ColumnModel>(rootModel, ColumnModel.class) { + + @Override + public void configure(ColumnModel column) { + column.setName("NAME"); + column.setDataTypeDescriptor(new VarcharDesc(32)); + } + }.build()); + table.appendModel(new ModelBuilder<ColumnModel>(rootModel, ColumnModel.class) { + + @Override + public void configure(ColumnModel column) { + column.setName("DEPT_ID"); + column.setDataTypeDescriptor(new IntegerDesc()); + } + }.build()); + table.appendModel(new ModelBuilder<ColumnModel>(rootModel, ColumnModel.class) { + + @Override + public void configure(ColumnModel column) { + column.setName("HIREDATE"); + column.setDataTypeDescriptor(new TimestampDesc()); + } + }.build()); + } + }.build()); + + // DEPTテーブルのビルド + rootModel.appendModel(new ModelBuilder<TableModel>(rootModel, TableModel.class) { + + @Override + public void configure(TableModel table) { + table.setName("T_DEPT"); + table.appendModel(new ModelBuilder<ColumnModel>(rootModel, ColumnModel.class) { + + @Override + public void configure(ColumnModel column) { + column.setName("ID"); + column.setDataTypeDescriptor(new IntegerDesc(true)); + column.addConstraint(rootModel.newModel(PrimaryKeyConstraintModel.class)); + } + }.build()); + table.appendModel(new ModelBuilder<ColumnModel>(rootModel, ColumnModel.class) { + + @Override + public void configure(ColumnModel column) { + column.setName("NAME"); + column.setDataTypeDescriptor(new VarcharDesc(32)); + } + }.build()); + table.appendModel(new ModelBuilder<ColumnModel>(rootModel, ColumnModel.class) { + + @Override + public void configure(ColumnModel column) { + column.setName("LOCATION"); + column.setDataTypeDescriptor(new VarcharDesc(16)); + } + }.build()); + } + }.build()); + + // 外部キーの設定 + rootModel.appendModel(new ModelBuilder<ForeignKeyModel>(rootModel, ForeignKeyModel.class) { + + @Override + public void configure(ForeignKeyModel model) { + try { + TableModel emp = rootModel.getEntity(TableModel.class, "T_EMP"); + TableModel dept = rootModel.getEntity(TableModel.class, "T_DEPT"); + model.setSource(emp); + model.setTarget(dept); + model.createMappings(rootModel, false); + model.getMapping(dept.getColumn("ID")).setConstraintColumn(emp.getColumn("DEPT_ID")); + } catch (TooManyElementsException e) { + e.printStackTrace(); + } + } + + }.build()); + + // モデルをSQLに変換し、表示 + System.out.println(rootModel); + List<SqlStatement> statements = Jiemamy.toStatements(rootModel); + for (SqlStatement statement : statements) { + System.out.println(statement.toString()); + } + } + + /** + * ModelBuilderを使用したモデル構築2。 + * @throws Exception + */ + @Test + public void test03() throws Exception { + rootModel.setDialectId("org.jiemamy.dialect.mysql.MySqlDialect"); + + // EMPテーブルのビルド + rootModel.appendModel(new TableBuilder(rootModel, "T_EMP") { + + @Override + public void configure(TableModel table) { + table.appendModel(new ColumnBuilder(rootModel, "ID", new IntegerDesc(true)) { + + @Override + public void configure(ColumnModel columnModel) { + columnModel.addConstraint(newConstraint(PrimaryKeyConstraintModel.class)); + } + }.build()); + + table.appendModel(new ColumnBuilder(rootModel, "NAME", new VarcharDesc(32)).build()); + table.appendModel(new ColumnBuilder(rootModel, "DEPT_ID", new IntegerDesc()).build()); + table.appendModel(new ColumnBuilder(rootModel, "HIREDATE", new TimestampDesc()).build()); + } + + }.build()); + + // DEPTテーブルのビルド + rootModel.appendModel(new TableBuilder(rootModel, "T_DEPT") { + + @Override + public void configure(TableModel table) { + table.appendModel(new ColumnBuilder(rootModel, "ID", new IntegerDesc(true)) { + + @Override + public void configure(ColumnModel columnModel) { + columnModel.addConstraint(newConstraint(PrimaryKeyConstraintModel.class)); + } + }.build()); + table.appendModel(new ColumnBuilder(rootModel, "NAME", new VarcharDesc(32)).build()); + table.appendModel(new ColumnBuilder(rootModel, "LOCATION", new VarcharDesc(16)).build()); + } + }.build()); + + // 外部キーの設定 + TableModel emp = rootModel.getEntity(TableModel.class, "T_EMP"); + TableModel dept = rootModel.getEntity(TableModel.class, "T_DEPT"); + final ColumnModel deptId = dept.getColumn("ID"); + final ColumnModel empDeptId = emp.getColumn("DEPT_ID"); + + rootModel.appendModel(new ForeignKeyBuilder(rootModel, emp, dept) { + + @Override + public void configure(ForeignKeyModel foreignKeyModel) { + foreignKeyModel.createMappings(rootModel, false); + foreignKeyModel.getMapping(deptId).setConstraintColumn(empDeptId); + } + }.build()); + + // モデルをSQLに変換し、表示 + System.out.println(rootModel); + List<SqlStatement> statements = Jiemamy.toStatements(rootModel); + for (SqlStatement statement : statements) { + System.out.println(statement.toString()); + } + } +} Property changes on: artemis/trunk/org.jiemamy.core/src/test/java/org/jiemamy/utils/builder/ModelBuilderTest.java ___________________________________________________________________ Name: svn:mime-type + text/plain Modified: artemis/trunk/org.jiemamy.dialect/src/test/java/org/jiemamy/dialect/generic/GenericDialectTest.java =================================================================== --- artemis/trunk/org.jiemamy.dialect/src/test/java/org/jiemamy/dialect/generic/GenericDialectTest.java 2008-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.dialect/src/test/java/org/jiemamy/dialect/generic/GenericDialectTest.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -30,10 +30,10 @@ import org.jiemamy.model.datatype.DataType; import org.jiemamy.model.datatype.DataTypeDescriptor; -import org.jiemamy.model.datatype.IntegerDataTypeDescriptor; -import org.jiemamy.model.datatype.NumericDataTypeDescriptor; -import org.jiemamy.model.datatype.TimestampDataTypeDescriptor; -import org.jiemamy.model.datatype.VarcharDataTypeDescriptor; +import org.jiemamy.model.datatype.IntegerDesc; +import org.jiemamy.model.datatype.NumericDesc; +import org.jiemamy.model.datatype.TimestampDesc; +import org.jiemamy.model.datatype.VarcharDesc; import org.jiemamy.model.datatype.adapter.PrecisionedDataTypeAdapter; import org.jiemamy.model.datatype.adapter.SizedDataTypeAdapter; import org.jiemamy.model.datatype.adapter.TimezonedDataTypeAdapter; @@ -85,20 +85,20 @@ */ @Test public void test03_各型が持っているアダプタのチェック() throws Exception { - assertThat(new IntegerDataTypeDescriptor().hasAdapter(SizedDataTypeAdapter.class), is(false)); - assertThat(new VarcharDataTypeDescriptor().hasAdapter(SizedDataTypeAdapter.class), is(true)); // TRUE - assertThat(new NumericDataTypeDescriptor().hasAdapter(SizedDataTypeAdapter.class), is(false)); - assertThat(new TimestampDataTypeDescriptor().hasAdapter(SizedDataTypeAdapter.class), is(false)); + assertThat(new IntegerDesc().hasAdapter(SizedDataTypeAdapter.class), is(false)); + assertThat(new VarcharDesc().hasAdapter(SizedDataTypeAdapter.class), is(true)); // TRUE + assertThat(new NumericDesc().hasAdapter(SizedDataTypeAdapter.class), is(false)); + assertThat(new TimestampDesc().hasAdapter(SizedDataTypeAdapter.class), is(false)); - assertThat(new IntegerDataTypeDescriptor().hasAdapter(PrecisionedDataTypeAdapter.class), is(false)); - assertThat(new VarcharDataTypeDescriptor().hasAdapter(PrecisionedDataTypeAdapter.class), is(false)); - assertThat(new NumericDataTypeDescriptor().hasAdapter(PrecisionedDataTypeAdapter.class), is(true)); // TRUE - assertThat(new TimestampDataTypeDescriptor().hasAdapter(PrecisionedDataTypeAdapter.class), is(false)); + assertThat(new IntegerDesc().hasAdapter(PrecisionedDataTypeAdapter.class), is(false)); + assertThat(new VarcharDesc().hasAdapter(PrecisionedDataTypeAdapter.class), is(false)); + assertThat(new NumericDesc().hasAdapter(PrecisionedDataTypeAdapter.class), is(true)); // TRUE + assertThat(new TimestampDesc().hasAdapter(PrecisionedDataTypeAdapter.class), is(false)); - assertThat(new IntegerDataTypeDescriptor().hasAdapter(TimezonedDataTypeAdapter.class), is(false)); - assertThat(new VarcharDataTypeDescriptor().hasAdapter(TimezonedDataTypeAdapter.class), is(false)); - assertThat(new NumericDataTypeDescriptor().hasAdapter(TimezonedDataTypeAdapter.class), is(false)); - assertThat(new TimestampDataTypeDescriptor().hasAdapter(TimezonedDataTypeAdapter.class), is(true)); // TRUE + assertThat(new IntegerDesc().hasAdapter(TimezonedDataTypeAdapter.class), is(false)); + assertThat(new VarcharDesc().hasAdapter(TimezonedDataTypeAdapter.class), is(false)); + assertThat(new NumericDesc().hasAdapter(TimezonedDataTypeAdapter.class), is(false)); + assertThat(new TimestampDesc().hasAdapter(TimezonedDataTypeAdapter.class), is(true)); // TRUE } /** @@ -107,7 +107,7 @@ */ @Test public void test04_VARCHAR型にサイズをセットして_その値を取得できる() throws Exception { - DataTypeDescriptor type = new VarcharDataTypeDescriptor(); + DataTypeDescriptor type = new VarcharDesc(); type.getAdapter(SizedDataTypeAdapter.class).setSize(304); assertThat(type.getAdapter(SizedDataTypeAdapter.class).getSize(), is(304)); Modified: artemis/trunk/org.jiemamy.dialect/src/test/java/org/jiemamy/dialect/openjpa/OpenJpaGenerateSqlTest.java =================================================================== --- artemis/trunk/org.jiemamy.dialect/src/test/java/org/jiemamy/dialect/openjpa/OpenJpaGenerateSqlTest.java 2008-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.dialect/src/test/java/org/jiemamy/dialect/openjpa/OpenJpaGenerateSqlTest.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -32,8 +32,8 @@ import org.jiemamy.model.RootModel; import org.jiemamy.model.attribute.ColumnModel; import org.jiemamy.model.constraint.PrimaryKeyConstraintModel; -import org.jiemamy.model.datatype.IntegerDataTypeDescriptor; -import org.jiemamy.model.datatype.VarcharDataTypeDescriptor; +import org.jiemamy.model.datatype.IntegerDesc; +import org.jiemamy.model.datatype.VarcharDesc; import org.jiemamy.model.node.TableModel; /** @@ -67,27 +67,27 @@ ColumnModel idColumn = rootModel.newModel(ColumnModel.class); idColumn.setName("ID"); - idColumn.setDataTypeDescriptor(new IntegerDataTypeDescriptor()); + idColumn.setDataTypeDescriptor(new IntegerDesc()); idColumn.addConstraint(rootModel.newModel(PrimaryKeyConstraintModel.class)); idColumn.setLogicalName("部署ID"); deptTable.appendModel(idColumn); ColumnModel noColumn = rootModel.newModel(ColumnModel.class); noColumn.setName("DEPT_NO"); - noColumn.setDataTypeDescriptor(new IntegerDataTypeDescriptor()); + noColumn.setDataTypeDescriptor(new IntegerDesc()); noColumn.setLogicalName("部署番号"); deptTable.appendModel(noColumn); ColumnModel deptNameColumn = rootModel.newModel(ColumnModel.class); deptNameColumn.setName("DEPT_NAME"); - deptNameColumn.setDataTypeDescriptor(new VarcharDataTypeDescriptor(20)); + deptNameColumn.setDataTypeDescriptor(new VarcharDesc(20)); deptNameColumn.setLogicalName("部署名"); deptNameColumn.setRepresentation(true); deptTable.appendModel(deptNameColumn); ColumnModel locColumn = rootModel.newModel(ColumnModel.class); locColumn.setName("LOC"); - locColumn.setDataTypeDescriptor(new VarcharDataTypeDescriptor(20)); + locColumn.setDataTypeDescriptor(new VarcharDesc(20)); locColumn.setLogicalName("ロケーション"); locColumn.setDefaultValue("secret"); deptTable.appendModel(locColumn); 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-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.dialect.mysql/src/main/java/org/jiemamy/dialect/mysql/datatype/IntegerDataType.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -20,14 +20,14 @@ import org.jiemamy.dialect.MappingInfo; import org.jiemamy.model.datatype.AbstractDataType; -import org.jiemamy.model.datatype.IntegerDataTypeDescriptor; +import org.jiemamy.model.datatype.IntegerDesc; /** * MySQLのINTEGERデータ型クラス。 * @author daisuke */ @SuppressWarnings("serial") - @ MappingInfo(descriptor = IntegerDataTypeDescriptor.class, typeName = "INTEGER", alias = "INT") + @ MappingInfo(descriptor = IntegerDesc.class, typeName = "INTEGER", alias = "INT") public class IntegerDataType extends AbstractDataType { } 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-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/BigIntegerDataType.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -20,14 +20,14 @@ import org.jiemamy.dialect.MappingInfo; import org.jiemamy.model.datatype.AbstractDataType; -import org.jiemamy.model.datatype.BigIntegerDataTypeDescriptor; +import org.jiemamy.model.datatype.BigIntegerDesc; /** * PostgreSQLのBIGINTデータ型クラス。 * @author daisuke */ @SuppressWarnings("serial") - @ MappingInfo(descriptor = BigIntegerDataTypeDescriptor.class, typeName = "BIGINT", alias = "INT8") + @ MappingInfo(descriptor = BigIntegerDesc.class, typeName = "BIGINT", alias = "INT8") public class BigIntegerDataType extends AbstractDataType { } 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-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/BigSerialDataType.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -20,14 +20,14 @@ import org.jiemamy.dialect.MappingInfo; import org.jiemamy.model.datatype.AbstractDataType; -import org.jiemamy.model.datatype.BigIntegerDataTypeDescriptor; +import org.jiemamy.model.datatype.BigIntegerDesc; /** * PostgreSQLのBIGSERIALデータ型クラス。 * @author daisuke */ @SuppressWarnings("serial") - @ MappingInfo(descriptor = BigIntegerDataTypeDescriptor.class, typeName = "BIGSERIAL", alias = "SERIAL8") + @ MappingInfo(descriptor = BigIntegerDesc.class, typeName = "BIGSERIAL", alias = "SERIAL8") public class BigSerialDataType extends AbstractDataType { } 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-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/BitDataType.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -20,7 +20,7 @@ import org.jiemamy.dialect.MappingInfo; import org.jiemamy.model.datatype.AbstractDataType; -import org.jiemamy.model.datatype.IntegerDataTypeDescriptor; +import org.jiemamy.model.datatype.IntegerDesc; import org.jiemamy.model.datatype.adapter.SizedDataTypeAdapter; /** @@ -28,7 +28,7 @@ * @author daisuke */ @SuppressWarnings("serial") - @ MappingInfo(descriptor = IntegerDataTypeDescriptor.class, typeName = "BIT") + @ MappingInfo(descriptor = IntegerDesc.class, typeName = "BIT") public class BitDataType extends AbstractDataType { /** 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-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/BlobDataType.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -20,13 +20,13 @@ import org.jiemamy.dialect.MappingInfo; import org.jiemamy.model.datatype.AbstractDataType; -import org.jiemamy.model.datatype.BlobDataTypeDescriptor; +import org.jiemamy.model.datatype.BlobDesc; /** * 一般的なBLOBデータ型クラス。 * @author daisuke */ @SuppressWarnings("serial") - @ MappingInfo(descriptor = BlobDataTypeDescriptor.class, typeName = "BYTEA") + @ MappingInfo(descriptor = BlobDesc.class, typeName = "BYTEA") public class BlobDataType extends AbstractDataType { } 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-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/BooleanDataType.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -20,14 +20,14 @@ import org.jiemamy.dialect.MappingInfo; import org.jiemamy.model.datatype.AbstractDataType; -import org.jiemamy.model.datatype.IntegerDataTypeDescriptor; +import org.jiemamy.model.datatype.IntegerDesc; /** * PostgreSQLのBOOLEANデータ型クラス。 * @author daisuke */ @SuppressWarnings("serial") - @ MappingInfo(descriptor = IntegerDataTypeDescriptor.class, typeName = "BOOLEAN", alias = "BOOL") + @ MappingInfo(descriptor = IntegerDesc.class, typeName = "BOOLEAN", alias = "BOOL") public class BooleanDataType extends AbstractDataType { } 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-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/CharacterDataType.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -20,7 +20,7 @@ import org.jiemamy.dialect.MappingInfo; import org.jiemamy.model.datatype.AbstractDataType; -import org.jiemamy.model.datatype.CharacterDataTypeDescriptor; +import org.jiemamy.model.datatype.CharacterDesc; import org.jiemamy.model.datatype.adapter.SizedDataTypeAdapter; /** @@ -28,7 +28,7 @@ * @author daisuke */ @SuppressWarnings("serial") - @ MappingInfo(descriptor = CharacterDataTypeDescriptor.class, typeName = "CHAR", alias = { + @ MappingInfo(descriptor = CharacterDesc.class, typeName = "CHAR", alias = { "CHARACTER", "BPCHAR" }) 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-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/DateDataType.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -20,14 +20,14 @@ import org.jiemamy.dialect.MappingInfo; import org.jiemamy.model.datatype.AbstractDataType; -import org.jiemamy.model.datatype.TimestampDataTypeDescriptor; +import org.jiemamy.model.datatype.TimestampDesc; /** * 一般的なDATEデータ型クラス。 * @author daisuke */ @SuppressWarnings("serial") - @ MappingInfo(descriptor = TimestampDataTypeDescriptor.class, typeName = "DATE") + @ MappingInfo(descriptor = TimestampDesc.class, typeName = "DATE") public class DateDataType extends AbstractDataType { } 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-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/DecimalDataType.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -20,7 +20,7 @@ import org.jiemamy.dialect.MappingInfo; import org.jiemamy.model.datatype.AbstractDataType; -import org.jiemamy.model.datatype.NumericDataTypeDescriptor; +import org.jiemamy.model.datatype.NumericDesc; import org.jiemamy.model.datatype.adapter.PrecisionedDataTypeAdapter; /** @@ -28,7 +28,7 @@ * @author daisuke */ @SuppressWarnings("serial") - @ MappingInfo(descriptor = NumericDataTypeDescriptor.class, typeName = "DECIMAL") + @ MappingInfo(descriptor = NumericDesc.class, typeName = "DECIMAL") // THINK DECは? public class DecimalDataType extends AbstractDataType { 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-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/DoubleDataType.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -20,14 +20,14 @@ import org.jiemamy.dialect.MappingInfo; import org.jiemamy.model.datatype.AbstractDataType; -import org.jiemamy.model.datatype.RealDataTypeDescriptor; +import org.jiemamy.model.datatype.RealDesc; /** * 一般的なDOUBLEデータ型クラス。 * @author daisuke */ @SuppressWarnings("serial") - @ MappingInfo(descriptor = RealDataTypeDescriptor.class, typeName = "DOUBLE PRECISION", alias = "FLOAT8") + @ MappingInfo(descriptor = RealDesc.class, typeName = "DOUBLE PRECISION", alias = "FLOAT8") public class DoubleDataType extends AbstractDataType { } 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-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/FloatDataType.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -20,14 +20,14 @@ import org.jiemamy.dialect.MappingInfo; import org.jiemamy.model.datatype.AbstractDataType; -import org.jiemamy.model.datatype.RealDataTypeDescriptor; +import org.jiemamy.model.datatype.RealDesc; /** * 一般的なFLOATデータ型クラス。 * @author daisuke */ @SuppressWarnings("serial") - @ MappingInfo(descriptor = RealDataTypeDescriptor.class, typeName = "FLOAT") + @ MappingInfo(descriptor = RealDesc.class, typeName = "FLOAT") public class FloatDataType extends AbstractDataType { } 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-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/IntegerDataType.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -20,14 +20,14 @@ import org.jiemamy.dialect.MappingInfo; import org.jiemamy.model.datatype.AbstractDataType; -import org.jiemamy.model.datatype.IntegerDataTypeDescriptor; +import org.jiemamy.model.datatype.IntegerDesc; /** * PostgreSQLのINTEGERデータ型クラス。 * @author daisuke */ @SuppressWarnings("serial") - @ MappingInfo(descriptor = IntegerDataTypeDescriptor.class, typeName = "INTEGER", alias = { + @ MappingInfo(descriptor = IntegerDesc.class, typeName = "INTEGER", alias = { "INT", "INT4" }) 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-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/IntervalDataType.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -20,14 +20,14 @@ import org.jiemamy.dialect.MappingInfo; import org.jiemamy.model.datatype.AbstractDataType; -import org.jiemamy.model.datatype.IntegerDataTypeDescriptor; +import org.jiemamy.model.datatype.IntegerDesc; /** * 一般的なINTERVALデータ型クラス。 * @author daisuke */ @SuppressWarnings("serial") - @ MappingInfo(descriptor = IntegerDataTypeDescriptor.class, typeName = "INTERVAL") + @ MappingInfo(descriptor = IntegerDesc.class, typeName = "INTERVAL") public class IntervalDataType extends AbstractDataType { } 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-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/MoneyDataType.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -20,14 +20,14 @@ import org.jiemamy.dialect.MappingInfo; import org.jiemamy.model.datatype.AbstractDataType; -import org.jiemamy.model.datatype.IntegerDataTypeDescriptor; +import org.jiemamy.model.datatype.IntegerDesc; /** * PostgreSQLのMONEYデータ型クラス。 * @author daisuke */ @SuppressWarnings("serial") - @ MappingInfo(descriptor = IntegerDataTypeDescriptor.class, typeName = "MONEY") + @ MappingInfo(descriptor = IntegerDesc.class, typeName = "MONEY") public class MoneyDataType extends AbstractDataType { } 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-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/NumericDataType.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -20,7 +20,7 @@ import org.jiemamy.dialect.MappingInfo; import org.jiemamy.model.datatype.AbstractDataType; -import org.jiemamy.model.datatype.NumericDataTypeDescriptor; +import org.jiemamy.model.datatype.NumericDesc; import org.jiemamy.model.datatype.adapter.PrecisionedDataTypeAdapter; /** @@ -28,7 +28,7 @@ * @author daisuke */ @SuppressWarnings("serial") - @ MappingInfo(descriptor = NumericDataTypeDescriptor.class, typeName = "NUMERIC") + @ MappingInfo(descriptor = NumericDesc.class, typeName = "NUMERIC") public class NumericDataType extends AbstractDataType { /** 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-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/RealDataType.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -20,14 +20,14 @@ import org.jiemamy.dialect.MappingInfo; import org.jiemamy.model.datatype.AbstractDataType; -import org.jiemamy.model.datatype.RealDataTypeDescriptor; +import org.jiemamy.model.datatype.RealDesc; /** * 一般的なREALデータ型クラス。 * @author daisuke */ @SuppressWarnings("serial") - @ MappingInfo(descriptor = RealDataTypeDescriptor.class, typeName = "REAL", alias = "FLOAT4") + @ MappingInfo(descriptor = RealDesc.class, typeName = "REAL", alias = "FLOAT4") public class RealDataType extends AbstractDataType { } 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-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/SerialDataType.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -20,14 +20,14 @@ import org.jiemamy.dialect.MappingInfo; import org.jiemamy.model.datatype.AbstractDataType; -import org.jiemamy.model.datatype.IntegerDataTypeDescriptor; +import org.jiemamy.model.datatype.IntegerDesc; /** * PostgreSQLのSERIALデータ型クラス。 * @author daisuke */ @SuppressWarnings("serial") - @ MappingInfo(descriptor = IntegerDataTypeDescriptor.class, typeName = "SERIAL", alias = "SERIAL4") + @ MappingInfo(descriptor = IntegerDesc.class, typeName = "SERIAL", alias = "SERIAL4") public class SerialDataType extends AbstractDataType { } 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-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/SmallIntegerDataType.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -20,14 +20,14 @@ import org.jiemamy.dialect.MappingInfo; import org.jiemamy.model.datatype.AbstractDataType; -import org.jiemamy.model.datatype.IntegerDataTypeDescriptor; +import org.jiemamy.model.datatype.IntegerDesc; /** * PostgreSQLのSMALLINTデータ型クラス。 * @author daisuke */ @SuppressWarnings("serial") - @ MappingInfo(descriptor = IntegerDataTypeDescriptor.class, typeName = "SMALLINT", alias = "INT2") + @ MappingInfo(descriptor = IntegerDesc.class, typeName = "SMALLINT", alias = "INT2") public class SmallIntegerDataType extends AbstractDataType { } 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-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/TextDataType.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -20,14 +20,14 @@ import org.jiemamy.dialect.MappingInfo; import org.jiemamy.model.datatype.AbstractDataType; -import org.jiemamy.model.datatype.ClobDataTypeDescriptor; +import org.jiemamy.model.datatype.ClobDesc; /** * PostgreSQLのTEXTデータ型クラス。 * @author daisuke */ @SuppressWarnings("serial") - @ MappingInfo(descriptor = ClobDataTypeDescriptor.class, typeName = "TEXT") + @ MappingInfo(descriptor = ClobDesc.class, typeName = "TEXT") public class TextDataType extends AbstractDataType { } 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-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/TimeDataType.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -20,7 +20,7 @@ import org.jiemamy.dialect.MappingInfo; import org.jiemamy.model.datatype.AbstractDataType; -import org.jiemamy.model.datatype.TimestampDataTypeDescriptor; +import org.jiemamy.model.datatype.TimestampDesc; import org.jiemamy.model.datatype.adapter.TimezonedDataTypeAdapter; /** @@ -28,7 +28,7 @@ * @author daisuke */ @SuppressWarnings("serial") - @ MappingInfo(descriptor = TimestampDataTypeDescriptor.class, typeName = "TIME", alias = { + @ MappingInfo(descriptor = TimestampDesc.class, typeName = "TIME", alias = { "TIMETZ", "TIME WITH TIME ZONE", "TIME WITHOUT TIME ZONE" 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-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/TimestampDataType.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -20,7 +20,7 @@ import org.jiemamy.dialect.MappingInfo; import org.jiemamy.model.datatype.AbstractDataType; -import org.jiemamy.model.datatype.TimestampDataTypeDescriptor; +import org.jiemamy.model.datatype.TimestampDesc; import org.jiemamy.model.datatype.adapter.TimezonedDataTypeAdapter; /** @@ -28,7 +28,7 @@ * @author daisuke */ @SuppressWarnings("serial") - @ MappingInfo(descriptor = TimestampDataTypeDescriptor.class, typeName = "TIMESTAMP", alias = { + @ MappingInfo(descriptor = TimestampDesc.class, typeName = "TIMESTAMP", alias = { "TIMESTAMPTZ", "TIMESTAMP WITHOUT TIME ZONE", "TIMESTAMP TIME WITH TIME ZONE" 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-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/VarbitDataType.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -20,7 +20,7 @@ import org.jiemamy.dialect.MappingInfo; import org.jiemamy.model.datatype.AbstractDataType; -import org.jiemamy.model.datatype.IntegerDataTypeDescriptor; +import org.jiemamy.model.datatype.IntegerDesc; import org.jiemamy.model.datatype.adapter.SizedDataTypeAdapter; /** @@ -28,7 +28,7 @@ * @author daisuke */ @SuppressWarnings("serial") - @ MappingInfo(descriptor = IntegerDataTypeDescriptor.class, typeName = "VARBIT", alias = "BIT VARYING") + @ MappingInfo(descriptor = IntegerDesc.class, typeName = "VARBIT", alias = "BIT VARYING") public class VarbitDataType extends AbstractDataType { /** 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-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.dialect.postgresql/src/main/java/org/jiemamy/dialect/postgresql/datatype/VarcharDataType.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -20,7 +20,7 @@ import org.jiemamy.dialect.MappingInfo; import org.jiemamy.model.datatype.AbstractDataType; -import org.jiemamy.model.datatype.VarcharDataTypeDescriptor; +import org.jiemamy.model.datatype.VarcharDesc; import org.jiemamy.model.datatype.adapter.SizedDataTypeAdapter; /** @@ -28,7 +28,7 @@ * @author daisuke */ @SuppressWarnings("serial") - @ MappingInfo(descriptor = VarcharDataTypeDescriptor.class, typeName = "VARCHAR", alias = "CHARACTER VARYING") + @ MappingInfo(descriptor = VarcharDesc.class, typeName = "VARCHAR", alias = "CHARACTER VARYING") public class VarcharDataType extends AbstractDataType { /** 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-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.dialect.postgresql/src/test/java/org/jiemamy/dialect/postgresql/PostgresqlDialectTest.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -62,8 +62,8 @@ import org.jiemamy.model.Jiemamy; import org.jiemamy.model.RootModel; import org.jiemamy.model.datatype.DataType; -import org.jiemamy.model.datatype.IntegerDataTypeDescriptor; -import org.jiemamy.model.datatype.VarcharDataTypeDescriptor; +import org.jiemamy.model.datatype.IntegerDesc; +import org.jiemamy.model.datatype.VarcharDesc; import org.jiemamy.model.datatype.adapter.PrecisionedDataTypeAdapter; import org.jiemamy.model.datatype.adapter.SizedDataTypeAdapter; import org.jiemamy.model.datatype.adapter.TimezonedDataTypeAdapter; @@ -232,17 +232,17 @@ @Test public void test05_データ型のマッピングにより_相互に変換が行える() throws Exception { DataTypeResolver resolver = dialect.getDataTypeResolver(); - assertThat(resolver.resolveDataTypeDescriptor("INT"), instanceOf(IntegerDataTypeDescriptor.class)); - assertThat(resolver.resolveDataTypeDescriptor("INT4"), instanceOf(IntegerDataTypeDescriptor.class)); - assertThat(resolver.resolveDataTypeDescriptor("INTEGER"), instanceOf(IntegerDataTypeDescriptor.class)); - assertThat(resolver.resolveDataTypeDescriptor("VARCHAR"), instanceOf(VarcharDataTypeDescriptor.class)); + assertThat(resolver.resolveDataTypeDescriptor("INT"), instanceOf(IntegerDesc.class)); + assertThat(resolver.resolveDataTypeDescriptor("INT4"), instanceOf(IntegerDesc.class)); + assertThat(resolver.resolveDataTypeDescriptor("INTEGER"), instanceOf(IntegerDesc.class)); + assertThat(resolver.resolveDataTypeDescriptor("VARCHAR"), instanceOf(VarcharDesc.class)); try { - assertThat(resolver.resolveDataTypeDescriptor("HOGE"), instanceOf(VarcharDataTypeDescriptor.class)); + assertThat(resolver.resolveDataTypeDescriptor("HOGE"), instanceOf(VarcharDesc.class)); fail(); } catch (DataTypeNotFoundException e) { } - assertThat(resolver.resolveDataType(new IntegerDataTypeDescriptor()), instanceOf(IntegerDataType.class)); + assertThat(resolver.resolveDataType(new IntegerDesc()), instanceOf(IntegerDataType.class)); } Modified: artemis/trunk/org.jiemamy.event/src/test/java/org/jiemamy/model/RootModelEventTest.java =================================================================== --- artemis/trunk/org.jiemamy.event/src/test/java/org/jiemamy/model/RootModelEventTest.java 2008-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.event/src/test/java/org/jiemamy/model/RootModelEventTest.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -39,7 +39,7 @@ import org.jiemamy.event.ModelChangeSupport; import org.jiemamy.exception.TooManyElementsException; import org.jiemamy.model.attribute.ColumnModel; -import org.jiemamy.model.datatype.IntegerDataTypeDescriptor; +import org.jiemamy.model.datatype.IntegerDesc; import org.jiemamy.model.node.TableModel; /** @@ -92,7 +92,7 @@ TableModel tableModel = rootModel.getEntity(TableModel.class, "T_USER01"); ColumnModel columnModel = rootModel.newModel(ColumnModel.class); columnModel.setName("COL1"); - columnModel.setDataTypeDescriptor(new IntegerDataTypeDescriptor()); + columnModel.setDataTypeDescriptor(new IntegerDesc()); assertThat(tableModel, is(notNullValue())); assertThat(columnModel, is(notNullValue())); @@ -153,7 +153,7 @@ rootModel.appendModel(table2); ColumnModel columnModel = rootModel.newModel(ColumnModel.class); columnModel.setName("COL1"); - columnModel.setDataTypeDescriptor(new IntegerDataTypeDescriptor()); + columnModel.setDataTypeDescriptor(new IntegerDesc()); table1.appendModel(columnModel); // rootModelの監視を開始する。 Modified: artemis/trunk/org.jiemamy.event/src/test/java/org/jiemamy/util/ObservableListTest.java =================================================================== --- artemis/trunk/org.jiemamy.event/src/test/java/org/jiemamy/util/ObservableListTest.java 2008-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.event/src/test/java/org/jiemamy/util/ObservableListTest.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -43,9 +43,9 @@ import org.jiemamy.model.RootModel; import org.jiemamy.model.attribute.ColumnModel; import org.jiemamy.model.datatype.DataTypeDescriptor; -import org.jiemamy.model.datatype.IntegerDataTypeDescriptor; -import org.jiemamy.model.datatype.TimestampDataTypeDescriptor; -import org.jiemamy.model.datatype.VarcharDataTypeDescriptor; +import org.jiemamy.model.datatype.IntegerDesc; +import org.jiemamy.model.datatype.TimestampDesc; +import org.jiemamy.model.datatype.VarcharDesc; import org.jiemamy.utils.ObservableList; /** @@ -66,15 +66,15 @@ Object[][] columnDatas = { { "ID", - new IntegerDataTypeDescriptor() + new IntegerDesc() }, { "NAME", - new VarcharDataTypeDescriptor(100) + new VarcharDesc(100) }, { "TIMESTAMP", - new TimestampDataTypeDescriptor() + new TimestampDesc() } }; ColumnModel[] columnModels = new ColumnModel[columnDatas.length]; Modified: artemis/trunk/org.jiemamy.event/src/test/java/org/jiemamy/util/ObservableMapTest.java =================================================================== --- artemis/trunk/org.jiemamy.event/src/test/java/org/jiemamy/util/ObservableMapTest.java 2008-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.event/src/test/java/org/jiemamy/util/ObservableMapTest.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -40,9 +40,9 @@ import org.jiemamy.model.RootModel; import org.jiemamy.model.attribute.ColumnModel; import org.jiemamy.model.datatype.DataTypeDescriptor; -import org.jiemamy.model.datatype.IntegerDataTypeDescriptor; -import org.jiemamy.model.datatype.TimestampDataTypeDescriptor; -import org.jiemamy.model.datatype.VarcharDataTypeDescriptor; +import org.jiemamy.model.datatype.IntegerDesc; +import org.jiemamy.model.datatype.TimestampDesc; +import org.jiemamy.model.datatype.VarcharDesc; import org.jiemamy.utils.ObservableMap; /** @@ -60,15 +60,15 @@ Object[][] columnDatas = { { "ID", - new IntegerDataTypeDescriptor() + new IntegerDesc() }, { "NAME", - new VarcharDataTypeDescriptor(100) + new VarcharDesc(100) }, { "TIMESTAMP", - new TimestampDataTypeDescriptor() + new TimestampDesc() } }; ColumnModel[] columnModels = new ColumnModel[columnDatas.length]; Modified: artemis/trunk/org.jiemamy.serializer/src/test/java/org/jiemamy/internal/serializer/sax/ModelInputStreamTest.java =================================================================== --- artemis/trunk/org.jiemamy.serializer/src/test/java/org/jiemamy/internal/serializer/sax/ModelInputStreamTest.java 2008-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.serializer/src/test/java/org/jiemamy/internal/serializer/sax/ModelInputStreamTest.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -38,9 +38,9 @@ import org.jiemamy.model.Jiemamy; import org.jiemamy.model.RootModel; import org.jiemamy.model.attribute.ColumnModel; -import org.jiemamy.model.datatype.IntegerDataTypeDescriptor; -import org.jiemamy.model.datatype.TimestampDataTypeDescriptor; -import org.jiemamy.model.datatype.VarcharDataTypeDescriptor; +import org.jiemamy.model.datatype.IntegerDesc; +import org.jiemamy.model.datatype.TimestampDesc; +import org.jiemamy.model.datatype.VarcharDesc; import org.jiemamy.model.node.TableModel; /** @@ -93,11 +93,11 @@ ColumnModel col3 = rootModel.newModel(ColumnModel.class); col1.setName("col1"); - col1.setDataTypeDescriptor(new IntegerDataTypeDescriptor()); + col1.setDataTypeDescriptor(new IntegerDesc()); col2.setName("col2"); - col2.setDataTypeDescriptor(new VarcharDataTypeDescriptor(16)); + col2.setDataTypeDescriptor(new VarcharDesc(16)); col3.setName("col3"); - col3.setDataTypeDescriptor(new TimestampDataTypeDescriptor()); + col3.setDataTypeDescriptor(new TimestampDesc()); t.appendModel(col1); t.appendModel(col2); Modified: artemis/trunk/org.jiemamy.serializer/src/test/java/org/jiemamy/serializer/ApplicationModelCreator.java =================================================================== --- artemis/trunk/org.jiemamy.serializer/src/test/java/org/jiemamy/serializer/ApplicationModelCreator.java 2008-12-22 10:24:40 UTC (rev 2294) +++ artemis/trunk/org.jiemamy.serializer/src/test/java/org/jiemamy/serializer/ApplicationModelCreator.java 2008-12-24 09:29:44 UTC (rev 2295) @@ -22,10 +22,10 @@ import org.jiemamy.model.dataset.InsertDataSetModel; import org.jiemamy.model.dataset.RecordModel; import org.jiemamy.model.datatype.DomainModel; -import org.jiemamy.model.datatype.IntegerDataTypeDescriptor; -import org.jiemamy.model.datatype.NumericDataTypeDescriptor; -import org.jiemamy.model.datatype.TimestampDataTypeDescriptor; -import org.jiemamy.model.datatype.VarcharDataTypeDescriptor; +import org.jiemamy.model.datatype.IntegerDesc; +import org.jiemamy.model.datatype.NumericDesc; +import org.jiemamy.model.datatype.TimestampDesc; +import org.jiemamy.model.datatype.VarcharDesc; import org.jiemamy.model.datatype.adapter.SerialDataTypeAdapter; import org.jiemamy.model.geometory.JmPoint; import org.jiemamy.model.geometory.JmRectangle; @@ -75,7 +75,7 @@ // ドメインの生成 DomainModel idDomain = rootModel.newModel(DomainModel.class); idDomain.setName("ID"); - idDomain.setDataTypeDescriptor(new IntegerDataTypeDescriptor()); + idDomain.setDataTypeDescriptor(new IntegerDesc()); idDomain.addConstraint(rootModel.newModel(NotNullConstraintModel.class)); idDomain.addConstraint(rootModel.newModel(UniqueConstraintModel.class)); idDomain.registerAdapter(new SerialDataTypeAdapter()); @@ -83,7 +83,7 @@ DomainModel nameDomain = rootModel.newModel(DomainModel.class); nameDomain.setName("NAME"); - nameDomain.setDataTypeDescriptor(new VarcharDataTypeDescriptor(32)); + nameDomain.setDataTypeDescriptor(new VarcharDesc(32)); nameDomain.setDescription("人名用の型です。"); rootModel.appendModel(nameDomain); @@ -253,20 +253,20 @@ ColumnModel noColumn = rootModel.newModel(ColumnModel.class); noColumn.setName("DEPT_NO"); - noColumn.setDataTypeDescriptor(new IntegerDataTypeDescriptor()); + noColumn.setDataTypeDescriptor(new IntegerDesc()); noColumn.setLogicalName("部署番号"); deptTable.appendModel(noColumn); ColumnModel deptNameColumn = rootModel.newModel(ColumnModel.class); deptNameColumn.setName("DEPT_NAME"); - deptNameColumn.setDataTypeDescriptor(new VarcharDataTypeDescriptor(20)); + deptNameColumn.setDataTypeDescriptor(new VarcharDesc(20)); deptNameColumn.setLogicalName("部署名"); deptNameColumn.setRepresentation(true); deptTable.appendModel(deptNameColumn); ColumnModel locColumn = rootModel.newModel(ColumnModel.class); locColumn.setName("LOC"); - locColumn.setDataTypeDescriptor(new VarcharDataTypeDescriptor(20)); + locColumn.setDataTypeDescriptor(new VarcharDesc(20)); locColumn.setLogicalName("ロケーション"); locColumn.setDefaultValue("secret"); deptTable.appendModel(locColumn); @@ -478,7 +478,7 @@ ColumnModel noColumn = rootModel.newModel(ColumnModel.class); noColumn.setName("EMP_NO"); - noColumn.setDataTypeDescriptor(new IntegerDataTypeDescriptor()); + noColumn.setDataTypeDescriptor(new IntegerDesc()); noColumn.addConstraint(rootModel.newModel(NotNullConstraintModel.class)); noColumn.setLogicalName("従業員番号"); empTable.appendModel(noColumn); @@ -495,25 +495,25 @@ ColumnModel mgrColumn = rootModel.newModel(ColumnModel.class); mgrColumn.setName("MGR_ID"); - mgrColumn.setDataTypeDescriptor(new IntegerDataTypeDescriptor()); + mgrColumn.setDataTypeDescriptor(new IntegerDesc()); nameColumn.setLogicalName("上司ID"); empTable.appendModel(mgrColumn); ColumnModel hireColumn = rootModel.newModel(ColumnModel.class); hireColumn.setName("HIREDATE"); - hireColumn.setDataTypeDescriptor(new TimestampDataTypeDescriptor()); + hireColumn.setDataTypeDescriptor(new TimestampDesc()); hireColumn.addConstraint(rootModel.newModel(NotNullConstraintModel.class)); empTable.appendModel(hireColumn); ColumnModel salColumn = rootModel.newModel(ColumnModel.class); salColumn.setName("SAL"); - salColumn.setDataTypeDescriptor(new NumericDataTypeDescriptor(7, 2)); + salColumn.setDataTypeDescriptor(new NumericDesc(7, 2)); salColumn.addConstraint(rootModel.newModel(NotNullConstraintModel.class)); empTable.appendModel(salColumn); ColumnModel deptColumn = rootModel.newModel(ColumnModel.class); deptColumn.setName("DEPT_ID"); - deptColumn.setDataTypeDescriptor(new IntegerDataTypeDescriptor()); + deptColumn.setDataTypeDescriptor(new IntegerDesc()); deptColumn.addConstraint(rootModel.newModel(NotNullConstraintModel.class)); empTable.appendModel(deptColumn);