Menu

#47 about ColumnDecorator/TableDecorator remarks

open
nobody
None
5
2005-12-20
2005-12-20
runner25
No

I am a coder in China, I am glad to write you this
letter. I always use the Middlegen tools of eclipse
IDE to generate the EJB or CMP source bean, and the
latest version I used is "Net.sf.middlegen_2.1.91". I
found a problem, not errors, in using. Although I
have solved the problem finally, I still report you
for I think you can do better.

In some database such as Oracle, there are table
comment and field comment or others metadata. The
latest version of middlegenide_1.3.3 have also added
the attribute in the class ColumnDecorator and
TableDecorator with getter/setter attribute Remarks.
Whereas many DBA set the comment of table or field
with their mother tongue, for example I set it with
simple Chinese,therefore,despite we can get the CMP
bean with the comment by the velocity entity-cmp-
20.vm, the comment will be non-recognized due to the
character set .

I have to recompile the class ColumnDecorator and
TableDecorator to modify the source code about
remarks as follow:

public final String getRemarks()
{
try{
//System.out.println(_subject.getRemarks());
// System.out.println(new String(_subject.getRemarks
().getBytes("ISO-8859-1"),"GBK"));
return new String(_subject.getRemarks
().getBytes("ISO-8859-1"),"GBK");
}catch(Exception e){
}
return _subject.getRemarks();
}

I hope the Middlegen dev group can fix some
configuration option for other non-english developer
in the future. Greatly grateful for your altruistic
contribution.

Your sincerely,

Yuanbo WANG

email: wwbaba@gmail.com
from :wuhan , china
date:2005-12-20

Discussion


Log in to post a comment.