Greetings,

I would like to create a Q&A type program to track FAQ's and their answers.
Now my question comes in as to how to/or even if, a container managed bean
can handle a FindBy method that would require a SQL statement that would
change... For instance, the user could type in:

JAVA EJB ORION

and it would find anything that contains JAVA and EJB and ORION in a
Keywords or Question field.

The way I would do it in code (maybe it's all wrong) is:

String sSQL = "SELECT * FROM Questions WHERE Publishable = 'Yes' "

for (int i = 0; i <= array.length; i++ ) {
        sSQL += "AND Keyword LIKE '%" + array[i] + "%' ";
}

/* execute my query */

---

how does that translate into a FindBy method?

Thanks!

Jeremy - [EMAIL PROTECTED]
Christian Brotherhood Newsletter


Reply via email to