yes, that seems clear by your example. Nevertheless I am currently thinking about pros and cons of a repository. Though this has not been used in your examples I could think of the need for different

One think that's maybe not clear, is that the repository would track the mappings of Pojo *instances* and PojoMetaData *instances*, not the classes. This, to ensure that each pojo instance always has the same meta-data instance.

validations for one single pojo.

Your default way would either be the current way it is implemented in rife or
an optional (and direct) relationship between
com.mypackage.ThisPojo and
com.mypackage.ThisPojoMetaData

But think of different users with different rights. One who could enter a new data object and one who may modify everything (e.g. admin). Though this could be achieved by if statements it would be an option if validation A would allow to enter anything but the mId in your example and validation B would allow to alter that mID also.

Please note that this is just an idea. Maybe that will not be required by any real world applications but is an option that would let me prefer a repository to alter the default settings. So if such an entry does exist that one will be taken otherwise the default behaviour will be used.

I think that this logic is more the responsibility of the business logic, not the meta-data declaration. If you want to handle this in a cross-concern matter, AOP seems like a good approach for this.

--
Geert Bevin                       Uwyn bvba
"Use what you need"               Avenue de Scailmont 34
http://www.uwyn.com               7170 Manage, Belgium
gbevin[remove] at uwyn dot com    Tel +32 64 84 80 03

PGP Fingerprint : 4E21 6399 CD9E A384 6619  719A C8F4 D40D 309F D6A9
Public PGP key  : available at servers pgp.mit.edu, wwwkeys.pgp.net


_______________________________________________
Rife-users mailing list
Rife-users@uwyn.com
http://www.uwyn.com/mailman/listinfo/rife-users

Reply via email to