Sorry for bothering again.
max wrote:
but do you really just want all classes to implement a specific interface and that interface should have the setter/getters specificed for properties in the mapping files ?
That sounds like an evil dual class hiearchy just for fun scheme...and i don't think that is what synchronizer does is it ? It generates a baseclass(not interface) and that case is in a on-the-road-map jira task
Ok, that was nonsense. I convinced the team members that we don't need interfaces for ALL classes.
I tried to put this in my ant task:
Code:
<hbmtemplate
filepattern="{package-name}/Base{class-name}.java"
template="Pojo.vm"
/>
and I modified PojoConstructor to match to the new naming convention:
Code:
/** default constructor */
public Base$pojo.getDeclarationName()()
{
}
... but it doesn't work as expected. I get several warning from Velocity.
Code:
[hibernatetool] WARN logVelocityMessage, org.apache.velocity.runtime.exception.ReferenceException: reference : template = TemplateHelper [line 93,column 9] : $pojo.getJavaTypeName($property, $jdk5) is not a valid reference.
For a table USERDATA I get one File called Userdata.java which looks ok. The file BaseUserdata.java is generated as well and looks like this:
Code:
public class BaseUserdata extends .... implements ... {
// Fields
private $pojo.getJavaTypeName($field, $jdk5) id;
private $pojo.getJavaTypeName($field, $jdk5) version;
private $pojo.getJavaTypeName($field, $jdk5) orgEinheiten;
private $pojo.getJavaTypeName($field, $jdk5) bearbKen;
...
Do I have to wait until beta status is finished or am I donig something wrong?
Rgds,
Axel