Hi Wouter and all,
 
first of all: I think Outlook has played a trick on you, Wouter: Stefan Reichert and Stefan Reisner share the first few letters of their names, but they are not the same person :-)
 
However, thanks for your encouraging feedback!
 
Concerning the situations where you want to check for NULL: we simply didn't have the time to add this to the generator yet. Our idea was to define a tagged value (e.g. @andromda.hibernate.criteria.searchifisnull) that can be applied to the attributes of the <<Criteria>> class in order to let the generator know that this parameter should be considered in the search even if it is null. We explicitly want to use a tagged value instead of a stereotype, since all other things concerning the criteria search attributes can be controlled this way.
 
Also, we will likely enhance the criteria search feature with some more options for global configuration using namespace properties. We just didn't have enough time last week and just wanted to get the baby out of the door in order to collect feedback :-)
 
I am very pleased to hear that you enhanced the profile in order to select the comparator from a combo - I wanted to do this as well, but didn't know exactly how to do this. Now I have to chance to look and learn :-) By the way: we're using Together Designer 2005, and have enhanced the tool in quite some areas to get good support for AndroMDA.
 
Regarding the howto: I will write a first version of the howto for this feature today, so you can have a look at it and apply it to the code base if you like it.
 
Viele Gr��e,
Peter
 
 
-----Original Message-----
From: Wouter Zoons [mailto:[EMAIL PROTECTED]
Sent: Monday, March 14, 2005 9:10 PM
To: [email protected]
Cc: 'Dr. Stefan Reisner'; FRIESE, PETER
Subject: hibernate search criteria

Hi Peter, Stefan,

 

Great job on the search criteria .. I’m already converting the code in my current project J

 

I was wondering though, I noticed that null search parameters that are not instances of java.lang.String are ignored by the search (which makes sense) .. but I was wondering why there’s a check parameter.isSearchIfIsNull() (CriteriaSearch.java, line #148)

 

I can’t find where that property is ever set .. at least not in the generated code. And I also could not find in the templates anything that would trigger the generation of this flag (for example in the CriteriaSearchParameter constructor). Can you explain me how this works ? My guess is this parameter is only used when derived from the comparator.

 

I’m wondering because what if someone wants to search for a parameter that must in fact be null ?

 

Anyway, let me know so I can update the Spring howto to include this feature.

 

Thanks guys

n       Wouter

 

Ps: I was expecting to use the <<Nullable>> stereotype on the parameters or something

Ps2: if you’re using MagicDraw you will soon be able to select the comparator from a list, I added to that feature to the profile UML model (defining the tagged value type as an enumeration)

 

Reply via email to