From: Jim K. <ji...@ho...> - 2004-12-13 13:46:32
|
Hi- I've been looking at using HAPI as a tool in a couple of projects. One of the issues I'm having stems from the way accessors and mutators are set up in the API. In the 0.4.2 release, HAPI isn't javabean spec 1.01 compliant and therefore doesn't work with a lot of technologies that require javabean support. In my particular case, I'm trying to use OGNL to create bindings between HAPI and tabular data representations. It'd be great if the sourcegen tool could generate HAPI classes that were javabean compliant. I don't think it would be difficult to incorporate this and it could most likely exist right along side the current accessor/mutator scheme. With proper javabean support, HAPI classes would be open for integration with a whole host of api's such as ognl(tapestry, webwork) beanutils (struts), hibernate, etc. For a quick example of what I'm talking about, the ORU_R01 class might be changed to public MSH getMSH(); // simple getter public void setMSH(); // simple setter public void setter(int index, PropertyType value); // indexed setter public ORU_R01_PIDPD1NK1NTEPV1PV2ORCOBRNTEOBXNTECTI getORU_R01_PIDPD1NK1NTEPV1PV2ORCOBRNTEOBXNTECTI(int index); // indexed getter public void getORU_R01_PIDPD1NK1NTEPV1PV2ORCOBRNTEOBXNTECTI(ORU_R01_PIDPD1NK1NTEPV1PV2ORCOBRNTEOBXNTECTI [] value); // array setter public ORU_R01_PIDPD1NK1NTEPV1PV2ORCOBRNTEOBXNTECTI[] getORU_R01_PIDPD1NK1NTEPV1PV2ORCOBRNTEOBXNTECTI(); // array getter Has anyone considered this? What do you think? By the way, the API as it stands is a tremendously valuable piece of software. Thanks. Jim |