| Author |
Message |
|
|
|
Post subject: [Feature Request] Change Interface DAO name
Posted: Jan 15, 2008 - 05:57 AM
|
|
Joined: Jan 15, 2008
Posts: 5
|
|
Although it's possible to change the generated Interface DAO java file through the IDAO.tvm template file, the generated Interface DAO name has still the same name as the DAO, due to the property "DAOInterfaceName" (in .tvm: ${class.DAOInterfaceName} , in .java: see below)
Especially, I dislike the following code:
public String getDAOClassName() {
return getValueObjectClassName() + "DAO";
}
public String getAbsoluteDAOClassName() {
return getDAOPackage() + "." + getDAOClassName();
}
public String getDAOInterfaceName() {
return getValueObjectClassName() + "DAO";
}
public String getAbsoluteDAOInterfaceName() {
return getInterfacePackage() + "." + getDAOInterfaceName();
}
Both generated class names have the same name!!! INSANE!!!
I dislike this because in Java files where you link to both the DAO and the Interface DAO... one of the two must have the entire package name pre-fixed to avoid confusion for the Java compiler, but this absolutely ugly Java code!!!
This should be configurable to allow the user to use his own pattern for Interface names, like <xxx>DAO for a DAO and I<xxx>DAO for the Interface.
More generally I think the generated class names should be customizable to allow the user to create his own whole pattern of generated Java names. |
|
|
| |
|
|
|
 |
|
|
| |