Carl Wauters

Greenhorn
+ Follow
since Aug 02, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Carl Wauters

Hi everyone,

Only three weeks after I had mailed my assignment, I got a mail from Oracle to tell me that I'm certified. Thanks to everone who helped me with the assignment.

Best regards,

Carl
11 years ago
Thanks for your reply, Jeanne. Something tells me to make some changes in my diagrams
Thank you for your reply, Jari. Good luck with part 2!
Dear forum users,

This is a question for everyone who already passed the SCEA exam and based their assignment on the example that was given in the famous chapter 9 from Howard Sheil's book. I would like to know if you used the same kind of arrows as well. For me, it's a bit strange that author uses asynchronous arrows (->) all the time (in both directions) It's not really obvious to me to see the distinction between synchronous and real asynchronous (e.g. the message to the mail server) messages that way, and - IMHO - this is an important aspect in the sequence diagrams.

Thank you very much for your answers.
Hi Mark,

Do you mean this way: I'm afraid this causes mapping exceptions...
[ July 09, 2008: Message edited by: Carl Wauters ]
Hi Cristian,

Ik work with annotations coming from the persistence 1.0 API instead of the hibernate .hbm.xml file. So my problem could be caused to a wrong implementation of those annotations. The queries are written via Hibernate API.

I'm gonna show you the mapping code I used:

Entity Product
--------------


Entity Description
------------------

Query:
------



I changed the query a bit because it's a little bit more complicated.

when I loop through my returned product list, the descriptions map still contains all descriptions per productId. I would like to have only the descriptions in the specified language.

Regards,

Carl
[ July 09, 2008: Message edited by: Carl Wauters ]
Hi Mark,

Thanks for your answer. The solution you proposed is one of the things I tried before, and this still returns a list with all descriptions (having the same foreign key value, of course), instead of a filtered list.

regards,

Carl
Hi everyone,

I'm quite new to Hibernate, and in case this question had been posted many times before, I'm sorry for that. I have the following situation:

Table A (Product)
-----------------
- Id (PK)
- related fields

Table B (Product description)
----------------------------
- Id (FK)
- Language
- Description

* There's a composite PK in table B (combination of Id and Language column)

Now, I would like to write a query that returns products - including the description - but only in the language that was passed as a parameter. I tried many things, but I always get a list with all languages, so the parameter has no influence on the result. I can understand why this is the case, but however, I would like to get only the descriptions I need. Is there a way to do this via Hibernate, and if this is possible, what do I have to do then?

I appreciate your help!

regards,

Carl
It doesn't give a compile error because your methods are correctly overloaded and because it does know which method to call. First it looks for a method with an object of type C as parameter. Since that doesn't exist, it looks at the object hierarchy of c. The first superclass it encounters is class B, and there is a method with type B as parameter, so that one will be chosen.
15 years ago
Java can't find your .class files. Make sure the .class files directory is in your classpath (via environment variable CLASSPATH or via adding -cp directoryname in your command line
15 years ago
I was wondering the same. I know that the singleton pattern has some advantages, but suppose that you've got an application where both ways can be used without any problem. Wouldn't it be better then to use a class with static methods instead of the singleton pattern? Using a singleton normally means you create 1 object (of the same type as the singleton class) while using a class with static methods doesn't create any object at all. (when I talk about a class with static methods, I mean a class with a private constructor)
[ August 08, 2007: Message edited by: Carl Wauters ]
After the container had found the servlet the client requested and it had created an HttpServletRequest and an HttpServletResponse object. Those objects will be passed as arguments in the service() method if the init method of the servlet is completed.

Regards,

Carl
15 years ago
The reason why you still can write constructors in an abstract class: think about inheritance. A subclass constructor always calls the default constructor of the superclass, even when that superclass in abstract.(unless you explicitly call another one)
15 years ago
Hi,

You asked what a static class is, but that doesn't exist. Only variables, methods and blocks can be static.

regards,

Carl
15 years ago
- Considering your first problem: ${foo eq aValue} This will only return true when you compare foo to null.
- Considering your second problem: ${'0' || '0'} This will only return true when one of those strings is equal to 'true'


About casting: i'm not completely sure, but I guess you can compare Strings to Strings, numbers to numbers, booleans to booleans, booleans to Strings and numbers to Strings, but in the latter case, the String must be able to be converted to a number.

Hope this helps...

Regards,

Carl