Dear all,

I am using JRun3.0 and I am using CMP.

I have a table in Oracle (7.3) in the following format and I want to define
a finder method to return a set of (name,price) and matching on the group_id
field.

ITEM_ID                         NOT NULL NUMBER(4)
GROUP_ID                                 NUMBER(4)
NAME                                     VARCHAR2(60)
PRICE                                    NUMBER

In the bean properties file, I defined the following SQL statement,

ejipt.findByGroupSQL=   SELECT name,price FROM items WHERE group_id = ? ORDER
BY price DESC
ejipt.findByGroupSQL.paramType=int

Question1 : Where should I define the '?' , how does the system know where
to get the value from?

Question2: In my deploy.properties file, I had ejipt.jdbcSources=source1,
therefore should I also add ejipt.findByGroupSQL.source=source1?

Question3: What should I have for ejipt.findByGroupSQL.params and
ejipt.findByGroupSQL.fields? What is the difference between the two? In my
bean implementation I had the following field variables _name, _price,
therefore, should I set ejipt.findByGroupSQL.params=_name,_price and
ejipt.findByGroupSQL.fields=name,price in my bean properties file?

Question4: In the Remote Interface, do I need the following declaration? Is
this correct?
        Collection findByGroup(int group_id) throws FinderException,
RemoteException;

Question5: In the Home Interface, do I need to declare the method as in
Question4? Or it is enough to declare just in the Remote Interface and not
necessary in Home Interface?

Question6: In the Bean Implementation, should I have declare as this,

        public Collection findByGroup(int group_id) throws FinderException,
RemoteException {
        }

        or

        public Collection ejbfindByGroup(int group_id) throws FinderException,
RemoteException {
        }

        And do I need to have anything within the brackets {}?


Anthony Mak
==========================
Anthony Mak ([EMAIL PROTECTED])


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to