[Jiemamy-notify:1887] commit [3057] とりあえず、Validate . notNullなどと書いてみるテスト。。。

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2009年 4月 2日 (木) 19:24:29 JST


Revision: 3057
          http://svn.sourceforge.jp/view?root=jiemamy&view=rev&rev=3057
Author:   j5ik2o
Date:     2009-04-02 19:24:29 +0900 (Thu, 02 Apr 2009)

Log Message:
-----------
とりあえず、Validate.notNullなどと書いてみるテスト。。。

Modified Paths:
--------------
    charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/JpaImporter.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-02 10:24:03 UTC (rev 3056)
+++ charon/jiemamy-jpa-importer/trunk/src/main/java/org/jiemamy/composer/importer/JpaImporter.java	2009-04-02 10:24:29 UTC (rev 3057)
@@ -14,6 +14,8 @@
  */
 package org.jiemamy.composer.importer;
 
+import org.apache.commons.lang.Validate;
+
 import org.jiemamy.composer.ImportException;
 import org.jiemamy.composer.Importer;
 import org.jiemamy.model.RootModel;
@@ -21,18 +23,26 @@
 /**
  * JPAのエンティティをインポートするインポータ。
  * 
- * @author daisuke
+ * @author j5ik2o
  */
 public class JpaImporter implements Importer<JpaImportConfig> {
 	
 	public String getName() {
-		// TODO Auto-generated method stub
-		return null;
+		return "JPA Importer";
 	}
 	
 	public boolean importModel(RootModel rootModel, JpaImportConfig config) throws ImportException {
-		// TODO Auto-generated method stub
+		Validate.notNull(rootModel);
+		Validate.notNull(config);
+		Validate.notNull(config.getRootPackageName());
+		Validate.notNull(config.getEntityPackageName());
+		Validate.notNull(config.getJavaFileEncoding());
+		Validate.notNull(config.getJavaFileSrcDirs());
+		Validate.isTrue(config.getJavaFileSrcDirs().size() > 0);
+		Validate.notNull(config.getEntityClassNamePatterns());
+		Validate.isTrue(config.getEntityClassNamePatterns().size() > 0);
+		Validate.notNull(config.getIgnoreEntityClassNamePatterns());
+		Validate.isTrue(config.getIgnoreEntityClassNamePatterns().size() > 0);
 		return false;
 	}
-	
 }



Jiemamy-notify メーリングリストの案内
Back to archive index