Author: tchemit Date: 2010-09-13 14:17:04 +0200 (Mon, 13 Sep 2010) New Revision: 2116 Url: http://nuiton.org/repositories/revision/topia/2116 Log: Evolution #863: Change log level when impl are not generate Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityTransformer.java Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityTransformer.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityTransformer.java 2010-09-13 12:12:13 UTC (rev 2115) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityTransformer.java 2010-09-13 12:17:04 UTC (rev 2116) @@ -172,7 +172,8 @@ } // Generate Entity Implementation class - if (isGenerateImpl(input, input.getOperations())) { + boolean generateImpl = isGenerateImpl(input, input.getOperations()); + if (generateImpl) { generateImpl(input); } @@ -273,18 +274,14 @@ if (fileLocation != null) { // there is already a existing file in class-path, skip - if (isVerbose()) { - log.info("Will not generate [" + fqn + "], found existing file in class-path : " + fileLocation); - } + log.info("Will not generate [" + fqn + "], found existing file in class-path : " + fileLocation); return false; } // On ne génère pas le impl si l'entité a des opérations if (!operations.isEmpty()) { - if (isVerbose()) { - log.info("Will not generate [" + fqn + "], there is some operations to manually implement"); - } + log.info("Will not generate [" + fqn + "], there is some operations to manually implement"); return false; } @@ -292,9 +289,7 @@ // superclasses non implémentées for (ObjectModelOperation otherOp : input.getAllOtherOperations(false)) { if (otherOp.isAbstract()) { - if (isVerbose()) { - log.info("Will not generate [" + fqn + "], there is a abstract operation [" + otherOp.getName() + "] in allOtherOperations."); - } + log.info("Will not generate [" + fqn + "], there is an abstract operation [" + otherOp.getName() + "] in allOtherOperations."); return false; } } @@ -644,7 +639,8 @@ } } - protected void addMultipleAddOperation(ObjectModelAttribute attribute, String collectionImpl) { + protected void addMultipleAddOperation(ObjectModelAttribute attribute, + String collectionImpl) { String attrName = getPropertyName(attribute); String attrType = getPropertyType(attribute); @@ -715,7 +711,8 @@ setOperationBody(implOperation, body.toString()); } - protected void addMultipleAddAllOperation(ObjectModelAttribute attribute, String collectionInterface) { + protected void addMultipleAddAllOperation(ObjectModelAttribute attribute, + String collectionInterface) { String attrName = getPropertyName(attribute); String attrType = getPropertyType(attribute); @@ -755,7 +752,9 @@ ); } - protected void addMultipleSetOperation(ObjectModelAttribute attribute, String collectionInterface, String collectionImpl) { + protected void addMultipleSetOperation(ObjectModelAttribute attribute, + String collectionInterface, + String collectionImpl) { String attrName = getPropertyName(attribute); String referenceType = getPropertyType(attribute);