On Sat, 3 Feb 2001 12:11:47 +0100, Francesco Marchioni
<[EMAIL PROTECTED]> wrote:
>I started using  BMP logic, but I soon discovered it's really an ugly logic.
>Since I don't know how many "AND" I have to insert in the select nor I know
>if the user wants at all filtering of records I found myself at a dead
>point.

This seems to be strictly UI related.

>As you can see it's technically impossible to know before running where I
>have to issue
>the "WHERE" clause......
>yes I could issue it just after the SELECT
>sql = "SELECT * FROM TABEL WHERE"
>
>But what if the user doesn't want at all the filter ?? I solved the
>situation appendind
>-in this second situation- a condition that's always fulfilled....but still
>it's just a hack,
>not a real programmer solution......

"if (filterReqs != null) { sql += createWhereClause(filterReqs); }"

This is a standard programming problem, and nothing to do with EJB
really.

>Then I thought...this could be made with Entity Bean CMP, issuing a
>FindByCompanyAndDate,
>and setting only the fields I want actually to use as a filter......
>What do you say ? can this be a "classic" example of when Entity bean are a
>"MUST" ?

Any CMP behaviour you can come up with can be implemented in BMP as
well. Extrapolate as necessary.

regards,
  Rickard

--
Rickard Öberg
Email: [EMAIL PROTECTED]

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to