svnno****@sourc*****
svnno****@sourc*****
2008年 12月 28日 (日) 01:24:25 JST
Revision: 2325 http://svn.sourceforge.jp/view?root=jiemamy&view=rev&rev=2325 Author: daisuke_m Date: 2008-12-28 01:24:24 +0900 (Sun, 28 Dec 2008) Log Message: ----------- simpleIndexの廃止。普通にIndexModelでやろう…w Modified Paths: -------------- artemis/trunk/org.jiemamy.composer/src/test/java/org/jiemamy/composer/importer/DatabaseImporterTest.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/attribute/ColumnModelImpl.java artemis/trunk/org.jiemamy.event/src/test/java/org/jiemamy/util/ObservableListTest.java artemis/trunk/org.jiemamy.serializer/src/main/java/org/jiemamy/internal/serializer/sax/command/ColumnCommand.java artemis/trunk/org.jiemamy.serializer/src/main/java/org/jiemamy/internal/serializer/sax/element/ColumnXmlElement.java artemis/trunk/org.jiemamy.serializer/src/test/java/org/jiemamy/serializer/ApplicationModelCreator.java zeus/trunk/org.jiemamy.spec.core/src/main/java/org/jiemamy/model/attribute/ColumnModel.java zeus/trunk/org.jiemamy.spec.core/src/main/resources/jiemamy-core.xsd zeus/trunk/org.jiemamy.spec.core/src/main/resources/sample-validation-target.xml -------------- 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-27 16:16:25 UTC (rev 2324) +++ artemis/trunk/org.jiemamy.composer/src/test/java/org/jiemamy/composer/importer/DatabaseImporterTest.java 2008-12-27 16:24:24 UTC (rev 2325) @@ -138,7 +138,7 @@ assertThat(column2.getName(), is("title")); assertThat(column2.getDataTypeDescriptor(), instanceOf(VarcharDesc.class)); assertThat(column2.getDataTypeDescriptor().getAdapter(SizedDataTypeAdapter.class).getSize(), is(128)); - assertThat(column2.getDataTypeDescriptorAs(VarcharDesc.class).getSize(), is(128)); + assertThat(((VarcharDesc) column2.getDataTypeDescriptor()).getSize(), is(128)); assertThat(column2.getConstraints().has(PrimaryKeyConstraintModel.class), is(false)); ForeignKeyModel foreignKeyModel = (ForeignKeyModel) pollTable.getTargetConnections().iterator().next(); Modified: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/attribute/ColumnModelImpl.java =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/attribute/ColumnModelImpl.java 2008-12-27 16:16:25 UTC (rev 2324) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/model/attribute/ColumnModelImpl.java 2008-12-27 16:24:24 UTC (rev 2325) @@ -54,9 +54,6 @@ /** 制約 */ private ConstraintsModel constraints = new ConstraintsModelImpl(); - /** 単純インデックスの有無 */ - private boolean simpleIndex; - /** 自由文字列 */ private String freeString; @@ -184,17 +181,6 @@ /** * {@inheritDoc} */ - public boolean isSimpleIndex() { - if (dataTypeDescriptor instanceof DomainModel && simpleIndex == false) { - DomainModel domainModel = (DomainModel) dataTypeDescriptor; - return domainModel.isSimpleIndex(); - } - return simpleIndex; - } - - /** - * {@inheritDoc} - */ public void removeConstraint(Class<? extends Constraint> constraintClass) { assert constraints != null; Validate.notNull(constraintClass); @@ -253,13 +239,6 @@ /** * {@inheritDoc} */ - public void setSimpleIndex(boolean simpleIndex) { - this.simpleIndex = simpleIndex; - } - - /** - * {@inheritDoc} - */ @Override public String toString() { return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE); 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-27 16:16:25 UTC (rev 2324) +++ artemis/trunk/org.jiemamy.event/src/test/java/org/jiemamy/util/ObservableListTest.java 2008-12-27 16:24:24 UTC (rev 2325) @@ -211,7 +211,7 @@ assertArrayEquals(columns, modelList.toArray()); listener.events.clear(); - columns[2].setSimpleIndex(false); + columns[2].setDefaultValue("2008-12-28 01:23.45"); assertThat("ColumnModelの属性を変更すると、modelChangeが通知されるはず。", listener.events.size(), is(1)); assertThat("ColumnModelの属性を変更すると、modelChangeが通知されるはず。", listener.events.get(0).getTiming(), is(Timing.COLLECTION_CHANGED)); Modified: artemis/trunk/org.jiemamy.serializer/src/main/java/org/jiemamy/internal/serializer/sax/command/ColumnCommand.java =================================================================== --- artemis/trunk/org.jiemamy.serializer/src/main/java/org/jiemamy/internal/serializer/sax/command/ColumnCommand.java 2008-12-27 16:16:25 UTC (rev 2324) +++ artemis/trunk/org.jiemamy.serializer/src/main/java/org/jiemamy/internal/serializer/sax/command/ColumnCommand.java 2008-12-27 16:24:24 UTC (rev 2325) @@ -56,8 +56,6 @@ columnModel.setLogicalName(text); } else if (elementName.equals("defaultValue")) { columnModel.setDefaultValue(text); - } else if (elementName.equals("simpleIndex")) { - columnModel.setSimpleIndex(Boolean.valueOf(text)); } else if (elementName.equals("freeString")) { columnModel.setFreeString(text); } else if (elementName.equals("description")) { Modified: artemis/trunk/org.jiemamy.serializer/src/main/java/org/jiemamy/internal/serializer/sax/element/ColumnXmlElement.java =================================================================== --- artemis/trunk/org.jiemamy.serializer/src/main/java/org/jiemamy/internal/serializer/sax/element/ColumnXmlElement.java 2008-12-27 16:16:25 UTC (rev 2324) +++ artemis/trunk/org.jiemamy.serializer/src/main/java/org/jiemamy/internal/serializer/sax/element/ColumnXmlElement.java 2008-12-27 16:24:24 UTC (rev 2325) @@ -80,7 +80,6 @@ queue.add(new DataTypeXmlElement(columnModel.getDataTypeDescriptor())); queue.add(new XmlElement(Namespaces.CORE, "defaultValue", columnModel.getDefaultValue())); queue.add(new CollectionXmlElement(Namespaces.CORE, "constraints", columnModel.getConstraints())); - queue.add(new XmlElement(Namespaces.CORE, "simpleIndex", columnModel.isSimpleIndex())); queue.add(new XmlElement(Namespaces.CORE, "freeString", columnModel.getFreeString())); queue.add(new XmlElement(Namespaces.CORE, "description", columnModel.getDescription())); queue.add(new XmlElement(Namespaces.CORE, "options", null)); // FIXME 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-27 16:16:25 UTC (rev 2324) +++ artemis/trunk/org.jiemamy.serializer/src/test/java/org/jiemamy/serializer/ApplicationModelCreator.java 2008-12-27 16:24:24 UTC (rev 2325) @@ -489,7 +489,6 @@ nameColumn.addConstraint(rootModel.newModel(NotNullConstraintModel.class)); nameColumn.setLogicalName("従業員名"); nameColumn.setDefaultValue("no name"); - nameColumn.setSimpleIndex(true); nameColumn.setRepresentation(true); empTable.appendModel(nameColumn); Modified: zeus/trunk/org.jiemamy.spec.core/src/main/java/org/jiemamy/model/attribute/ColumnModel.java =================================================================== --- zeus/trunk/org.jiemamy.spec.core/src/main/java/org/jiemamy/model/attribute/ColumnModel.java 2008-12-27 16:16:25 UTC (rev 2324) +++ zeus/trunk/org.jiemamy.spec.core/src/main/java/org/jiemamy/model/attribute/ColumnModel.java 2008-12-27 16:24:24 UTC (rev 2325) @@ -48,14 +48,6 @@ DataTypeDescriptor getDataTypeDescriptor(); /** - * TODO for daisuke - * @param <T> - * @param clazz - * @return - */ - <T extends DataTypeDescriptor>T getDataTypeDescriptorAs(Class<T> clazz); - - /** * デフォルト値を取得する。 * @return デフォルト値 */ @@ -100,12 +92,6 @@ boolean isRepresentation(); /** - * 単純インデックスの有無を取得する。 - * @return 単純インデックスの有無 - */ - boolean isSimpleIndex(); - - /** * 制約を削除する。 * @param constraintClass 制約クラス * @throws IllegalArgumentException 引数に{@code null}を与えた場合 @@ -154,9 +140,4 @@ */ void setRepresentation(boolean representation); - /** - * 単純インデックスの有無を設定する。 - * @param simpleIndex 単純インデックスの有無 - */ - void setSimpleIndex(boolean simpleIndex); } Modified: zeus/trunk/org.jiemamy.spec.core/src/main/resources/jiemamy-core.xsd =================================================================== --- zeus/trunk/org.jiemamy.spec.core/src/main/resources/jiemamy-core.xsd 2008-12-27 16:16:25 UTC (rev 2324) +++ zeus/trunk/org.jiemamy.spec.core/src/main/resources/jiemamy-core.xsd 2008-12-27 16:24:24 UTC (rev 2325) @@ -74,7 +74,6 @@ <xsd:element ref="dataType" /> <xsd:element ref="defaultValue" minOccurs="0" /> <xsd:element ref="constraints" minOccurs="0" /> - <xsd:element ref="simpleIndex" minOccurs="0" /> <xsd:element ref="freeString" minOccurs="0" /> <xsd:element ref="description" minOccurs="0" /> </xsd:sequence> @@ -173,7 +172,6 @@ <xsd:element ref="dataType" /> <xsd:element ref="defaultValue" minOccurs="0" /> <xsd:element ref="constraints" minOccurs="0" /> - <xsd:element ref="simpleIndex" minOccurs="0" /> <xsd:element ref="freeString" minOccurs="0" /> <xsd:element ref="description" minOccurs="0" /> <xsd:element name="representation" type="xsd:boolean" minOccurs="0" /> @@ -412,7 +410,6 @@ </xsd:annotation> </xsd:element> <xsd:element name="defaultValue" type="xsd:string" /> - <xsd:element name="simpleIndex" type="xsd:boolean" /> <xsd:element name="freeString" type="xsd:string" /> Modified: zeus/trunk/org.jiemamy.spec.core/src/main/resources/sample-validation-target.xml =================================================================== --- zeus/trunk/org.jiemamy.spec.core/src/main/resources/sample-validation-target.xml 2008-12-27 16:16:25 UTC (rev 2324) +++ zeus/trunk/org.jiemamy.spec.core/src/main/resources/sample-validation-target.xml 2008-12-27 16:24:24 UTC (rev 2325) @@ -29,7 +29,6 @@ <name/> </constraint> </constraints> - <simpleIndex>false</simpleIndex> <freeString/> <description/> </domain> @@ -45,7 +44,6 @@ </dataType> <defaultValue/> <constraints/> - <simpleIndex>false</simpleIndex> <freeString/> <description>人名用の型です。</description> </domain> @@ -78,7 +76,6 @@ <name/> </constraint> </constraints> - <simpleIndex>false</simpleIndex> <freeString/> <description/> <representation>false</representation> @@ -92,7 +89,6 @@ </dataType> <defaultValue/> <constraints/> - <simpleIndex>false</simpleIndex> <freeString/> <description/> <representation>false</representation> @@ -109,7 +105,6 @@ </dataType> <defaultValue/> <constraints/> - <simpleIndex>false</simpleIndex> <freeString/> <description/> <representation>true</representation> @@ -126,7 +121,6 @@ </dataType> <defaultValue>secret</defaultValue> <constraints/> - <simpleIndex>false</simpleIndex> <freeString/> <description/> <representation>false</representation> @@ -163,7 +157,6 @@ <name/> </constraint> </constraints> - <simpleIndex>false</simpleIndex> <freeString/> <description/> <representation>false</representation> @@ -181,7 +174,6 @@ <name/> </constraint> </constraints> - <simpleIndex>false</simpleIndex> <freeString/> <description/> <representation>false</representation> @@ -195,7 +187,6 @@ <name/> </constraint> </constraints> - <simpleIndex>true</simpleIndex> <freeString/> <description/> <representation>true</representation> @@ -209,7 +200,6 @@ </dataType> <defaultValue/> <constraints/> - <simpleIndex>false</simpleIndex> <freeString/> <description/> <representation>false</representation> @@ -230,7 +220,6 @@ <name/> </constraint> </constraints> - <simpleIndex>false</simpleIndex> <freeString/> <description/> <representation>false</representation> @@ -252,7 +241,6 @@ <name/> </constraint> </constraints> - <simpleIndex>false</simpleIndex> <freeString/> <description/> <representation>false</representation> @@ -270,7 +258,6 @@ <name/> </constraint> </constraints> - <simpleIndex>false</simpleIndex> <freeString/> <description/> <representation>false</representation>