Hi Mark,
I must admit that I didn't consider the possibility of primitives in my initial design (because we don't use them in our applications), so it's not too surprising to me that there's an error. I'll have to take a look at this a little further to figure out the best way to handle it overall - but it's obviously something that the tool should support.
In the meantime, if you're not using the "by example" methods, you can turn them off by setting attributes on the <table> element in the XML configuration file - that will stop generation of the offending method.
If you are using the "by example" methods, then perhaps using a "big B" Boolean would be an acceptable workaround until I get it fixed in Abator? BTW - I'm leaning towards the wrapper approach right now.
Thanks for reporting this -
Jeff Butler
On 1/12/06, Mark Bennett <[EMAIL PROTECTED]> wrote:
While using this great Abator tool, I tried using the column overide tag to covert SHORTINT to boolean it works everywhere except for in the method getExampleParams(...). Here is the def:
<columnOverride column="FILETRANSFERFLAG" property="fileTransferFlag" javaType="boolean"/>
And the generate code creates an error on the last line:
case SupervisionDetailExample.EXAMPLE_GREATER_THAN:
if (example.isCombineTypeOr()) {
parms.put("OR_FILETRANSFERFLAG_GT", "Y");
} else {
parms.put ("AND_FILETRANSFERFLAG_GT", "Y");
}
parms.put("fileTransferFlag", example.getFileTransferFlag()); // Can't add primitive to Map
Here it is trying put a primitive in a Map. I could fix this manually but my change will be lost when it gets run the next time. Perhaps I am doing something wrong but it seems that the last line of code either needs a wrapper or just removed and leave it to the user to just use the string fields as an indicator.
Mark
