Hibernate version:
extracted from JBossIDE-N200509280156-ALL.zip
First, Max i apologize it was a mistake for precedent topic. I downloaded 0925 build
Second, when i run hbm2x task as follow
<target name="generate.java">
<hibernatetool>
<classpath>
<path location="${java.directory}"/>
</classpath>
<jdbcconfiguration configurationfile="./hibernate-cfg.xml"
revengfile="hibernate-reveng.xml"
packagename="fr.ccip.test"/>
<cfg2hbm destdir="${hbm.directory}"/>
<hbm2x destdir="${java.directory}" template="${template.directory}/domain/interface.vm" filepattern="{package}/{class}.java"/>
</hibernatetool>
</target>
I get a {package} folder with a {class}.java file inside
[template]
$c2j.getPackageDeclaration($clazz) import java.util.*;
$c2j.addExtraImports($clazz,$ctx) $secondpassclassimports
/** $c2j.getClassJavaDoc($clazz, $render.eval($ctx, "$c2j.getDeclarationName($clazz) generated by CCIP custom template"),0) */
public interface $c2j.getDeclarationName($clazz) {
## Property accessors for interface #foreach($property in $c2j.getAllPropertiesIterator($clazz)) /** $c2j.toJavaDoc($c2j.getMetaAsString($property, "field-description"),4) */ $c2j.getPropertyGetModifiers($property) $c2j.stripPackage( $c2j.getJavaTypeName($property), $clazz ) $c2j.getGetterSignature($property)(); $c2j.getPropertySetModifiers($property) void set$c2j.getPropertyName($property)($c2j.stripPackage( $c2j.getJavaTypeName($property), $clazz ) $property.Name); #end
}
[results]
$c2j.getPackageDeclaration($clazz) import java.util.*;
$c2j.addExtraImports($clazz,$ctx) $secondpassclassimports
/** $c2j.getClassJavaDoc($clazz, $render.eval($ctx, "$c2j.getDeclarationName($clazz) generated by CCIP custom template"),0) */
public interface $c2j.getDeclarationName($clazz) {
}
|