svnno****@sourc*****
svnno****@sourc*****
2009年 4月 7日 (火) 17:50:52 JST
Revision: 3156 http://svn.sourceforge.jp/view?root=jiemamy&view=rev&rev=3156 Author: j5ik2o Date: 2009-04-07 17:50:52 +0900 (Tue, 07 Apr 2009) Log Message: ----------- リファクタリング Modified Paths: -------------- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/JpaImporter.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/EntityMetaFactory.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/EntityMetaReader.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/PropertyMeta.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/PropertyMetaFactory.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/ColumnMetaFactoryImpl.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/EntityMetaFactoryImpl.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/EntityMetaReaderImpl.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/PropertyMetaFactoryImpl.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/TableMetaFactoryImpl.java charon/jiemamy-jpa-importer/trunk/src/test/java/example/entity/Employee.java Added Paths: ----------- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/CannotCreatePropertyException.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/ColumnDuplicatedException.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/EntityClassNotFoundException.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/NonEntityException.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/PropertyDuplicatedException.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/BothMappedByAndJoinColumnException.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/FieldDuplicatedException.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/IdGeneratorNotFoundException.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/JoinColumnNameAndReferencedColumnNameMandatoryException.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/LazyFetchSpecifiedException.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/MappedByMandatoryException.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/OneToManyNotGenericsException.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/OneToManyNotListException.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/RelationshipNotEntityException.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/TemporalTypeNotSpecifiedException.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/UnsupportedInheritanceException.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/UnsupportedPropertyTypesException.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/UnsupportedRelationshipException.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/VersionPropertyNotNumberException.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/generator/ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/generator/AbstractIdGenerator.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/generator/AbstractPreAllocateIdGenerator.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/generator/IdGenerator.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/generator/IdentityIdGenerator.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/generator/SequenceIdGenerator.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/generator/TableIdGenerator.java Removed Paths: ------------- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/BothMappedByAndJoinColumnException.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/ColumnDuplicatedException.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/IdentityIdGenerator.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/MappedByMandatoryException.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/OneToManyNotGenericsException.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/PropertyDuplicatedException.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/RelationshipNotEntityException.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/SequenceIdGenerator.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/TableIdGenerator.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/UnsupportedPropertyTypesException.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/EntityClassNotFoundException.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/FieldDuplicatedException.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/IdGeneratorNotFoundException.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/JoinColumnNameAndReferencedColumnNameMandatoryException.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/LazyFetchSpecifiedException.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/NonEntityException.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/OneToManyNotListException.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/TemporalTypeNotSpecifiedException.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/UnsupportedInheritanceException.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/UnsupportedRelationshipException.java charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/VersionPropertyNotNumberException.java -------------- next part -------------- Modified: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/JpaImporter.java =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/JpaImporter.java 2009-04-07 07:03:13 UTC (rev 3155) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/JpaImporter.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -26,11 +26,11 @@ import org.jiemamy.Jiemamy; import org.jiemamy.composer.ImportException; import org.jiemamy.composer.Importer; +import org.jiemamy.composer.importer.meta.EntityClassNotFoundException; import org.jiemamy.composer.importer.meta.EntityMeta; import org.jiemamy.composer.importer.meta.EntityMetaReader; import org.jiemamy.composer.importer.meta.EntityMetaReaderContext; import org.jiemamy.composer.importer.meta.impl.ColumnMetaFactoryImpl; -import org.jiemamy.composer.importer.meta.impl.EntityClassNotFoundException; import org.jiemamy.composer.importer.meta.impl.EntityMetaFactoryImpl; import org.jiemamy.composer.importer.meta.impl.EntityMetaReaderImpl; import org.jiemamy.composer.importer.meta.impl.PropertyMetaFactoryImpl; Deleted: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/BothMappedByAndJoinColumnException.java =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/BothMappedByAndJoinColumnException.java 2009-04-07 07:03:13 UTC (rev 3155) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/BothMappedByAndJoinColumnException.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -1,38 +0,0 @@ -/* - * Copyright 2007-2009 Jiemamy Project and the Others. - * Created on Apr 6, 2009 - * - * 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.composer.importer.meta; - -/** - * TODO for junichi - * - * @author junichi - */ -public class BothMappedByAndJoinColumnException extends Exception { - - /** - * インスタンスを生成する。 - * - * @param name - * @param name2 - */ - public BothMappedByAndJoinColumnException(String name, String name2) { - // TODO Auto-generated constructor stub - } - -} Added: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/CannotCreatePropertyException.java =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/CannotCreatePropertyException.java (rev 0) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/CannotCreatePropertyException.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -0,0 +1,38 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on Apr 7, 2009 + * + * 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.composer.importer.meta; + +/** + * プロパティを生成できなかった場合の例外クラス。 + * + * @author j5ik2o + */ + @ SuppressWarnings("serial") +public class CannotCreatePropertyException extends Exception { + + /** + * インスタンスを生成する。 + * + * @param t {@link Throwable} + */ + public CannotCreatePropertyException(Throwable t) { + super(t); + } + +} Property changes on: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/CannotCreatePropertyException.java ___________________________________________________________________ Added: svn:mime-type + text/plain Deleted: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/ColumnDuplicatedException.java =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/ColumnDuplicatedException.java 2009-04-07 07:03:13 UTC (rev 3155) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/ColumnDuplicatedException.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -1,41 +0,0 @@ -/* - * Copyright 2007-2009 Jiemamy Project and the Others. - * Created on Apr 5, 2009 - * - * 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.composer.importer.meta; - -/** - * カラムがだぶって生成された場合の例外クラス。 - * - * @author j5ik2o - */ - @ SuppressWarnings("serial") -public class ColumnDuplicatedException extends Exception { - - /** - * インスタンスを生成する。 - * - * @param entityName エンティティ名 - * @param propertyName オリジナルのプロパティ名 - * @param propertyName2 対象のプロパティ名 - * @param columnName カラム名 - */ - public ColumnDuplicatedException(String entityName, String propertyName, String propertyName2, String columnName) { - super(String.format("duplicated column %s %s %s %s", entityName, propertyName, propertyName2, columnName)); - } - -} Added: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/ColumnDuplicatedException.java =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/ColumnDuplicatedException.java (rev 0) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/ColumnDuplicatedException.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -0,0 +1,41 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on Apr 5, 2009 + * + * 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.composer.importer.meta; + +/** + * カラムがだぶって生成された場合の例外クラス。 + * + * @author j5ik2o + */ + @ SuppressWarnings("serial") +public class ColumnDuplicatedException extends Exception { + + /** + * インスタンスを生成する。 + * + * @param entityName エンティティ名 + * @param propertyName オリジナルのプロパティ名 + * @param propertyName2 対象のプロパティ名 + * @param columnName カラム名 + */ + public ColumnDuplicatedException(String entityName, String propertyName, String propertyName2, String columnName) { + super(String.format("duplicated column %s %s %s %s", entityName, propertyName, propertyName2, columnName)); + } + +} Copied: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/EntityClassNotFoundException.java (from rev 3150, charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/EntityClassNotFoundException.java) =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/EntityClassNotFoundException.java (rev 0) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/EntityClassNotFoundException.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -0,0 +1,64 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on Apr 4, 2009 + * + * 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.composer.importer.meta; + +/** + * エンティティクラスが見つからなかった場合の例外クラス。 + * + * @author j5ik2o + */ + @ SuppressWarnings("serial") +public class EntityClassNotFoundException extends Exception { + + /** + * インスタンスを生成する。 + */ + public EntityClassNotFoundException() { + super(); + } + + /** + * インスタンスを生成する。 + * + * @param message メッセージ + */ + public EntityClassNotFoundException(String message) { + super(message); + } + + /** + * インスタンスを生成する。 + * + * @param message メッセージ + * @param cause 原因 + */ + public EntityClassNotFoundException(String message, Throwable cause) { + super(message, cause); + } + + /** + * インスタンスを生成する。 + * + * @param cause 原因 + */ + public EntityClassNotFoundException(Throwable cause) { + super(cause); + } + +} Property changes on: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/EntityClassNotFoundException.java ___________________________________________________________________ Added: svn:mime-type + text/plain Modified: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/EntityMetaFactory.java =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/EntityMetaFactory.java 2009-04-07 07:03:13 UTC (rev 3155) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/EntityMetaFactory.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -18,7 +18,6 @@ */ package org.jiemamy.composer.importer.meta; -import org.jiemamy.composer.importer.meta.impl.NonEntityException; import org.jiemamy.utils.Disposable; /** Modified: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/EntityMetaReader.java =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/EntityMetaReader.java 2009-04-07 07:03:13 UTC (rev 3155) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/EntityMetaReader.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -21,7 +21,6 @@ import java.io.IOException; import java.util.List; -import org.jiemamy.composer.importer.meta.impl.EntityClassNotFoundException; /** * {@link EntityMeta エンティティメタデータ}を読み取るインタフェース。 Deleted: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/IdentityIdGenerator.java =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/IdentityIdGenerator.java 2009-04-07 07:03:13 UTC (rev 3155) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/IdentityIdGenerator.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -1,39 +0,0 @@ -/* - * Copyright 2007-2009 Jiemamy Project and the Others. - * Created on Apr 6, 2009 - * - * 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.composer.importer.meta; - - -/** - * TODO for junichi - * - * @author junichi - */ -public class IdentityIdGenerator { - - /** - * インスタンスを生成する。 - * - * @param entityMeta - * @param propertyMeta - */ - public IdentityIdGenerator(EntityMeta entityMeta, PropertyMeta propertyMeta) { - // TODO Auto-generated constructor stub - } - -} Deleted: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/MappedByMandatoryException.java =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/MappedByMandatoryException.java 2009-04-07 07:03:13 UTC (rev 3155) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/MappedByMandatoryException.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -1,38 +0,0 @@ -/* - * Copyright 2007-2009 Jiemamy Project and the Others. - * Created on Apr 6, 2009 - * - * 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.composer.importer.meta; - -/** - * TODO for junichi - * - * @author junichi - */ -public class MappedByMandatoryException extends Exception { - - /** - * インスタンスを生成する。 - * - * @param name - * @param name2 - */ - public MappedByMandatoryException(String name, String name2) { - // TODO Auto-generated constructor stub - } - -} Copied: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/NonEntityException.java (from rev 3150, charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/NonEntityException.java) =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/NonEntityException.java (rev 0) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/NonEntityException.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -0,0 +1,64 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on Apr 4, 2009 + * + * 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.composer.importer.meta; + +/** + * エンティティではない場合の例外クラス。 + * + * @author j5ik2o + */ + @ SuppressWarnings("serial") +public class NonEntityException extends Exception { + + /** + * インスタンスを生成する。 + */ + public NonEntityException() { + super(); + } + + /** + * インスタンスを生成する。 + * + * @param message メッセージ + */ + public NonEntityException(String message) { + super(message); + } + + /** + * インスタンスを生成する。 + * + * @param message メッセージ + * @param cause 原因 + */ + public NonEntityException(String message, Throwable cause) { + super(message, cause); + } + + /** + * インスタンスを生成する。 + * + * @param cause 原因 + */ + public NonEntityException(Throwable cause) { + super(cause); + } + +} Property changes on: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/NonEntityException.java ___________________________________________________________________ Added: svn:mime-type + text/plain Deleted: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/OneToManyNotGenericsException.java =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/OneToManyNotGenericsException.java 2009-04-07 07:03:13 UTC (rev 3155) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/OneToManyNotGenericsException.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -1,38 +0,0 @@ -/* - * Copyright 2007-2009 Jiemamy Project and the Others. - * Created on Apr 6, 2009 - * - * 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.composer.importer.meta; - -/** - * TODO for junichi - * - * @author junichi - */ -public class OneToManyNotGenericsException extends Exception { - - /** - * インスタンスを生成する。 - * - * @param name - * @param name2 - */ - public OneToManyNotGenericsException(String name, String name2) { - // TODO Auto-generated constructor stub - } - -} Deleted: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/PropertyDuplicatedException.java =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/PropertyDuplicatedException.java 2009-04-07 07:03:13 UTC (rev 3155) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/PropertyDuplicatedException.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -1,39 +0,0 @@ -/* - * Copyright 2007-2009 Jiemamy Project and the Others. - * Created on Apr 5, 2009 - * - * 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.composer.importer.meta; - -/** - * プロパティがだぶって生成された場合の例外クラス - * - * @author j5ik2o - */ - @ SuppressWarnings("serial") -public class PropertyDuplicatedException extends Exception { - - /** - * インスタンスを生成する。 - * - * @param name オリジナルのプロパティ名 - * @param name2 対象のプロパティ名 - */ - public PropertyDuplicatedException(String name, String name2) { - super(String.format("duplicated properties %s : %s", name, name2)); - } - -} Added: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/PropertyDuplicatedException.java =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/PropertyDuplicatedException.java (rev 0) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/PropertyDuplicatedException.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -0,0 +1,39 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on Apr 5, 2009 + * + * 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.composer.importer.meta; + +/** + * プロパティがだぶって生成された場合の例外クラス + * + * @author j5ik2o + */ + @ SuppressWarnings("serial") +public class PropertyDuplicatedException extends Exception { + + /** + * インスタンスを生成する。 + * + * @param name オリジナルのプロパティ名 + * @param name2 対象のプロパティ名 + */ + public PropertyDuplicatedException(String name, String name2) { + super(String.format("duplicated properties %s : %s", name, name2)); + } + +} Modified: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/PropertyMeta.java =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/PropertyMeta.java 2009-04-07 07:03:13 UTC (rev 3155) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/PropertyMeta.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -29,6 +29,10 @@ import org.apache.commons.lang.builder.ToStringBuilder; +import org.jiemamy.composer.importer.meta.generator.IdentityIdGenerator; +import org.jiemamy.composer.importer.meta.generator.SequenceIdGenerator; +import org.jiemamy.composer.importer.meta.generator.TableIdGenerator; + /** * JPA用のプロパティメタデータクラス。 * @@ -51,63 +55,46 @@ /** カラムメタデータ */ private ColumnMeta columnMeta; - /** - * IDを自動生成する方法です。 - */ + /** IDを自動生成する方法 */ private GenerationType generationType; - /** - * フェッチタイプです。 - */ + /** フェッチタイプ */ private FetchType fetchType; - /** - * 時制の種別です。 - */ + /** 時制の種別 */ private TemporalType temporalType; - /** - * enumの種別です。 - */ + /** enumの種別 */ private EnumType enumType; - /** - * バージョン用かどうかです。 - */ + /** バージョンフラグ */ private boolean version; - /** - * 一時的かどうかです。 - */ + /** 一時的フラグ*/ private boolean trnsient; - /** - * <code>LOB</code>かどうかです。 - */ + /** <code>LOB</code>フラグ */ private boolean lob; - /** - * 結合カラムメタデータのリストです。 - */ + /** 結合カラムメタデータのリスト */ private List<JoinColumnMeta> joinColumnMetaList = new ArrayList<JoinColumnMeta>(); - /** - * 関連タイプです。 - */ + /** 関連タイプ */ private RelationshipType relationshipType; - /** - * 関連の所有者側のプロパティ名です。 - */ + /** 関連の所有者側のプロパティ名 */ private String mappedBy; /** 関連クラス */ private Class<?> relationshipClass; + /** {@link SequenceIdGenerator} */ private SequenceIdGenerator sequenceIdGenerator; + /** {@link IdentityIdGenerator} */ private IdentityIdGenerator identityIdGenerator; + /** {@link TableIdGenerator} */ private TableIdGenerator tableIdGenerator; @@ -166,6 +153,15 @@ } /** + * {@link IdentityIdGenerator}を取得する。 + * + * @return {@link IdentityIdGenerator} + */ + public IdentityIdGenerator getIdentityIdGenerator() { + return identityIdGenerator; + } + + /** * {@JoinColumnMeta}のリストを取得する。 * * @return {@JoinColumnMeta}のリスト @@ -175,9 +171,9 @@ } /** - * TODO for junichi + * mappedBy属性を取得する。 * - * @return + * @return mappedBy属性 */ public String getMappedBy() { return mappedBy; @@ -202,28 +198,46 @@ } /** - * TODO for junichi + * 関連クラスを取得する。 * - * @return + * @return 関連クラス */ public Class<?> getRelationshipClass() { return relationshipClass; } /** - * TODO for junichi + * {@link RelationshipType}を取得する。 * - * @return + * @return {@link RelationshipType} */ public RelationshipType getRelationshipType() { return relationshipType; } /** - * TODO for junichi + * {@link SequenceIdGenerator}を取得する。 * - * @return + * @return {@link SequenceIdGenerator} */ + public SequenceIdGenerator getSequenceIdGenerator() { + return sequenceIdGenerator; + } + + /** + * {@link TableIdGenerator}を取得する。 + * + * @return {@link TableIdGenerator} + */ + public TableIdGenerator getTableIdGenerator() { + return tableIdGenerator; + } + + /** + * {@link TemporalType}を取得する。 + * + * @return {@link TemporalType} + */ public TemporalType getTemporalType() { return temporalType; } @@ -238,27 +252,27 @@ } /** - * TODO for junichi + * LOBフラグを取得する。 * - * @return + * @return LOBフラグ */ public boolean isLob() { return lob; } /** - * TODO for junichi + * <code>transient</code>フラグを取得する。 * - * @return + * @return <code>transient</code> */ public boolean isTransient() { return trnsient; } /** - * TODO for junichi + * バージョンフラグを取得する。 * - * @return + * @return バージョンフラグ */ public boolean isVersion() { return version; @@ -274,18 +288,18 @@ } /** - * TODO for junichi + * {@link EnumType}を設定する。 * - * @param enumType + * @param enumType {@link EnumType} */ public void setEnumType(EnumType enumType) { this.enumType = enumType; } /** - * TODO for junichi + * {@link FetchType}を設定する。 * - * @param fetchType + * @param fetchType {@link FetchType} */ public void setFetchType(FetchType fetchType) { this.fetchType = fetchType; @@ -300,6 +314,11 @@ this.field = field; } + /** + * {@link GenerationType}を設定する。 + * + * @param generationType {@link GenerationType} + */ public void setGenerationType(GenerationType generationType) { this.generationType = generationType; } @@ -314,31 +333,36 @@ } /** - * TODO for junichi + * {@link IdentityIdGenerator}を設定する。 * - * @param identityIdGenerator + * @param identityIdGenerator {@link IdentityIdGenerator} */ public void setIdentityIdGenerator(IdentityIdGenerator identityIdGenerator) { this.identityIdGenerator = identityIdGenerator; } - public void setJoinColumnMetaList(final List<JoinColumnMeta> joinColumnMetaList) { + /** + * ジョインカラムメタのリストを設定する。 + * + * @param joinColumnMetaList ジョインカラムメタのリスト + */ + public void setJoinColumnMetaList(List<JoinColumnMeta> joinColumnMetaList) { this.joinColumnMetaList = joinColumnMetaList; } /** - * TODO for junichi + * LOBフラグを設定する。 * - * @param lob + * @param lob LOBフラグ */ public void setLob(boolean lob) { this.lob = lob; } /** - * TODO for junichi + * mappedBy属性を設定する。 * - * @param mappedBy + * @param mappedBy mappedBy属性 */ public void setMappedBy(String mappedBy) { this.mappedBy = mappedBy; @@ -362,59 +386,64 @@ this.propertyClass = propertyClass; } + /** + * 関連クラスを設定する。 + * + * @param relationshipClass 関連クラス + */ public void setRelationshipClass(Class<?> relationshipClass) { this.relationshipClass = relationshipClass; } /** - * TODO for junichi + * {@link RelationshipType}を設定する。 * - * @param relationshipType + * @param relationshipType {@link RelationshipType} */ public void setRelationshipType(RelationshipType relationshipType) { this.relationshipType = relationshipType; } /** - * TODO for junichi + * {@link SequenceIdGenerator}を設定する。 * - * @param sequenceIdGenerator + * @param sequenceIdGenerator {@link SequenceIdGenerator} */ public void setSequenceIdGenerator(SequenceIdGenerator sequenceIdGenerator) { this.sequenceIdGenerator = sequenceIdGenerator; } /** - * TODO for junichi + * {@link TableIdGenerator}を設定する。 * - * @param tableIdGenerator + * @param tableIdGenerator {@link TableIdGenerator} */ public void setTableIdGenerator(TableIdGenerator tableIdGenerator) { this.tableIdGenerator = tableIdGenerator; } /** - * TODO for junichi + * {@link TemporalType}を設定する。 * - * @param temporalType + * @param temporalType {@link TemporalType} */ public void setTemporalType(TemporalType temporalType) { this.temporalType = temporalType; } /** - * TODO for junichi + * <code>transient</code>フラグを設定する。 * - * @param trnsient + * @param trnsient <code>transient</code>フラグ */ public void setTransient(boolean trnsient) { this.trnsient = trnsient; } /** - * TODO for junichi + * バージョンフラグを設定する。 * - * @param version + * @param version バージョンフラグ */ public void setVersion(boolean version) { this.version = version; Modified: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/PropertyMetaFactory.java =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/PropertyMetaFactory.java 2009-04-07 07:03:13 UTC (rev 3155) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/PropertyMetaFactory.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -33,7 +33,8 @@ * @param entityMeta {@link EntityMeta} * @param field 対象となるフィールド * @return {@link PropertyMeta} + * @throws CannotCreatePropertyException プロパティを生成できなかった場合 */ - PropertyMeta createPropertyMeta(EntityMeta entityMeta, Field field); + PropertyMeta createPropertyMeta(EntityMeta entityMeta, Field field) throws CannotCreatePropertyException; } Deleted: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/RelationshipNotEntityException.java =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/RelationshipNotEntityException.java 2009-04-07 07:03:13 UTC (rev 3155) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/RelationshipNotEntityException.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -1,39 +0,0 @@ -/* - * Copyright 2007-2009 Jiemamy Project and the Others. - * Created on Apr 6, 2009 - * - * 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.composer.importer.meta; - -/** - * TODO for junichi - * - * @author junichi - */ -public class RelationshipNotEntityException extends Exception { - - /** - * インスタンスを生成する。 - * - * @param name - * @param name2 - * @param relationshipClass - */ - public RelationshipNotEntityException(String name, String name2, Class<?> relationshipClass) { - // TODO Auto-generated constructor stub - } - -} Deleted: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/SequenceIdGenerator.java =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/SequenceIdGenerator.java 2009-04-07 07:03:13 UTC (rev 3155) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/SequenceIdGenerator.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -1,42 +0,0 @@ -/* - * Copyright 2007-2009 Jiemamy Project and the Others. - * Created on Apr 6, 2009 - * - * 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.composer.importer.meta; - -import javax.persistence.SequenceGenerator; - - -/** - * TODO for junichi - * - * @author junichi - */ -public class SequenceIdGenerator { - - /** - * インスタンスを生成する。 - * - * @param entityMeta - * @param propertyMeta - * @param sequenceGenerator - */ - public SequenceIdGenerator(EntityMeta entityMeta, PropertyMeta propertyMeta, SequenceGenerator sequenceGenerator) { - // TODO Auto-generated constructor stub - } - -} Deleted: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/TableIdGenerator.java =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/TableIdGenerator.java 2009-04-07 07:03:13 UTC (rev 3155) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/TableIdGenerator.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -1,41 +0,0 @@ -/* - * Copyright 2007-2009 Jiemamy Project and the Others. - * Created on Apr 6, 2009 - * - * 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.composer.importer.meta; - -import javax.persistence.TableGenerator; - -/** - * TODO for junichi - * - * @author junichi - */ -public class TableIdGenerator { - - /** - * インスタンスを生成する。 - * - * @param entityMeta - * @param propertyMeta - * @param tableGenerator - */ - public TableIdGenerator(EntityMeta entityMeta, PropertyMeta propertyMeta, TableGenerator tableGenerator) { - // TODO Auto-generated constructor stub - } - -} Deleted: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/UnsupportedPropertyTypesException.java =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/UnsupportedPropertyTypesException.java 2009-04-07 07:03:13 UTC (rev 3155) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/UnsupportedPropertyTypesException.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -1,39 +0,0 @@ -/* - * Copyright 2007-2009 Jiemamy Project and the Others. - * Created on Apr 6, 2009 - * - * 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.composer.importer.meta; - -/** - * TODO for junichi - * - * @author junichi - */ -public class UnsupportedPropertyTypesException extends Exception { - - /** - * インスタンスを生成する。 - * - * @param name - * @param name2 - * @param propertyClass - */ - public UnsupportedPropertyTypesException(String name, String name2, Class<?> propertyClass) { - // TODO Auto-generated constructor stub - } - -} Copied: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/BothMappedByAndJoinColumnException.java (from rev 3151, charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/BothMappedByAndJoinColumnException.java) =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/BothMappedByAndJoinColumnException.java (rev 0) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/BothMappedByAndJoinColumnException.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -0,0 +1,38 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on Apr 6, 2009 + * + * 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.composer.importer.meta.exception; + +/** + * TODO for junichi + * + * @author junichi + */ +public class BothMappedByAndJoinColumnException extends Exception { + + /** + * インスタンスを生成する。 + * + * @param name + * @param name2 + */ + public BothMappedByAndJoinColumnException(String name, String name2) { + // TODO Auto-generated constructor stub + } + +} Property changes on: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/BothMappedByAndJoinColumnException.java ___________________________________________________________________ Added: svn:mime-type + text/plain Copied: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/FieldDuplicatedException.java (from rev 3150, charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/FieldDuplicatedException.java) =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/FieldDuplicatedException.java (rev 0) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/FieldDuplicatedException.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -0,0 +1,40 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on Apr 6, 2009 + * + * 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.composer.importer.meta.exception; + +import java.lang.reflect.Field; + +/** + * フィールドがだぶって生成された場合の例外クラス。 + * + * @author j5ik2o + */ + @ SuppressWarnings("serial") +public class FieldDuplicatedException extends Exception { + + /** + * インスタンスを生成する。 + * + * @param field 対象のフィールド + */ + public FieldDuplicatedException(Field field) { + super(String.format("duplicated field %s", field.getName())); + } + +} Property changes on: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/FieldDuplicatedException.java ___________________________________________________________________ Added: svn:mime-type + text/plain Copied: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/IdGeneratorNotFoundException.java (from rev 3151, charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/IdGeneratorNotFoundException.java) =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/IdGeneratorNotFoundException.java (rev 0) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/IdGeneratorNotFoundException.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -0,0 +1,39 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on Apr 6, 2009 + * + * 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.composer.importer.meta.exception; + +/** + * TODO for junichi + * + * @author junichi + */ +public class IdGeneratorNotFoundException extends Exception { + + /** + * インスタンスを生成する。 + * + * @param name + * @param name2 + * @param generator + */ + public IdGeneratorNotFoundException(String name, String name2, String generator) { + // TODO Auto-generated constructor stub + } + +} Property changes on: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/IdGeneratorNotFoundException.java ___________________________________________________________________ Added: svn:mime-type + text/plain Copied: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/JoinColumnNameAndReferencedColumnNameMandatoryException.java (from rev 3151, charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/JoinColumnNameAndReferencedColumnNameMandatoryException.java) =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/JoinColumnNameAndReferencedColumnNameMandatoryException.java (rev 0) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/JoinColumnNameAndReferencedColumnNameMandatoryException.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -0,0 +1,39 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on Apr 6, 2009 + * + * 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.composer.importer.meta.exception; + +/** + * TODO for junichi + * + * @author junichi + */ +public class JoinColumnNameAndReferencedColumnNameMandatoryException extends Exception { + + /** + * インスタンスを生成する。 + * + * @param name + * @param name2 + * @param i + */ + public JoinColumnNameAndReferencedColumnNameMandatoryException(String name, String name2, int i) { + // TODO Auto-generated constructor stub + } + +} Property changes on: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/JoinColumnNameAndReferencedColumnNameMandatoryException.java ___________________________________________________________________ Added: svn:mime-type + text/plain Copied: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/LazyFetchSpecifiedException.java (from rev 3151, charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/LazyFetchSpecifiedException.java) =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/LazyFetchSpecifiedException.java (rev 0) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/LazyFetchSpecifiedException.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -0,0 +1,38 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on Apr 6, 2009 + * + * 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.composer.importer.meta.exception; + +/** + * TODO for junichi + * + * @author junichi + */ +public class LazyFetchSpecifiedException extends Exception { + + /** + * インスタンスを生成する。 + * + * @param name + * @param name2 + */ + public LazyFetchSpecifiedException(String name, String name2) { + // TODO Auto-generated constructor stub + } + +} Property changes on: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/LazyFetchSpecifiedException.java ___________________________________________________________________ Added: svn:mime-type + text/plain Copied: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/MappedByMandatoryException.java (from rev 3151, charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/MappedByMandatoryException.java) =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/MappedByMandatoryException.java (rev 0) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/MappedByMandatoryException.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -0,0 +1,38 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on Apr 6, 2009 + * + * 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.composer.importer.meta.exception; + +/** + * TODO for junichi + * + * @author junichi + */ +public class MappedByMandatoryException extends Exception { + + /** + * インスタンスを生成する。 + * + * @param name + * @param name2 + */ + public MappedByMandatoryException(String name, String name2) { + // TODO Auto-generated constructor stub + } + +} Property changes on: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/MappedByMandatoryException.java ___________________________________________________________________ Added: svn:mime-type + text/plain Copied: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/OneToManyNotGenericsException.java (from rev 3151, charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/OneToManyNotGenericsException.java) =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/OneToManyNotGenericsException.java (rev 0) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/OneToManyNotGenericsException.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -0,0 +1,38 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on Apr 6, 2009 + * + * 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.composer.importer.meta.exception; + +/** + * TODO for junichi + * + * @author junichi + */ +public class OneToManyNotGenericsException extends Exception { + + /** + * インスタンスを生成する。 + * + * @param name + * @param name2 + */ + public OneToManyNotGenericsException(String name, String name2) { + // TODO Auto-generated constructor stub + } + +} Property changes on: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/OneToManyNotGenericsException.java ___________________________________________________________________ Added: svn:mime-type + text/plain Copied: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/OneToManyNotListException.java (from rev 3151, charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/OneToManyNotListException.java) =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/OneToManyNotListException.java (rev 0) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/OneToManyNotListException.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -0,0 +1,38 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on Apr 6, 2009 + * + * 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.composer.importer.meta.exception; + +/** + * TODO for junichi + * + * @author junichi + */ +public class OneToManyNotListException extends Exception { + + /** + * インスタンスを生成する。 + * + * @param name + * @param name2 + */ + public OneToManyNotListException(String name, String name2) { + // TODO Auto-generated constructor stub + } + +} Property changes on: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/OneToManyNotListException.java ___________________________________________________________________ Added: svn:mime-type + text/plain Copied: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/RelationshipNotEntityException.java (from rev 3151, charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/RelationshipNotEntityException.java) =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/RelationshipNotEntityException.java (rev 0) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/RelationshipNotEntityException.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -0,0 +1,39 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on Apr 6, 2009 + * + * 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.composer.importer.meta.exception; + +/** + * TODO for junichi + * + * @author junichi + */ +public class RelationshipNotEntityException extends Exception { + + /** + * インスタンスを生成する。 + * + * @param name + * @param name2 + * @param relationshipClass + */ + public RelationshipNotEntityException(String name, String name2, Class<?> relationshipClass) { + // TODO Auto-generated constructor stub + } + +} Property changes on: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/RelationshipNotEntityException.java ___________________________________________________________________ Added: svn:mime-type + text/plain Copied: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/TemporalTypeNotSpecifiedException.java (from rev 3151, charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/TemporalTypeNotSpecifiedException.java) =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/TemporalTypeNotSpecifiedException.java (rev 0) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/TemporalTypeNotSpecifiedException.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -0,0 +1,38 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on Apr 6, 2009 + * + * 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.composer.importer.meta.exception; + +/** + * TODO for junichi + * + * @author junichi + */ +public class TemporalTypeNotSpecifiedException extends Exception { + + /** + * インスタンスを生成する。 + * + * @param name + * @param name2 + */ + public TemporalTypeNotSpecifiedException(String name, String name2) { + // TODO Auto-generated constructor stub + } + +} Property changes on: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/TemporalTypeNotSpecifiedException.java ___________________________________________________________________ Added: svn:mime-type + text/plain Copied: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/UnsupportedInheritanceException.java (from rev 3150, charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/UnsupportedInheritanceException.java) =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/UnsupportedInheritanceException.java (rev 0) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/UnsupportedInheritanceException.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -0,0 +1,38 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on Apr 6, 2009 + * + * 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.composer.importer.meta.exception; + +/** + * TODO for junichi + * + * @author junichi + */ + @ SuppressWarnings("serial") +public class UnsupportedInheritanceException extends Exception { + + /** + * インスタンスを生成する。 + * + * @param entityClass + */ + public UnsupportedInheritanceException(Class<?> entityClass) { + // TODO Auto-generated constructor stub + } + +} Property changes on: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/UnsupportedInheritanceException.java ___________________________________________________________________ Added: svn:mime-type + text/plain Copied: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/UnsupportedPropertyTypesException.java (from rev 3151, charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/UnsupportedPropertyTypesException.java) =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/UnsupportedPropertyTypesException.java (rev 0) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/UnsupportedPropertyTypesException.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -0,0 +1,39 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on Apr 6, 2009 + * + * 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.composer.importer.meta.exception; + +/** + * TODO for junichi + * + * @author junichi + */ +public class UnsupportedPropertyTypesException extends Exception { + + /** + * インスタンスを生成する。 + * + * @param name + * @param name2 + * @param propertyClass + */ + public UnsupportedPropertyTypesException(String name, String name2, Class<?> propertyClass) { + // TODO Auto-generated constructor stub + } + +} Property changes on: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/UnsupportedPropertyTypesException.java ___________________________________________________________________ Added: svn:mime-type + text/plain Copied: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/UnsupportedRelationshipException.java (from rev 3151, charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/UnsupportedRelationshipException.java) =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/UnsupportedRelationshipException.java (rev 0) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/UnsupportedRelationshipException.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -0,0 +1,38 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on Apr 6, 2009 + * + * 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.composer.importer.meta.exception; + +/** + * TODO for junichi + * + * @author junichi + */ +public class UnsupportedRelationshipException extends Exception { + + /** + * インスタンスを生成する。 + * + * @param name + * @param name2 + */ + public UnsupportedRelationshipException(String name, String name2) { + // TODO Auto-generated constructor stub + } + +} Property changes on: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/UnsupportedRelationshipException.java ___________________________________________________________________ Added: svn:mime-type + text/plain Copied: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/VersionPropertyNotNumberException.java (from rev 3151, charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/VersionPropertyNotNumberException.java) =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/VersionPropertyNotNumberException.java (rev 0) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/VersionPropertyNotNumberException.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -0,0 +1,38 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on Apr 6, 2009 + * + * 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.composer.importer.meta.exception; + +/** + * TODO for junichi + * + * @author junichi + */ +public class VersionPropertyNotNumberException extends Exception { + + /** + * インスタンスを生成する。 + * + * @param name + * @param name2 + */ + public VersionPropertyNotNumberException(String name, String name2) { + // TODO Auto-generated constructor stub + } + +} Property changes on: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/exception/VersionPropertyNotNumberException.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/generator/AbstractIdGenerator.java =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/generator/AbstractIdGenerator.java (rev 0) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/generator/AbstractIdGenerator.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -0,0 +1,65 @@ +/* + * Copyright 2004-2009 the Seasar Foundation and the Others. + * + * 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.composer.importer.meta.generator; + +import org.jiemamy.composer.importer.meta.EntityMeta; +import org.jiemamy.composer.importer.meta.PropertyMeta; + +/** + * 識別子を自動生成するIDジェネレータの抽象クラス。 + * + * @author j5ik2o + */ +public abstract class AbstractIdGenerator implements IdGenerator { + + /** エンティティメタデータ */ + private EntityMeta entityMeta; + + /** プロパティメタデータ */ + private PropertyMeta propertyMeta; + + + /** + * インスタンスを構築します。 + * + * @param entityMeta エンティティメタデータ + * @param propertyMeta プロパティメタデータ + */ + public AbstractIdGenerator(final EntityMeta entityMeta, final PropertyMeta propertyMeta) { + super(); + this.entityMeta = entityMeta; + this.propertyMeta = propertyMeta; + } + + /** + * {@link EntityMeta}を取得する。 + * + * @return {@link EntityMeta} + */ + public EntityMeta getEntityMeta() { + return entityMeta; + } + + /** + * {@link PropertyMeta}を取得する。 + * + * @return {@link PropertyMeta} + */ + public PropertyMeta getPropertyMeta() { + return propertyMeta; + } + +} Property changes on: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/generator/AbstractIdGenerator.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/generator/AbstractPreAllocateIdGenerator.java =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/generator/AbstractPreAllocateIdGenerator.java (rev 0) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/generator/AbstractPreAllocateIdGenerator.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -0,0 +1,82 @@ +/* + * Copyright 2004-2009 the Seasar Foundation and the Others. + * + * 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.composer.importer.meta.generator; + +import org.jiemamy.composer.importer.meta.EntityMeta; +import org.jiemamy.composer.importer.meta.PropertyMeta; + +/** + * INSERT前に識別子を自動生成するIDジェネレータの抽象クラスです。 + * + * @author j5ik2o + */ +public abstract class AbstractPreAllocateIdGenerator extends AbstractIdGenerator { + + /** 割り当てサイズ */ + private long allocationSize; + + /** 名前 */ + private String name; + + /** 初期値 */ + private long initialValue; + + + /** + * インスタンスを構築します。 + * + * @param entityMeta エンティティメタデータ + * @param propertyMeta プロパティメタデータ + * @param name ジェネレータ名 + * @param initialValue 初期値 + * @param allocationSize 割り当てサイズ + */ + public AbstractPreAllocateIdGenerator(final EntityMeta entityMeta, final PropertyMeta propertyMeta, String name, + long initialValue, long allocationSize) { + super(entityMeta, propertyMeta); + this.name = name; + this.initialValue = initialValue; + this.allocationSize = allocationSize; + } + + /** + * 割り当てサイズを取得する。 + * + * @return 割り当てサイズ + */ + public long getAllocationSize() { + return allocationSize; + } + + /** + * シーケンスの初期値を取得する。 + * + * @return シーケンスの初期値 + */ + public long getInitialValue() { + return initialValue; + } + + /** + * ジェネレータ名を取得する。 + * + * @return ジェネレータ名 + */ + public String getName() { + return name; + } + +} Property changes on: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/generator/AbstractPreAllocateIdGenerator.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/generator/IdGenerator.java =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/generator/IdGenerator.java (rev 0) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/generator/IdGenerator.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -0,0 +1,25 @@ +/* + * Copyright 2004-2009 the Seasar Foundation and the Others. + * + * 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.composer.importer.meta.generator; + +/** + * 識別子を自動生成するIDジェネレータのインターフェースです。 + * + * @author koichik + */ +public interface IdGenerator { + +} Property changes on: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/generator/IdGenerator.java ___________________________________________________________________ Added: svn:mime-type + text/plain Copied: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/generator/IdentityIdGenerator.java (from rev 3151, charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/IdentityIdGenerator.java) =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/generator/IdentityIdGenerator.java (rev 0) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/generator/IdentityIdGenerator.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -0,0 +1,41 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on Apr 6, 2009 + * + * 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.composer.importer.meta.generator; + +import org.jiemamy.composer.importer.meta.EntityMeta; +import org.jiemamy.composer.importer.meta.PropertyMeta; + +/** + * {@link IdentityGenerator}のメタ情報を保持するクラス。 + * + * @author j5ik2o + */ +public class IdentityIdGenerator extends AbstractIdGenerator { + + /** + * インスタンスを生成する。 + * + * @param entityMeta {@link EntityMeta} + * @param propertyMeta {@link PropertyMeta} + */ + public IdentityIdGenerator(EntityMeta entityMeta, PropertyMeta propertyMeta) { + super(entityMeta, propertyMeta); + } + +} Property changes on: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/generator/IdentityIdGenerator.java ___________________________________________________________________ Added: svn:mime-type + text/plain Copied: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/generator/SequenceIdGenerator.java (from rev 3151, charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/SequenceIdGenerator.java) =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/generator/SequenceIdGenerator.java (rev 0) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/generator/SequenceIdGenerator.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -0,0 +1,56 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on Apr 6, 2009 + * + * 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.composer.importer.meta.generator; + +import javax.persistence.SequenceGenerator; + +import org.jiemamy.composer.importer.meta.EntityMeta; +import org.jiemamy.composer.importer.meta.PropertyMeta; + +/** + * TODO for junichi + * + * @author junichi + */ +public class SequenceIdGenerator extends AbstractPreAllocateIdGenerator { + + private String sequenceName; + + + /** + * インスタンスを生成する。 + * + * @param entityMeta {@link EntityMeta} + * @param propertyMeta {@link PropertyMeta} + * @param sequenceGenerator {@link SequenceGenerator} + */ + public SequenceIdGenerator(EntityMeta entityMeta, PropertyMeta propertyMeta, SequenceGenerator sequenceGenerator) { + super(entityMeta, propertyMeta, sequenceGenerator.name(), sequenceGenerator.initialValue(), sequenceGenerator + .allocationSize()); + } + + /** + * シーケンス名を取得する。 + * + * @return シーケンス名 + */ + public String getSequenceName() { + return sequenceName; + } +} Property changes on: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/generator/SequenceIdGenerator.java ___________________________________________________________________ Added: svn:mime-type + text/plain Copied: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/generator/TableIdGenerator.java (from rev 3151, charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/TableIdGenerator.java) =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/generator/TableIdGenerator.java (rev 0) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/generator/TableIdGenerator.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -0,0 +1,117 @@ +/* + * Copyright 2007-2009 Jiemamy Project and the Others. + * Created on Apr 6, 2009 + * + * 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.composer.importer.meta.generator; + +import javax.persistence.TableGenerator; + +import org.jiemamy.composer.importer.meta.EntityMeta; +import org.jiemamy.composer.importer.meta.PropertyMeta; + +/** + * {@link TableGenerator}のメタデータを保持するクラス。 + * + * @author j5ik2o + */ +public class TableIdGenerator extends AbstractPreAllocateIdGenerator { + + private String catalogName; + + private String pkColumnName; + + private String pkColumnValue; + + private String valueColumnName; + + private String schemaName; + + private String tableName; + + + /** + * インスタンスを生成する。 + * + * @param entityMeta {@link EntityMeta} + * @param propertyMeta {@link PropertyMeta} + * @param tableGenerator {@link TableGenerator} + */ + public TableIdGenerator(EntityMeta entityMeta, PropertyMeta propertyMeta, TableGenerator tableGenerator) { + super(entityMeta, propertyMeta, tableGenerator.name(), tableGenerator.initialValue(), tableGenerator + .allocationSize()); + catalogName = tableGenerator.catalog(); + pkColumnName = tableGenerator.pkColumnName(); + pkColumnValue = tableGenerator.pkColumnValue(); + schemaName = tableGenerator.schema(); + tableName = tableGenerator.table(); + } + + /** + * 採番テーブルのカタログ名を取得する。 + * + * @return 採番テーブルのカタログ名 + */ + public String getCatalogName() { + return catalogName; + } + + /** + * 採番テーブルのカラム名を取得する。 + * + * @return 採番テーブルのカラム名 + */ + public String getPkColumnName() { + return pkColumnName; + } + + /** + * 採番テーブルの識別子の値を取得する。 + * + * @return 採番テーブルの識別子の値 + */ + public String getPkColumnValue() { + return pkColumnValue; + } + + /** + * 採番テーブルの識別子の値を取得する。 + * + * @return 採番テーブルの識別子の値 + */ + public String getSchemaName() { + return schemaName; + } + + /** + * 採番テーブル名を取得する。 + * + * @return 採番テーブル名 + */ + public String getTableName() { + return tableName; + } + + /** + * 採番テーブルの値のカラム名を取得する。 + * + * @return 採番テーブルの値のカラム名 + */ + public String getValueColumnName() { + return valueColumnName; + } + +} Property changes on: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/generator/TableIdGenerator.java ___________________________________________________________________ Added: svn:mime-type + text/plain Modified: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/ColumnMetaFactoryImpl.java =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/ColumnMetaFactoryImpl.java 2009-04-07 07:03:13 UTC (rev 3155) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/ColumnMetaFactoryImpl.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -20,22 +20,43 @@ import java.lang.reflect.Field; +import javax.persistence.Column; + +import org.apache.commons.lang.StringUtils; + import org.jiemamy.composer.importer.meta.ColumnMeta; import org.jiemamy.composer.importer.meta.ColumnMetaFactory; import org.jiemamy.composer.importer.meta.EntityMeta; import org.jiemamy.composer.importer.meta.PropertyMeta; +import org.jiemamy.utils.JmStringUtil; - /** - * TODO for junichi + * {@link ColumnMetaFactory}の実装クラス。 * - * @author junichi + * @author j5ik2o */ public class ColumnMetaFactoryImpl implements ColumnMetaFactory { public ColumnMeta createColumnMeta(Field field, EntityMeta entityMeta, PropertyMeta propertyMeta) { - // TODO Auto-generated method stub - return null; + ColumnMeta columnMeta = new ColumnMeta(); + String defaultName = fromPropertyNameToColumnName(propertyMeta.getName()); + Column column = field.getAnnotation(Column.class); + if (column != null) { + String name = column.name(); + if (StringUtils.isEmpty(name)) { + name = defaultName; + } + columnMeta.setName(name); + columnMeta.setInsertable(column.insertable()); + columnMeta.setUpdatable(column.updatable()); + } else { + columnMeta.setName(defaultName); + } + return columnMeta; } + private String fromPropertyNameToColumnName(String name) { + return JmStringUtil.toSQLName(name); + } + } Deleted: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/EntityClassNotFoundException.java =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/EntityClassNotFoundException.java 2009-04-07 07:03:13 UTC (rev 3155) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/EntityClassNotFoundException.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -1,64 +0,0 @@ -/* - * Copyright 2007-2009 Jiemamy Project and the Others. - * Created on Apr 4, 2009 - * - * 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.composer.importer.meta.impl; - -/** - * エンティティクラスが見つからなかった場合の例外クラス。 - * - * @author j5ik2o - */ - @ SuppressWarnings("serial") -public class EntityClassNotFoundException extends Exception { - - /** - * インスタンスを生成する。 - */ - public EntityClassNotFoundException() { - super(); - } - - /** - * インスタンスを生成する。 - * - * @param message メッセージ - */ - public EntityClassNotFoundException(String message) { - super(message); - } - - /** - * インスタンスを生成する。 - * - * @param message メッセージ - * @param cause 原因 - */ - public EntityClassNotFoundException(String message, Throwable cause) { - super(message, cause); - } - - /** - * インスタンスを生成する。 - * - * @param cause 原因 - */ - public EntityClassNotFoundException(Throwable cause) { - super(cause); - } - -} Modified: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/EntityMetaFactoryImpl.java =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/EntityMetaFactoryImpl.java 2009-04-07 07:03:13 UTC (rev 3155) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/EntityMetaFactoryImpl.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -31,15 +31,20 @@ import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.Validate; +import org.jiemamy.composer.importer.meta.CannotCreatePropertyException; import org.jiemamy.composer.importer.meta.ColumnDuplicatedException; import org.jiemamy.composer.importer.meta.EntityMeta; import org.jiemamy.composer.importer.meta.EntityMetaFactory; +import org.jiemamy.composer.importer.meta.NonEntityException; import org.jiemamy.composer.importer.meta.PropertyDuplicatedException; import org.jiemamy.composer.importer.meta.PropertyMetaFactory; import org.jiemamy.composer.importer.meta.TableMeta; import org.jiemamy.composer.importer.meta.TableMetaFactory; +import org.jiemamy.composer.importer.meta.exception.FieldDuplicatedException; +import org.jiemamy.composer.importer.meta.exception.UnsupportedInheritanceException; import org.jiemamy.utils.ClassUtil; import org.jiemamy.utils.CollectionsUtil; +import org.jiemamy.utils.JmStringUtil; import org.jiemamy.utils.ModifierUtil; /** @@ -107,20 +112,9 @@ doTableMeta(entityMeta); try { doPropertyMeta(entityMeta); - } catch (ColumnDuplicatedException e) { + } catch (Exception e) { throw new NonEntityException(e); - } catch (PropertyDuplicatedException e) { - throw new NonEntityException(e); - } catch (NotFoundException e) { - throw new NonEntityException(e); - } catch (NoSuchFieldException e) { - throw new NonEntityException(e); - } catch (UnsupportedInheritanceException e) { - throw new NonEntityException(e); - } catch (FieldDuplicatedException e) { - throw new NonEntityException(e); } - //doCustomize(entityMeta); return entityMeta; } @@ -136,13 +130,14 @@ private void doName(EntityMeta entityMeta, Entity entityAnnotation) { String entityName = entityAnnotation.name(); if (StringUtils.isEmpty(entityName)) { - entityName = StringUtils.uncapitalize(entityMeta.getEntityClass().getSimpleName()); + entityName = JmStringUtil.toUnCapital(entityMeta.getEntityClass().getSimpleName()); } entityMeta.setName(entityName); } private void doPropertyMeta(EntityMeta entityMeta) throws ColumnDuplicatedException, PropertyDuplicatedException, - NotFoundException, NoSuchFieldException, UnsupportedInheritanceException, FieldDuplicatedException { + NotFoundException, NoSuchFieldException, UnsupportedInheritanceException, FieldDuplicatedException, + CannotCreatePropertyException { Field[] fields = getFields(entityMeta.getEntityClass()); for (Field f : fields) { f.setAccessible(true); Modified: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/EntityMetaReaderImpl.java =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/EntityMetaReaderImpl.java 2009-04-07 07:03:13 UTC (rev 3155) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/EntityMetaReaderImpl.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -32,10 +32,12 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.jiemamy.composer.importer.meta.EntityClassNotFoundException; import org.jiemamy.composer.importer.meta.EntityMeta; import org.jiemamy.composer.importer.meta.EntityMetaFactory; import org.jiemamy.composer.importer.meta.EntityMetaReader; import org.jiemamy.composer.importer.meta.EntityMetaReaderContext; +import org.jiemamy.composer.importer.meta.NonEntityException; import org.jiemamy.utils.ClassLoaderUtil; import org.jiemamy.utils.ClassTraversal; import org.jiemamy.utils.ClassUtil; @@ -111,6 +113,7 @@ } catch (ClassNotFoundException e) { throw new TraversalHandlerException(e); } catch (NonEntityException e) { + LOG.debug("", e); throw new TraversalHandlerException(e); } } Deleted: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/FieldDuplicatedException.java =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/FieldDuplicatedException.java 2009-04-07 07:03:13 UTC (rev 3155) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/FieldDuplicatedException.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -1,40 +0,0 @@ -/* - * Copyright 2007-2009 Jiemamy Project and the Others. - * Created on Apr 6, 2009 - * - * 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.composer.importer.meta.impl; - -import java.lang.reflect.Field; - -/** - * フィールドがだぶって生成された場合の例外クラス。 - * - * @author j5ik2o - */ - @ SuppressWarnings("serial") -public class FieldDuplicatedException extends Exception { - - /** - * インスタンスを生成する。 - * - * @param field 対象のフィールド - */ - public FieldDuplicatedException(Field field) { - super(String.format("duplicated field %s", field.getName())); - } - -} Deleted: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/IdGeneratorNotFoundException.java =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/IdGeneratorNotFoundException.java 2009-04-07 07:03:13 UTC (rev 3155) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/IdGeneratorNotFoundException.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -1,39 +0,0 @@ -/* - * Copyright 2007-2009 Jiemamy Project and the Others. - * Created on Apr 6, 2009 - * - * 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.composer.importer.meta.impl; - -/** - * TODO for junichi - * - * @author junichi - */ -public class IdGeneratorNotFoundException extends Exception { - - /** - * インスタンスを生成する。 - * - * @param name - * @param name2 - * @param generator - */ - public IdGeneratorNotFoundException(String name, String name2, String generator) { - // TODO Auto-generated constructor stub - } - -} Deleted: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/JoinColumnNameAndReferencedColumnNameMandatoryException.java =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/JoinColumnNameAndReferencedColumnNameMandatoryException.java 2009-04-07 07:03:13 UTC (rev 3155) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/JoinColumnNameAndReferencedColumnNameMandatoryException.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -1,39 +0,0 @@ -/* - * Copyright 2007-2009 Jiemamy Project and the Others. - * Created on Apr 6, 2009 - * - * 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.composer.importer.meta.impl; - -/** - * TODO for junichi - * - * @author junichi - */ -public class JoinColumnNameAndReferencedColumnNameMandatoryException extends Exception { - - /** - * インスタンスを生成する。 - * - * @param name - * @param name2 - * @param i - */ - public JoinColumnNameAndReferencedColumnNameMandatoryException(String name, String name2, int i) { - // TODO Auto-generated constructor stub - } - -} Deleted: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/LazyFetchSpecifiedException.java =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/LazyFetchSpecifiedException.java 2009-04-07 07:03:13 UTC (rev 3155) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/LazyFetchSpecifiedException.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -1,38 +0,0 @@ -/* - * Copyright 2007-2009 Jiemamy Project and the Others. - * Created on Apr 6, 2009 - * - * 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.composer.importer.meta.impl; - -/** - * TODO for junichi - * - * @author junichi - */ -public class LazyFetchSpecifiedException extends Exception { - - /** - * インスタンスを生成する。 - * - * @param name - * @param name2 - */ - public LazyFetchSpecifiedException(String name, String name2) { - // TODO Auto-generated constructor stub - } - -} Deleted: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/NonEntityException.java =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/NonEntityException.java 2009-04-07 07:03:13 UTC (rev 3155) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/NonEntityException.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -1,64 +0,0 @@ -/* - * Copyright 2007-2009 Jiemamy Project and the Others. - * Created on Apr 4, 2009 - * - * 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.composer.importer.meta.impl; - -/** - * エンティティではない場合の例外クラス。 - * - * @author j5ik2o - */ - @ SuppressWarnings("serial") -public class NonEntityException extends Exception { - - /** - * インスタンスを生成する。 - */ - public NonEntityException() { - super(); - } - - /** - * インスタンスを生成する。 - * - * @param message メッセージ - */ - public NonEntityException(String message) { - super(message); - } - - /** - * インスタンスを生成する。 - * - * @param message メッセージ - * @param cause 原因 - */ - public NonEntityException(String message, Throwable cause) { - super(message, cause); - } - - /** - * インスタンスを生成する。 - * - * @param cause 原因 - */ - public NonEntityException(Throwable cause) { - super(cause); - } - -} Deleted: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/OneToManyNotListException.java =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/OneToManyNotListException.java 2009-04-07 07:03:13 UTC (rev 3155) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/OneToManyNotListException.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -1,38 +0,0 @@ -/* - * Copyright 2007-2009 Jiemamy Project and the Others. - * Created on Apr 6, 2009 - * - * 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.composer.importer.meta.impl; - -/** - * TODO for junichi - * - * @author junichi - */ -public class OneToManyNotListException extends Exception { - - /** - * インスタンスを生成する。 - * - * @param name - * @param name2 - */ - public OneToManyNotListException(String name, String name2) { - // TODO Auto-generated constructor stub - } - -} Modified: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/PropertyMetaFactoryImpl.java =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/PropertyMetaFactoryImpl.java 2009-04-07 07:03:13 UTC (rev 3155) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/PropertyMetaFactoryImpl.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -45,20 +45,27 @@ import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.Validate; -import org.jiemamy.composer.importer.meta.BothMappedByAndJoinColumnException; +import org.jiemamy.composer.importer.meta.CannotCreatePropertyException; import org.jiemamy.composer.importer.meta.ColumnMetaFactory; import org.jiemamy.composer.importer.meta.EntityMeta; -import org.jiemamy.composer.importer.meta.IdentityIdGenerator; import org.jiemamy.composer.importer.meta.JoinColumnMeta; -import org.jiemamy.composer.importer.meta.MappedByMandatoryException; -import org.jiemamy.composer.importer.meta.OneToManyNotGenericsException; import org.jiemamy.composer.importer.meta.PropertyMeta; import org.jiemamy.composer.importer.meta.PropertyMetaFactory; -import org.jiemamy.composer.importer.meta.RelationshipNotEntityException; import org.jiemamy.composer.importer.meta.RelationshipType; -import org.jiemamy.composer.importer.meta.SequenceIdGenerator; -import org.jiemamy.composer.importer.meta.TableIdGenerator; -import org.jiemamy.composer.importer.meta.UnsupportedPropertyTypesException; +import org.jiemamy.composer.importer.meta.exception.BothMappedByAndJoinColumnException; +import org.jiemamy.composer.importer.meta.exception.IdGeneratorNotFoundException; +import org.jiemamy.composer.importer.meta.exception.JoinColumnNameAndReferencedColumnNameMandatoryException; +import org.jiemamy.composer.importer.meta.exception.LazyFetchSpecifiedException; +import org.jiemamy.composer.importer.meta.exception.MappedByMandatoryException; +import org.jiemamy.composer.importer.meta.exception.OneToManyNotGenericsException; +import org.jiemamy.composer.importer.meta.exception.OneToManyNotListException; +import org.jiemamy.composer.importer.meta.exception.RelationshipNotEntityException; +import org.jiemamy.composer.importer.meta.exception.TemporalTypeNotSpecifiedException; +import org.jiemamy.composer.importer.meta.exception.UnsupportedRelationshipException; +import org.jiemamy.composer.importer.meta.exception.VersionPropertyNotNumberException; +import org.jiemamy.composer.importer.meta.generator.IdentityIdGenerator; +import org.jiemamy.composer.importer.meta.generator.SequenceIdGenerator; +import org.jiemamy.composer.importer.meta.generator.TableIdGenerator; import org.jiemamy.utils.ClassUtil; import org.jiemamy.utils.ModifierUtil; import org.jiemamy.utils.ReflectionUtil; @@ -91,7 +98,9 @@ this.columnMetaFactory = columnMetaFactory; } - public PropertyMeta createPropertyMeta(EntityMeta entityMeta, Field field) { + public PropertyMeta createPropertyMeta(EntityMeta entityMeta, Field field) throws CannotCreatePropertyException { + Validate.notNull(field); + Validate.notNull(entityMeta); PropertyMeta propertyMeta = new PropertyMeta(); doField(propertyMeta, field, entityMeta); doName(propertyMeta, field, entityMeta); @@ -107,44 +116,15 @@ doEnum(propertyMeta, field, entityMeta); doVersion(propertyMeta, field, entityMeta); doLob(propertyMeta, field, entityMeta); - } catch (IdGeneratorNotFoundException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (LazyFetchSpecifiedException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (TemporalTypeNotSpecifiedException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (VersionPropertyNotNumberException e) { - // TODO Auto-generated catch block - e.printStackTrace(); + } catch (Throwable t) { + throw new CannotCreatePropertyException(t); } } else { try { doRelationship(propertyMeta, field, entityMeta, relationshipAnnotation); - } catch (UnsupportedRelationshipException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (JoinColumnNameAndReferencedColumnNameMandatoryException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (RelationshipNotEntityException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (BothMappedByAndJoinColumnException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (OneToManyNotListException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (OneToManyNotGenericsException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (MappedByMandatoryException e) { - // TODO Auto-generated catch block - e.printStackTrace(); + } catch (Throwable t) { + throw new CannotCreatePropertyException(t); } } } @@ -154,6 +134,9 @@ } private void doColumnMeta(PropertyMeta propertyMeta, Field field, EntityMeta entityMeta) { + Validate.notNull(propertyMeta); + Validate.notNull(field); + Validate.notNull(entityMeta); propertyMeta.setColumnMeta(columnMetaFactory.createColumnMeta(field, entityMeta, propertyMeta)); } @@ -162,6 +145,9 @@ } private void doEnum(PropertyMeta propertyMeta, Field field, EntityMeta entityMeta) { + Validate.notNull(propertyMeta); + Validate.notNull(field); + Validate.notNull(entityMeta); if (propertyMeta.getPropertyClass().isEnum() == false) { return; } @@ -174,6 +160,9 @@ private void doFetchType(PropertyMeta propertyMeta, Field field, EntityMeta entityMeta) throws LazyFetchSpecifiedException { + Validate.notNull(propertyMeta); + Validate.notNull(field); + Validate.notNull(entityMeta); final Basic basic = field.getAnnotation(Basic.class); if (basic == null) { propertyMeta.setFetchType(FetchType.EAGER); @@ -186,11 +175,18 @@ } private void doField(PropertyMeta propertyMeta, Field field, EntityMeta entityMeta) { + Validate.notNull(propertyMeta); + Validate.notNull(field); + Validate.notNull(entityMeta); propertyMeta.setField(field); + propertyMeta.setPropertyClass(field.getDeclaringClass()); } private void doId(PropertyMeta propertyMeta, Field field, EntityMeta entityMeta) throws IdGeneratorNotFoundException { + Validate.notNull(propertyMeta); + Validate.notNull(field); + Validate.notNull(entityMeta); propertyMeta.setId(field.getAnnotation(Id.class) != null); GeneratedValue generatedValue = field.getAnnotation(GeneratedValue.class); if (generatedValue == null) { @@ -223,26 +219,17 @@ } } - /** - * TODO for junichi - * - * @param propertyMeta - * @param entityMeta - */ private void doIdentityIdGenerator(PropertyMeta propertyMeta, EntityMeta entityMeta) { + Validate.notNull(propertyMeta); + Validate.notNull(entityMeta); propertyMeta.setIdentityIdGenerator(new IdentityIdGenerator(entityMeta, propertyMeta)); } - /** - * TODO for junichi - * - * @param propertyMeta - * @param field - * @param entityMeta - * @throws JoinColumnNameAndReferencedColumnNameMandatoryException - */ private void doJoinColumn(PropertyMeta propertyMeta, Field field, EntityMeta entityMeta) throws JoinColumnNameAndReferencedColumnNameMandatoryException { + Validate.notNull(propertyMeta); + Validate.notNull(field); + Validate.notNull(entityMeta); JoinColumn joinColumn = field.getAnnotation(JoinColumn.class); if (joinColumn != null) { JoinColumnMeta meta = new JoinColumnMeta(joinColumn.name(), joinColumn.referencedColumnName()); @@ -265,20 +252,18 @@ } private void doLob(PropertyMeta propertyMeta, Field field, EntityMeta entityMeta) { + Validate.notNull(propertyMeta); + Validate.notNull(field); + Validate.notNull(entityMeta); propertyMeta.setLob(field.getAnnotation(Lob.class) != null); } - /** - * TODO for junichi - * - * @param propertyMeta - * @param field - * @param entityMeta - * @param manyToOne - * @throws RelationshipNotEntityException - */ private void doManyToOne(PropertyMeta propertyMeta, Field field, EntityMeta entityMeta, ManyToOne manyToOne) throws RelationshipNotEntityException { + Validate.notNull(propertyMeta); + Validate.notNull(field); + Validate.notNull(entityMeta); + Validate.notNull(manyToOne); propertyMeta.setRelationshipType(RelationshipType.MANY_TO_ONE); Class<?> relationshipClass = field.getType(); if (relationshipClass.getAnnotation(Entity.class) == null) { @@ -288,25 +273,19 @@ } private void doName(PropertyMeta propertyMeta, Field field, EntityMeta entityMeta) { + Validate.notNull(propertyMeta); + Validate.notNull(field); + Validate.notNull(entityMeta); propertyMeta.setName(fromFieldNameToPropertyName(field.getName())); } - /** - * TODO for junichi - * - * @param propertyMeta - * @param field - * @param entityMeta - * @param oneToMany - * @throws OneToManyNotListException - * @throws OneToManyNotGenericsException - * @throws RelationshipNotEntityException - * @throws BothMappedByAndJoinColumnException - * @throws MappedByMandatoryException - */ private void doOneToMany(PropertyMeta propertyMeta, Field field, EntityMeta entityMeta, OneToMany oneToMany) throws OneToManyNotListException, OneToManyNotGenericsException, RelationshipNotEntityException, BothMappedByAndJoinColumnException, MappedByMandatoryException { + Validate.notNull(propertyMeta); + Validate.notNull(field); + Validate.notNull(entityMeta); + Validate.notNull(oneToMany); propertyMeta.setRelationshipType(RelationshipType.ONE_TO_MANY); if (!List.class.isAssignableFrom(field.getType())) { throw new OneToManyNotListException(entityMeta.getName(), propertyMeta.getName()); @@ -330,18 +309,12 @@ } } - /** - * TODO for junichi - * - * @param propertyMeta - * @param field - * @param entityMeta - * @param oneToOne - * @throws RelationshipNotEntityException - * @throws BothMappedByAndJoinColumnException - */ private void doOneToOne(PropertyMeta propertyMeta, Field field, EntityMeta entityMeta, OneToOne oneToOne) throws RelationshipNotEntityException, BothMappedByAndJoinColumnException { + Validate.notNull(propertyMeta); + Validate.notNull(field); + Validate.notNull(entityMeta); + Validate.notNull(oneToOne); propertyMeta.setRelationshipType(RelationshipType.ONE_TO_ONE); Class<?> relationshipClass = field.getType(); if (relationshipClass.getAnnotation(Entity.class) == null) { @@ -362,6 +335,10 @@ JoinColumnNameAndReferencedColumnNameMandatoryException, RelationshipNotEntityException, BothMappedByAndJoinColumnException, OneToManyNotListException, OneToManyNotGenericsException, MappedByMandatoryException { + Validate.notNull(propertyMeta); + Validate.notNull(field); + Validate.notNull(entityMeta); + Validate.notNull(relationshipAnnotation); doJoinColumn(propertyMeta, field, entityMeta); if (OneToOne.class.isInstance(relationshipAnnotation)) { doOneToOne(propertyMeta, field, entityMeta, OneToOne.class.cast(relationshipAnnotation)); @@ -374,15 +351,11 @@ } } - /** - * TODO for junichi - * - * @param propertyMeta - * @param generatedValue - * @param entityMeta - */ private boolean doSequenceIdGenerator(PropertyMeta propertyMeta, GeneratedValue generatedValue, EntityMeta entityMeta) { + Validate.notNull(propertyMeta); + Validate.notNull(generatedValue); + Validate.notNull(entityMeta); String name = generatedValue.generator(); SequenceGenerator sequenceGenerator; if (StringUtils.isEmpty(name)) { @@ -400,15 +373,10 @@ return true; } - /** - * TODO for junichi - * - * @param propertyMeta - * @param generatedValue - * @param entityMeta - * @return - */ private boolean doTableIdGenerator(PropertyMeta propertyMeta, GeneratedValue generatedValue, EntityMeta entityMeta) { + Validate.notNull(propertyMeta); + Validate.notNull(generatedValue); + Validate.notNull(entityMeta); String name = generatedValue.generator(); TableGenerator tableGenerator; if (StringUtils.isEmpty(name)) { @@ -424,11 +392,13 @@ } propertyMeta.setTableIdGenerator(new TableIdGenerator(entityMeta, propertyMeta, tableGenerator)); return true; - } private void doTemporal(PropertyMeta propertyMeta, Field field, EntityMeta entityMeta) throws TemporalTypeNotSpecifiedException { + Validate.notNull(propertyMeta); + Validate.notNull(field); + Validate.notNull(entityMeta); if (propertyMeta.getPropertyClass() != java.util.Date.class && propertyMeta.getPropertyClass() != Calendar.class) { return; @@ -441,17 +411,17 @@ } private void doTransient(PropertyMeta propertyMeta, Field field, EntityMeta entityMeta) { + Validate.notNull(propertyMeta); + Validate.notNull(field); + Validate.notNull(entityMeta); propertyMeta.setTransient(field.getAnnotation(Transient.class) != null || ModifierUtil.isTransient(field)); } - private void doValueType(PropertyMeta propertyMeta, EntityMeta entityMeta) throws UnsupportedPropertyTypesException { - - throw new UnsupportedPropertyTypesException(entityMeta.getName(), propertyMeta.getName(), propertyMeta - .getPropertyClass()); - } - private void doVersion(PropertyMeta propertyMeta, Field field, EntityMeta entityMeta) throws VersionPropertyNotNumberException { + Validate.notNull(propertyMeta); + Validate.notNull(field); + Validate.notNull(entityMeta); if (field.getAnnotation(Version.class) == null) { return; } @@ -463,6 +433,7 @@ } private String fromFieldNameToPropertyName(String name) { + Validate.notNull(name); return name; } @@ -473,6 +444,7 @@ * @return 関連のアノテーションまたは<code>null</code> */ protected Object getRelationshipAnnotation(Field field) { + Validate.notNull(field); final OneToOne oneToOne = field.getAnnotation(OneToOne.class); if (oneToOne != null) { return oneToOne; Modified: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/TableMetaFactoryImpl.java =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/TableMetaFactoryImpl.java 2009-04-07 07:03:13 UTC (rev 3155) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/TableMetaFactoryImpl.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -25,6 +25,7 @@ import org.jiemamy.composer.importer.meta.EntityMeta; import org.jiemamy.composer.importer.meta.TableMeta; import org.jiemamy.composer.importer.meta.TableMetaFactory; +import org.jiemamy.utils.JmStringUtil; /** * {@link TableMetaFactory}の実装クラス。 @@ -58,7 +59,6 @@ } private String fromEntityNameToTableName(String entityName) { - String tableName = StringUtils.uncapitalize(entityName); - return tableName; + return JmStringUtil.toSQLName(entityName); } } Deleted: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/TemporalTypeNotSpecifiedException.java =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/TemporalTypeNotSpecifiedException.java 2009-04-07 07:03:13 UTC (rev 3155) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/TemporalTypeNotSpecifiedException.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -1,38 +0,0 @@ -/* - * Copyright 2007-2009 Jiemamy Project and the Others. - * Created on Apr 6, 2009 - * - * 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.composer.importer.meta.impl; - -/** - * TODO for junichi - * - * @author junichi - */ -public class TemporalTypeNotSpecifiedException extends Exception { - - /** - * インスタンスを生成する。 - * - * @param name - * @param name2 - */ - public TemporalTypeNotSpecifiedException(String name, String name2) { - // TODO Auto-generated constructor stub - } - -} Deleted: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/UnsupportedInheritanceException.java =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/UnsupportedInheritanceException.java 2009-04-07 07:03:13 UTC (rev 3155) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/UnsupportedInheritanceException.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -1,38 +0,0 @@ -/* - * Copyright 2007-2009 Jiemamy Project and the Others. - * Created on Apr 6, 2009 - * - * 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.composer.importer.meta.impl; - -/** - * TODO for junichi - * - * @author junichi - */ - @ SuppressWarnings("serial") -public class UnsupportedInheritanceException extends Exception { - - /** - * インスタンスを生成する。 - * - * @param entityClass - */ - public UnsupportedInheritanceException(Class<?> entityClass) { - // TODO Auto-generated constructor stub - } - -} Deleted: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/UnsupportedRelationshipException.java =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/UnsupportedRelationshipException.java 2009-04-07 07:03:13 UTC (rev 3155) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/UnsupportedRelationshipException.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -1,38 +0,0 @@ -/* - * Copyright 2007-2009 Jiemamy Project and the Others. - * Created on Apr 6, 2009 - * - * 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.composer.importer.meta.impl; - -/** - * TODO for junichi - * - * @author junichi - */ -public class UnsupportedRelationshipException extends Exception { - - /** - * インスタンスを生成する。 - * - * @param name - * @param name2 - */ - public UnsupportedRelationshipException(String name, String name2) { - // TODO Auto-generated constructor stub - } - -} Deleted: charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/VersionPropertyNotNumberException.java =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/VersionPropertyNotNumberException.java 2009-04-07 07:03:13 UTC (rev 3155) +++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/meta/impl/VersionPropertyNotNumberException.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -1,38 +0,0 @@ -/* - * Copyright 2007-2009 Jiemamy Project and the Others. - * Created on Apr 6, 2009 - * - * 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.composer.importer.meta.impl; - -/** - * TODO for junichi - * - * @author junichi - */ -public class VersionPropertyNotNumberException extends Exception { - - /** - * インスタンスを生成する。 - * - * @param name - * @param name2 - */ - public VersionPropertyNotNumberException(String name, String name2) { - // TODO Auto-generated constructor stub - } - -} Modified: charon/jiemamy-jpa-importer/trunk/src/test/java/example/entity/Employee.java =================================================================== --- charon/jiemamy-jpa-importer/trunk/src/test/java/example/entity/Employee.java 2009-04-07 07:03:13 UTC (rev 3155) +++ charon/jiemamy-jpa-importer/trunk/src/test/java/example/entity/Employee.java 2009-04-07 08:50:52 UTC (rev 3156) @@ -22,21 +22,32 @@ import javax.persistence.Id; /** - * TODO for kato + * 従業員 * - * @author kato + * @author j5ik2o */ @Entity public class Employee { + /** 従業員ID */ private Long employeeId; + /** + * 従業員IDを取得する。 + * + * @return 従業員ID + */ @Id public Long getEmployeeId() { return employeeId; } + /** + * 従業員IDを設定する。 + * + * @param employeeId 従業員ID + */ public void setEmployeeId(Long employeeId) { this.employeeId = employeeId; }