jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roland Kofler <roland.kof...@systemone.at>
Subject Re: Repository Constraints?
Date Mon, 21 Nov 2005 15:29:14 GMT
David, thank you for your answer!
Its not only a business rule for us but also a matter of data integrity.
Usually we implement constraint-checks for the frontend for validation 
of user input.
Then occasionally as business rule, and finally as as data constraint.
I really think about the data integrity aspect here.
The Observer/Listener way seems a little tedious.

Thanks also for the hint about contains,  my collegue says contains dont 
works for partial words wich we really need for suggestions.
"a tit" would suggest "a title". Is there a way to search partial words, 
for example can we reconfigure lucene?


David Nuescheler schrieb:

>hi roland,
>in jcr there is no constraint for uniqueness of a property. given
>the inheritance of nodetypes this is a slightly more complicated
>idea than with tables of an rdbms.
>also i find it questionable to introduce a constraint to check
>uniqueness of a title (i assume a string property) a bit questionable
>on the data layer (the repository, in this case). i would suggest to
>do this on an application layer. what do you think?
>On 11/21/05, Roland Kofler <roland.kofler@systemone.at> wrote:
>>Hi all, we would like to introduce a constrain for our Title property
>>that asserts its uniqueness.
>>We want to do this as close to the datalayer as possible - in analogy to
>>column constrains in rdbms'.
>>The only method we came up to, is binding an Listener to the
>>a) Are there better ways to constrain properties?
>>b) If not, what is the best way to get the property that fired the event?
>>   Is there a way to get the item that fired the event in the callback
>>method? Didn't find a solution for this.
>>   By now we register the event to the second ancestor node 'pages',
>>which contains a 'page' and
>>   look up in the callback if a 'title' change fired the event.
>>   so we get a path "/s1:pages/page[2]/s1:title" among other property
>>Thank you for your help!!
>>Roland Kofler
>http://jcr.day.com JSR-170 in Action!
>---------------------------------------< david.nuescheler@day.com >---
>This message is a private communication. If you are not the intended
>recipient, please do not read, copy, or use it, and do not disclose it
>to others. Please notify the sender of the delivery error by replying
>to this message, and then delete it from your system. Thank you.
>The sender does not assume any liability for timely, trouble free,
>complete, virus free, secure, error free or uninterrupted arrival of
>this e-mail. For verification please request a hard copy version.
>David Nuescheler
>Chief Technology Officer
>Day Software AG
>Barfuesserplatz 6 / Postfach
>4001 Basel
>T  41 61 226 98 98
>F  41 61 226 98 97

View raw message