Hi,
i'm using a ReverseEngineeringStrategy (over a delegate as mentioned in the docs) and trying to disable some of the properties with the following code-construct in my ReverseEngineeringStrategy:
Code:
public Map<String, MetaAttribute> columnToMetaAttributes(TableIdentifier identifier, String column) {
Map<String, MetaAttribute> metaMap = new HashMap<String, MetaAttribute>();
String propertyName = super.columnToPropertyName(identifier, column);
/*
* Ignore all properties which starts with 'S'.
*/
if(propertyName != null && propertyName.startsWith("S")) {
MetaAttribute metaAtt = new MetaAttribute("gen-property");
metaAtt.addValue("false");
metaMap.put("gen-property", metaAtt);
} else {
metaAtt = super.columnToMetaAttributes(identifier, column);
}
return metaAtt;
}
This code works fine and ignores all the properties as membervariables. But now i recognized that theese properties are still in the 'all-properties' constructor:
example:
Code:
class Person {
private String name;
private String surname;
//my ignored variable --> text/member isn't visible in the generated pojo
//private String stime;
//no-argument-constructor
public Person() {}
//all-properties-constructor
public Person(String name, String surname, String stime) {
this.name = name;
this.surname = surname;
this.stime = stime; //Compiler-Error
}
}
Until now i haven't find anything helpful. Is there a possibility to fix this problem?
Thanks in advance
Alex