svnno****@sourc*****
svnno****@sourc*****
2009年 1月 12日 (月) 23:34:33 JST
Revision: 2404 http://svn.sourceforge.jp/view?root=jiemamy&view=rev&rev=2404 Author: daisuke_m Date: 2009-01-12 23:34:32 +0900 (Mon, 12 Jan 2009) Log Message: ----------- unmodifiable関係のテストを削除。 / composerにcommons-beanutilsの依存を追加。 Modified Paths: -------------- artemis/trunk/org.jiemamy.composer/.classpath artemis/trunk/org.jiemamy.composer/pom.xml artemis/trunk/org.jiemamy.composer/src/main/java/org/jiemamy/composer/importer/DatabaseImporter.java artemis/trunk/org.jiemamy.core/.classpath artemis/trunk/org.jiemamy.core/META-INF/MANIFEST.MF artemis/trunk/org.jiemamy.core/build.properties artemis/trunk/org.jiemamy.core/pom.xml artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/FactoryExtension.java artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/utils/ResourceTraversal.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 Removed Paths: ------------- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/utils/BeanUtil.java -------------- next part -------------- Modified: artemis/trunk/org.jiemamy.composer/.classpath =================================================================== --- artemis/trunk/org.jiemamy.composer/.classpath 2009-01-12 14:02:53 UTC (rev 2403) +++ artemis/trunk/org.jiemamy.composer/.classpath 2009-01-12 14:34:32 UTC (rev 2404) @@ -9,6 +9,7 @@ <classpathentry kind="lib" path="lib/jmockit-0.94.jar"/> <classpathentry kind="lib" path="lib/xmlParserAPIs-2.6.2.jar" sourcepath="lib/sources/xmlParserAPIs-2.6.2-sources.jar"/> <classpathentry kind="lib" path="lib/xercesImpl-2.6.2.jar" sourcepath="lib/sources/xercesImpl-2.6.2-sources.jar"/> + <classpathentry exported="true" kind="lib" path="lib/commons-beanutils-1.8.0.jar" sourcepath="lib/sources/commons-beanutils-1.8.0-sources.jar"/> <classpathentry exported="true" kind="lib" path="lib/freemarker-2.3.11.jar" sourcepath="lib/sources/freemarker-2.3.11-sources.jar"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/> Modified: artemis/trunk/org.jiemamy.composer/pom.xml =================================================================== --- artemis/trunk/org.jiemamy.composer/pom.xml 2009-01-12 14:02:53 UTC (rev 2403) +++ artemis/trunk/org.jiemamy.composer/pom.xml 2009-01-12 14:34:32 UTC (rev 2404) @@ -98,12 +98,43 @@ <version>1.1.102</version> <scope>test</scope> </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <version>1.5.5</version> + </dependency> <dependency> + <groupId>org.slf4j</groupId> + <artifactId>jcl-over-slf4j</artifactId> + <version>1.5.5</version> + </dependency> + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-core</artifactId> + <version>0.9.9</version> + </dependency> + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-classic</artifactId> + <version>0.9.9</version> + </dependency> + <dependency> <groupId>org.freemarker</groupId> <artifactId>freemarker</artifactId> <version>2.3.11</version> </dependency> <dependency> + <groupId>commons-beanutils</groupId> + <artifactId>commons-beanutils</artifactId> + <version>1.8.0</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> <groupId>${project.groupId}</groupId> <artifactId>org.jiemamy.spec.core</artifactId> <version>${project.version}</version> Modified: artemis/trunk/org.jiemamy.composer/src/main/java/org/jiemamy/composer/importer/DatabaseImporter.java =================================================================== --- artemis/trunk/org.jiemamy.composer/src/main/java/org/jiemamy/composer/importer/DatabaseImporter.java 2009-01-12 14:02:53 UTC (rev 2403) +++ artemis/trunk/org.jiemamy.composer/src/main/java/org/jiemamy/composer/importer/DatabaseImporter.java 2009-01-12 14:34:32 UTC (rev 2404) @@ -11,6 +11,7 @@ import java.util.Map; import java.util.Properties; +import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.lang.Validate; import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang.builder.ToStringStyle; @@ -27,7 +28,6 @@ import org.jiemamy.model.connection.ForeignKeyModel; import org.jiemamy.model.node.AbstractEntityModel; import org.jiemamy.model.node.TableModel; -import org.jiemamy.utils.BeanUtil; import org.jiemamy.utils.CollectionsUtil; import org.jiemamy.utils.DriverUtil; import org.jiemamy.utils.JmIOUtil; @@ -108,7 +108,7 @@ // 詰め替え DatabaseReadingContext readingCtx = new DatabaseReadingContext(); - BeanUtil.copyProperties(ctx, readingCtx); + BeanUtils.copyProperties(ctx, readingCtx); DatabaseReader reader = new DatabaseReader(dialect, readingCtx, meta); Modified: artemis/trunk/org.jiemamy.core/.classpath =================================================================== --- artemis/trunk/org.jiemamy.core/.classpath 2009-01-12 14:02:53 UTC (rev 2403) +++ artemis/trunk/org.jiemamy.core/.classpath 2009-01-12 14:34:32 UTC (rev 2404) @@ -19,6 +19,7 @@ <classpathentry exported="true" kind="lib" path="lib/wstx-asl-3.2.7.jar" sourcepath="lib/sources/wstx-asl-3.2.7-sources.jar"/> <classpathentry exported="true" kind="lib" path="lib/commons-lang-2.3.jar" sourcepath="lib/sources/commons-lang-2.3-sources.jar"/> <classpathentry exported="true" kind="lib" path="lib/commons-io-1.3.2.jar" sourcepath="lib/sources/commons-io-1.3.2-sources.jar"/> + <classpathentry kind="lib" path="lib/commons-beanutils-1.8.0.jar" sourcepath="lib/sources/commons-beanutils-1.8.0-sources.jar"/> <classpathentry exported="true" kind="lib" path="lib/collections-generic-4.01.jar" sourcepath="lib/sources/collections-generic-4.01-sources.jar"/> <classpathentry exported="true" kind="lib" path="lib/serp-1.13.1.jar"/> <classpathentry exported="true" kind="lib" path="lib/openjpa-jdbc-1.2.0.jar" sourcepath="lib/sources/openjpa-jdbc-1.2.0-sources.jar"/> Modified: artemis/trunk/org.jiemamy.core/META-INF/MANIFEST.MF =================================================================== --- artemis/trunk/org.jiemamy.core/META-INF/MANIFEST.MF 2009-01-12 14:02:53 UTC (rev 2403) +++ artemis/trunk/org.jiemamy.core/META-INF/MANIFEST.MF 2009-01-12 14:34:32 UTC (rev 2404) @@ -19,13 +19,26 @@ lib/openjpa-persistence-1.2.0.jar, lib/openjpa-persistence-jdbc-1.2.0.jar, lib/h2-1.1.102.jar, - lib/serp-1.13.1.jar + lib/serp-1.13.1.jar, + lib/commons-beanutils-1.8.0.jar, + lib/javassist-3.8.0.GA.jar, + lib/jdom-1.0.jar, + lib/rome-0.9.jar, + lib/stax-1.2.0.jar, + lib/stax-api-1.0.1.jar, + lib/wstx-asl-3.2.7.jar Bundle-Vendor: Jiemamy Project Export-Package: javax.xml.parsers, javax.xml.transform, javax.xml.transform.dom, javax.xml.transform.sax, javax.xml.transform.stream, + org.apache.commons.beanutils, + org.apache.commons.beanutils.converters, + org.apache.commons.beanutils.expression, + org.apache.commons.beanutils.locale, + org.apache.commons.beanutils.locale.converters, + org.apache.commons.collections, org.apache.commons.collections15, org.apache.commons.collections15.bag, org.apache.commons.collections15.bidimap, Modified: artemis/trunk/org.jiemamy.core/build.properties =================================================================== --- artemis/trunk/org.jiemamy.core/build.properties 2009-01-12 14:02:53 UTC (rev 2403) +++ artemis/trunk/org.jiemamy.core/build.properties 2009-01-12 14:34:32 UTC (rev 2404) @@ -21,7 +21,14 @@ lib/openjpa-persistence-1.2.0.jar,\ lib/openjpa-persistence-jdbc-1.2.0.jar,\ lib/h2-1.1.102.jar,\ - lib/serp-1.13.1.jar + lib/serp-1.13.1.jar,\ + lib/commons-beanutils-1.8.0.jar,\ + lib/javassist-3.8.0.GA.jar,\ + lib/jdom-1.0.jar,\ + lib/rome-0.9.jar,\ + lib/stax-1.2.0.jar,\ + lib/stax-api-1.0.1.jar,\ + lib/wstx-asl-3.2.7.jar output..=target/classes/ source..=src/main/java/,src/main/resources/,src/test/java/,src/test/resources/ bin.excludes=lib/sources/ Modified: artemis/trunk/org.jiemamy.core/pom.xml =================================================================== --- artemis/trunk/org.jiemamy.core/pom.xml 2009-01-12 14:02:53 UTC (rev 2403) +++ artemis/trunk/org.jiemamy.core/pom.xml 2009-01-12 14:34:32 UTC (rev 2404) @@ -171,6 +171,12 @@ <groupId>commons-beanutils</groupId> <artifactId>commons-beanutils</artifactId> <version>1.8.0</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>net.sourceforge.collections</groupId> @@ -186,7 +192,13 @@ <groupId>org.apache.openjpa</groupId> <artifactId>openjpa-persistence-jdbc</artifactId> <version>1.2.0</version> - </dependency> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> <dependency> <groupId>${project.groupId}</groupId> <artifactId>factory-enhancer</artifactId> Modified: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/FactoryExtension.java =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/FactoryExtension.java 2009-01-12 14:02:53 UTC (rev 2403) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/FactoryExtension.java 2009-01-12 14:34:32 UTC (rev 2404) @@ -111,8 +111,7 @@ tableModel.setIndexes(new ArrayList<IndexModel>()); tableModel.setSourceConnections(new ArrayList<AbstractConnectionModel>()); tableModel.setTargetConnections(new ArrayList<AbstractConnectionModel>()); - tableModel.setPrimaryKey(new FactoryExtension<PrimaryKeyConstraintModel>().newInstance( - PrimaryKeyConstraintModel.class, jiemamy, jiemamyFactory)); + tableModel.setPrimaryKey(jiemamyFactory.newModel(PrimaryKeyConstraintModel.class)); tableModel.setUniques(new ArrayList<UniqueConstraintModel>()); product = (T) tableModel; } else if (clazz == ViewModel.class) { Deleted: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/utils/BeanUtil.java =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/utils/BeanUtil.java 2009-01-12 14:02:53 UTC (rev 2403) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/utils/BeanUtil.java 2009-01-12 14:34:32 UTC (rev 2404) @@ -1,44 +0,0 @@ -/* - * Copyright 2007-2009 Jiemamy Project and the Others. - * Created on 2009/01/12 - * - * 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; - - -/** - * JavaBeans用のユーティリティです。 - * - * @author Kimura Satoshi - * @author higa - * - */ -public class BeanUtil { - - /** - * TODO for daisuke - * - * @param ctx - * @param readingCtx - */ - public static void copyProperties(Object a, Object b) { - // TODO Auto-generated method stub - - } - - private BeanUtil() { - } -} Modified: artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/utils/ResourceTraversal.java =================================================================== --- artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/utils/ResourceTraversal.java 2009-01-12 14:02:53 UTC (rev 2403) +++ artemis/trunk/org.jiemamy.core/src/main/java/org/jiemamy/utils/ResourceTraversal.java 2009-01-12 14:34:32 UTC (rev 2404) @@ -70,9 +70,9 @@ * @throws IOException */ public static void forEach(final JarFile jarFile, final ResourceHandler handler) throws IOException { - final Enumeration enumeration = jarFile.entries(); + final Enumeration<JarEntry> enumeration = jarFile.entries(); while (enumeration.hasMoreElements()) { - final JarEntry entry = (JarEntry) enumeration.nextElement(); + final JarEntry entry = enumeration.nextElement(); if (!entry.isDirectory()) { final String entryName = entry.getName().replace('\\', '/'); final InputStream is = jarFile.getInputStream(entry); 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 2009-01-12 14:02:53 UTC (rev 2403) +++ artemis/trunk/org.jiemamy.core/src/test/java/org/jiemamy/model/RootModelImplTest.java 2009-01-12 14:34:32 UTC (rev 2404) @@ -24,7 +24,6 @@ import static org.hamcrest.CoreMatchers.nullValue; import static org.hamcrest.CoreMatchers.sameInstance; import static org.junit.Assert.assertThat; -import static org.junit.Assert.fail; import java.sql.Types; @@ -103,44 +102,6 @@ } /** - * コレクションプロパティはumodifiableであること。 - * @throws Exception - */ - @Test - public void test02_コレクションプロパティはumodifiableであること() throws Exception { - try { - rootModel.getDomains().add(EmptyProxyModel.DOMAIN); - fail(); - } catch (UnsupportedOperationException e) { - // success - } - try { - rootModel.getNodes().add(EmptyProxyModel.NODE); - fail(); - } catch (UnsupportedOperationException e) { - // success - } - try { - rootModel.getConnections().add(EmptyProxyModel.CONNECTION); - fail(); - } catch (UnsupportedOperationException e) { - // success - } - try { - rootModel.getAdapters().add(new Object()); - fail(); - } catch (UnsupportedOperationException e) { - // success - } - try { - rootModel.getInsertDataSets().add(EmptyProxyModel.INSERT_DATA_SET); - fail(); - } catch (UnsupportedOperationException e) { - // success - } - } - - /** * appendModelとremoveModel経由で各種モデルが追加削除できること。 * @throws Exception */ 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 2009-01-12 14:02:53 UTC (rev 2403) +++ artemis/trunk/org.jiemamy.core/src/test/java/org/jiemamy/model/node/TableModelImplTest.java 2009-01-12 14:34:32 UTC (rev 2404) @@ -23,7 +23,6 @@ import static org.hamcrest.CoreMatchers.nullValue; import static org.hamcrest.CoreMatchers.sameInstance; import static org.junit.Assert.assertThat; -import static org.junit.Assert.fail; import java.sql.Types; @@ -34,7 +33,6 @@ import org.jiemamy.Jiemamy; import org.jiemamy.JiemamyFactory; -import org.jiemamy.model.EmptyProxyModel; import org.jiemamy.model.RootModel; import org.jiemamy.model.attribute.ColumnModel; import org.jiemamy.model.connection.ForeignKeyModel; @@ -114,44 +112,6 @@ } /** - * コレクションプロパティはumodifiableであること。 - * @throws Exception - */ - @Test - public void test02_コレクションプロパティはumodifiableであること() throws Exception { - try { - tableModel.getColumns().add(EmptyProxyModel.COLUMN); - fail(); - } catch (UnsupportedOperationException e) { - // success - } - try { - tableModel.getChecks().add(EmptyProxyModel.CHECK); - fail(); - } catch (UnsupportedOperationException e) { - // success - } - try { - tableModel.getIndexes().add(EmptyProxyModel.INDEX); - fail(); - } catch (UnsupportedOperationException e) { - // success - } - try { - tableModel.getSourceConnections().add(EmptyProxyModel.CONNECTION); - fail(); - } catch (UnsupportedOperationException e) { - // success - } - try { - tableModel.getTargetConnections().add(EmptyProxyModel.CONNECTION); - fail(); - } catch (UnsupportedOperationException e) { - // success - } - } - - /** * appendModelとremoveModel経由で各種モデルが追加削除できること。 * @throws Exception */