Re: Syntax for getter variables in a POJO

2007-03-02 Thread Clinton Begin
+1. Yep, you can either use column aliases or a result map. On 3/2/07, Ted Schrader <[EMAIL PROTECTED]> wrote: Hi Collin, So setProduct_id() and setP_sequence() wouldn't work? Regardless, if I understand the recommeneded iBATIS way of doing things, your situation would be an excellent case

Re: iBatis and entity-attribute-value style tables

2007-03-02 Thread Clinton Begin
Hi Collin, iBATIS can absolutely query this...whether or not you'll like the structure of the object at the end of the day is a different story. :-) There are two possibilities here: 1) You can simply create a model object that represents the table structure and build the API around it to acce

Re: Just Another Stored Procedure Question

2007-03-02 Thread Ted Schrader
For stored procedure calls that return a value, don't we have to use JDBC syntax like this: {? = call EKA.SISTEM_KONTROL_SPAJ.GENERATE_COUNTER (?,?,?,?,?,?)} The leading ? receives the value. Perhaps this is why "result" and "hasil" have no value. Replace the ?'s with your iBATIS parameters an

Re: Using an array instead of a List

2007-03-02 Thread Ted Schrader
Hi Collin, I must admit I have not worked with web services, so having a List-backed array may not be a good fit. This pattern seems to work pretty well for me in sending objects to JSPs for rendering, though. In regards to iBATIS not supporting arrays, in a way you are right because you will n

Re: Using an array instead of a List

2007-03-02 Thread Collin Peters
Hi Ted, I believe since the List still exists in the VO, Axis will complain. You would essentially end up having two versions of the VO which would wreck havoc on having proper code using the services (i.e. you essentially would have to have two versions of everything) So does this mean that iBa

Re: iBatis and entity-attribute-value style tables

2007-03-02 Thread Ted Schrader
Hi Collin, If you can do it with straight-up JDBC, you can probably do it with iBATIS. I sense you may be looking for some magic in the form of avoiding N+1 selects. Based on your example, perhaps the following two value objects are called for: UserVO Integer id; String firstName; St

Re: Using an array instead of a List

2007-03-02 Thread Ted Schrader
Hi Collin, How about a derived getter for use by the web services? Here's what I mean: public class ProgramVO { // programID is in here somewhere. // List of ProgramActivityVOs private List activities; public List getActivities() { return activities;

Re: Adding a sql map at run time

2007-03-02 Thread Ted Schrader
Hi Tegan, There may be other ways to solve your problem. How much SQL are the users allowed to enter? Perhaps it can be done by using $value$ instead of #value# in critical places in an existing sql map (This is how WHERE clauses in Abator-generated sql maps work for the query-by-example bits).

Re: Syntax for getter variables in a POJO

2007-03-02 Thread Ted Schrader
Hi Collin, So setProduct_id() and setP_sequence() wouldn't work? Regardless, if I understand the recommeneded iBATIS way of doing things, your situation would be an excellent case for using , perhaps something like: SELECT product_id, p_sequence FROM Products The

Adding a sql map at run time

2007-03-02 Thread Tegan Clark
Hi all, Does anyone have any pointers for how I would add a sql map to the SqlMapClient at runtime. I'm writing a GUI that lets a use enter a piece of SQL and I'm using iBATIS to do the heavy lifting of mapping my java parameters to the sql and executing it and doing the return mapping.

Re: Using an array instead of a List

2007-03-02 Thread Collin Peters
I'm not sure if I follow. After looking over the tag, it looks like it is only for adding dynamic SQL *into* a select statement. I am looking for a way to get data *out of* a select statement and into a Java array. Do you have any examples or links of what you mean? On 3/2/07, Poitras Christi

RE: Using an array instead of a List

2007-03-02 Thread Poitras Christian
>From what I know, arrays can be used with getters, by not setters. For instance, the tag should work with arrays and Lists, but not resultMap. Christian -Original Message- From: Collin Peters [mailto:[EMAIL PROTECTED] Sent: Friday, 02 March 2007 15:07 To: user-java@ibatis.apache.org Su

M:N select and groupBy

2007-03-02 Thread cmose
Ok, I may be referring to the concept inaccurately as I'm not an sql guru (non available so the work falls to me). I'm trying to accomplish the following query: SELECT SUM(name.size) as totalBytes, name.type, log.timestamp FROM name, log WHERE nam

RE: Syntax for getter variables in a POJO

2007-03-02 Thread Armeanu, Christian
These should map respectively to pSequence and productId. Chris -Original Message- From: Collin Peters [mailto:[EMAIL PROTECTED] Sent: Friday, March 02, 2007 12:11 PM To: user-java@ibatis.apache.org Subject: Syntax for getter variables in a POJO I am trying to figure out the magical sy

Syntax for getter variables in a POJO

2007-03-02 Thread Collin Peters
I am trying to figure out the magical syntax for POJO's in getter/setters. I have a database column called product_id, another called p_sequence. What do these map to in a POJO getter/setter? Seems the underscore causes some problems. I have had to do some aliases to make them work (i.e. produc

Using an array instead of a List

2007-03-02 Thread Collin Peters
This is the same question as this post, which never got fully answered: http://www.mail-archive.com/user-java@ibatis.apache.org/msg06454.html I have a POJO which has an array of another POJO in it (N+1 style from the iBatis guide). I have gotten this to work with a java.util.List, but I need it

Re: Simple question...

2007-03-02 Thread Larry Meadors
If this is for a new project, don't use the iBATIS DAO, use spring instead. The iBATIS DAO is deprecated, and using Spring gives you a lot more options. Larry On 3/1/07, Dave Rodenbaugh <[EMAIL PROTECTED]> wrote: Having examined the DTD, it's actually illegal, but not enforced. I have tried

Re: Avoiding N+1 Selects

2007-03-02 Thread Larry Meadors
No. Larry On 2/28/07, Brad Handy <[EMAIL PROTECTED]> wrote: I think I could use a row handler to arrange the objects in a situation like this. One question I have: Do the results of a query with a custom RowHandler still get cached when using OSCache? Brad On 2/22/07, Brad Handy <[EMAIL

RE: How to suppress log files created by ibatis

2007-03-02 Thread Kulbhushan, Singh \(IE10\)
Put '#' before these entries in your log4J.properties file log4j.logger.com.ibatis=DEBUG log4j.logger.com.ibatis.common.jdbc.SimpleDataSource=DEBUG log4j.logger.com.ibatis.common.jdbc.ScriptRunner=DEBUG log4j.logger.com.ibatis.sqlmap.engine.impl.SqlMapClientDelegate=DEBUG log4j.logger.java.

How to suppress log files created by ibatis

2007-03-02 Thread Ashish Kulkarni
Hi I have a application running on AS400 using ibatis, i am using Log4J for logging, i am getting a lot of log in my spool file. for preparedStatement created, resultset etc, How do i suppress these logs from my Log4j.properties file which i use to set logging in my application. Ashish

Re: iBATIS in Indianapolis

2007-03-02 Thread Mark Volkmann
On Mar 1, 2007, at 5:31 PM, Ted Schrader wrote: Hi Mark, Thanks for the link to your Abator page, but unfortunately it's coming up blank for me (both IE and FFox). Oops! I've fixed it. Try http://www.ociweb.com/mark/Abator.html again. (Good luck in the Little Rock Marathon this Sunday, by t

Nasser Shahcheraghi/SAC/IPS/FHS is out of the office.

2007-03-02 Thread Nasser . Shahcheraghi
I will be out of the office starting 03/02/2007 and will not return until 03/05/2007. I will respond to your message when I return. - This message, together with any attachments, is intended only for the use of the individual

Re: iBATIS in Indianapolis

2007-03-02 Thread Graeme J Sweeney
On Thu, 1 Mar 2007, Mark Volkmann wrote: If you're interested in learning more about Abator, I have some notes on it at http://www.ociweb.com/mark/Abator.html that might be helpful. Doesn't appear to work, I just get a blank page. -- Graeme -