Does CMP bean finder method supports "LIKE" sql?

I put something like this in the orion-ejb-jar.xml file:
<finder-method partial="false" query="select * from EMP where $ename like $1 AND $job like $2">
</finder-method>
If I put in exact value like 'ADAMS' or 'CLERK', it works fine. But if I put in 'A%' or 'CL%', it does not work. I know the record is there and the same sql does return a row in sql-plus.
Appreciate any help.
Adam

I put something like this in the orion-ejb-jar.xml file:
<finder-method partial="false" query="select * from EMP where $ename like $1 AND $job like $2">
</finder-method>
If I put in exact value like 'ADAMS' or 'CLERK', it works fine. But if I put in 'A%' or 'CL%', it does not work. I know the record is there and the same sql does return a row in sql-plus.
Appreciate any help.
Adam gday Adam -
I don't think there is anything in the persistence manager that will prevent this from working as you want.
Can I ask what version of OC4J you are using?
I'm not sure from your email if you are you specifying the fields in the finder method by surrounding them with SQL style quotes as in 'A%'? You shouldn't need to do that if you are.
I just tested it out with a simple client and entity bean based on the employee table, which I created in about 30 seconds with the new JDeveloper CMP Entity Bean Wizard, using the create from existing table option.
I added a finder method that looks like the following:
Collection findByEnameAndJob(String ename, String job) throws RemoteException, FinderException;
And then changed the SQL in the finder dialog (or orion-ejb-jar.xml) for the finder to be
<finder-method partial="False" query="select * from emp where $ename like $1 and $job like $2">
<method>
<ejb-name>Emp</ejb-name>
<method-name>findByEnameAndJob</method-name>
<method-params>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
</method-params>
</method>
</finder-method>
The client code then looked for employees with a name starting with the letter A and whose job started with the letters CL as follows:
Collection coll = empHome.findByEnameAndJob("A%","CL%");
System.out.println("*** There were : " + coll.size() + " records returned ***");
Iterator iter = coll.iterator();
while (iter.hasNext())
emp = (Emp)iter.next();
System.out.println("empno = " + emp.getEmpno());
System.out.println("ename = " + emp.getEname());
When the client was run, this was the resulting output:
*** There were : 1 records returned ***
empno = 7876
ename = ADAMS
job = CLERK
mgr = 7788
hiredate = 1987-05-23 00:00:00.0
sal = 1100
comm = 0
deptno = 20
If you want to find all the entries that have a job that starts with CL you can even use the same finder method like:
Collection coll = empHome.findByEnameAndJob("%","CL%");
This results in the output
*** There were : 4 records returned ***
empno = 7369
ename = SMITH
job = CLERK
mgr = 7902
hiredate = 1980-12-17 00:00:00.0
sal = 800
comm = 0
deptno = 20
empno = 7876
ename = ADAMS
job = CLERK
mgr = 7788
hiredate = 1987-05-23 00:00:00.0
sal = 1100
comm = 0
deptno = 20
empno = 7900
ename = JAMES
job = CLERK
mgr = 7698
hiredate = 1981-12-03 00:00:00.0
sal = 950
comm = 0
deptno = 30
empno = 7934
ename = MILLER
job = CLERK
mgr = 7782
hiredate = 1982-01-23 00:00:00.0
sal = 1300
comm = 0
deptno = 10
I can send you the packaged EAR file if you want to try this simple example for yourself - or you I would even encourage you to grab JDeveloper 9i and see how it easy it makes it to build and test the example I was just working with.
cheers!
-steve

Similar Messages

  • CMP Custom Finder Method Problem

    Hi everybody,
    I have a problem about CMP Custom Finder Method.
    I made CMP Entity Bean and deployed.
    Then, I updated finder section in orion-ejb-jar.xml to add my custom finder query.
    Here is updating finder section in my orion-ejb-jar.xml.
    <finder-method query="(($schStartDate &lt;= TO_DATE($1,'MM-DD-YYYY a HH:MI') and $schEndDate &gt;= TO_DATE($1,'MM-DD-YYYY a HH:MI')) or ($schStartDate &lt;= TO_DATE($2,'MM-DD-YYYY a HH:MI') and $schEndDate &gt;= TO_DATE($2,'MM-DD-YYYY a HH:MI'))) and ($schRoom = $3)">
    <!-- Generated SQL: "......" -->
    <method>
    <ejb-name>RoomSchedule</ejb-name>
    <method-name>findBySchDateAndRoom</method-name>
    <method-params>
    <method-param>java.lang.String</method-param>
    <method-param>java.lang.String</method-param>
    <method-param>java.lang.String</method-param>
    </method-params>
    </method>
    </finder-method>
    <resource-ref-mapping name="jdbc/OracleDS" />
    And, i restarted oc4j. so, oc4j redepoyed CMP bean.
    But, when my client program called CMP Bean, lookup() was ok, but calling findBySchDateAndRoom() was bad.
    I couldn't get any result collection.
    Here is my client code.
    Context ctx = new InitialContext();
    Object ref = ctx.lookup("RoomSchedule");
    roomScheduleHome = (RoomScheduleHome) PortableRemoteObject.narrow(ref, RoomScheduleHome.class);
    String startDT = new String("07-30-2002 am 10:30");
    String endDT = new String("07-30-2002 pm 05:20);
    String roomID = "TEST";
    Collection roomAllSch = roomScheduleHome.findBySchDateAndRoom(startDT, endDT, roomID1);
    Iterator roomSchItr = roomAllSch.iterator();
    int schQty = 0;
    while (roomSchItr.hasNext()) {
    roomSchedule = (RoomSchedule) roomSchItr.next();
    if(roomSchedule.getStatus().equals("A"))
    schQty++;
    After excuting above code, schQty was still zero!!
    Because Collection roomAllSch had not any items.
    But, table ROOMSCHEDULE had 30 records which were same query condition in my database.
    I traced SQL statement using P6Spy Class.
    Here is spy.log.
    1028006337814|10|0|statement|select * from RoomSchedule where ((RoomSchedule.schStartDate <= TO_DATE(?,'MM-DD-YYYY A.M. HH:MI') and RoomSchedule.schEndDate >= TO_DATE(?,'MM-DD-YYYY A.M. HH:MI')) or (RoomSchedule.schStartDate <= TO_DATE(?,'MM-DD-YYYY A.M. HH:MI') and RoomSchedule.schEndDate >= TO_DATE(?,'MM-DD-YYYY A.M. HH:MI'))) and (RoomSchedule.schRoom = ?)|select * from RoomSchedule where ((RoomSchedule.schStartDate <= TO_DATE('7-30-2002 ?@@| 01:00','MM-DD-YYYY A.M. HH:MI') and RoomSchedule.schEndDate >= TO_DATE('7-30-2002 ?@@| 01:00','MM-DD-YYYY A.M. HH:MI')) or (RoomSchedule.schStartDate <= TO_DATE('7-30-2002 ?@HD 12:00','MM-DD-YYYY A.M. HH:MI') and RoomSchedule.schEndDate >= TO_DATE('7-30-2002 ?@HD 12:00','MM-DD-YYYY A.M. HH:MI'))) and (RoomSchedule.schRoom = 'Earth')
    1028006337824|10|0|statement|select RoomSchedule.schTitle, RoomSchedule.schStartDate, RoomSchedule.schEndDate, RoomSchedule.schDayAll, RoomSchedule.status, RoomSchedule.schRoom, RoomSchedule.reqUser, RoomSchedule.apprUser, RoomSchedule.purpose, RoomSchedule.relatoinID, RoomSchedule.schDesc, RoomSchedule.reqDate, RoomSchedule.apprDate from RoomSchedule where (RoomSchedule.schID = ?)|select RoomSchedule.schTitle, RoomSchedule.schStartDate, RoomSchedule.schEndDate, RoomSchedule.schDayAll, RoomSchedule.status, RoomSchedule.schRoom, RoomSchedule.reqUser, RoomSchedule.apprUser, RoomSchedule.purpose, RoomSchedule.relatoinID, RoomSchedule.schDesc, RoomSchedule.reqDate, RoomSchedule.apprDate from RoomSchedule where (RoomSchedule.schID = 0)
    As you see it, two query statement were executed.
    First query statement was ok and got some result records.
    But, second query statement was bad so didn't get any result records.
    I didn't understand why second query statement was executed.
    When roomAllSch.iterator() was being excuted in my client program, second query statment was executed.
    I couldn't believe....
    What's wrong? Please help me....
    OC4J : Version 9 Release 2
    Database : Oracle 8i
    OS : Windows 2000 Professional

    I created CMP of EJB 1.1, I wanted to add a finder
    there, but it didn't work.
    the error message is:
    "AccountEJB_vkbo0d_HomeImpl.java":
    AccountEJB_vkbo0d_HomeImpl should be declared
    abstract; it does not define findBySalary(float) in
    AccountEJB_vkbo0d_HomeImpl at line 11, column 1I think I don't remember CMPs having finder methods anything other than abstract. The code goes in the deployment descriptor. I hope you atleast got that right.
    Richard.

  • Does Oracle have Extended Stored Procedure like SQL Server and Sybase?

    Hi, i am new to Oracle. I want to know if...
    Does Oracle have Extended Stored Procedure like SQL Server and Sybase?
    If it does not have, then how can i call outside program written in C or JAVA from the Database stored procedure or trigger?

    refer to this link on external procedures
    http://download-west.oracle.com/docs/cd/A87860_01/doc/server.817/a76956/manproc.htm#11064

  • CMP and Finder methods

    I've got a table:
    id number primary key,
    name varchar2(50),
    price number
    How can i make finderXXX for this sql query:
    select * from table where name like 'beer' and price > 10;
    Thank's

    gday Max -
    For this, you'll need to make some a slight modification to the generated finder methods.
    Say you create an entity called Drinks which has the same structure as the table you provide as an example (and can I just say, what a great example you chose ;)
    It should go something like this - note, I've not tried this but this is what you need to look at doing:
    In the Home interface (DrinksHome) create a findermethod that looks like:
    public Collection findByName(String name, Double Price) throws RemoteException, FinderException;
    * note we make the return type a collection since it's possible that you may get more than one entity returned.
    Go ahead and deploy your EJB.
    When you deploy your EJB, OC4J will generate a finder method for this method for you.
    Now what you need to do is to modify the generated XML deployment descriptor to tune the query if you will.
    OC4J generates the deployment descriptor info it needs for an application in $OC4J/application-deployments.
    Go to to $OC4J/application-deployments/<app-name>/<ejb-name> where app-name and ejb-name are specific your deployed EJB.
    Open the orion-ejb-jar.xml file. This is the file OC4J uses to describe the deployed beans.
    Search through the file until you find the <finder-method> tag.
    Amend the query attribute of the finder-method tag to reflect the where clause of the query you want to execute:
    query="$name = $1 AND $price > $2"
    Now go to the generated SQL string and add the corresponding SQL where condition, using a ? in place of the actual value of the query string above
    It would become something like ...
    < !-- Generated SQL: "select drinks.id, drinks.name, drinks.price from drinks where drinks.name = ? AND drinks.price > ?" -->
    Note that in this query, the where clause matches the query you specified, but you omit the actual values.
    Check the method-params defined for the find below and ensure that the order of them lines up with the values you've specified in the finder query.
    Stop OC4J and restart it and the new finderMethod should come into effect.
    Give that a try and see how you go.
    cheers!
    -steve-
    null

  • CMP bean : 'create' method fails - SQL Syntax error

    I'm using SilverStream 3.7.3 server on Win 2K.
    In a CMP entity bean, call to any create method ( default using primary key or with any other list of parameters ) fails , giving this error :
    javax.ejb.CreateException: [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
    <<no stack trace available>>
    I've doubly checked for mismatch between types of database columns & parameters passed, but there is no difference. ( Another BMP bean uses same types and it's working perfectly )
    Interestingly, the 'finder' & other business methods are working without any problem.
    Any idea about cause of this error / options to solve / get around the prob?
    TIA,
    Subodh

    Hi,
    See if you can get SilverStream to give you the JDBC statements it is sending to Access. If SilverStream can't do that, try using P6Spy to get hold of the JDBC. Once you have the SQL, you should be able to figure out where the prolbem is... and if you can do anything about it.
    Does access actually accept any form of Standard SQL?
    Daniel.

  • EJB CMP finder methods

    The Oracle documents suggests that the following definition in the EJBHome is enough to create a finder method
    public Enumeration findByWhere(String where) throws RemoteException, FinderException;
    I get a java.lang.AbstractMethodError on the client when I try to call this - suggesting the the container is not implementing the method for me.
    I see no place in the oracle descriptor to define these finder methods.
    What is the deal with these ? How does one use CMP and Finder methods other than the standard "findByPrimaryKey(....)
    thanks
    null

    Hello,
    Let say you don't want to uyse the defualt finder methods, then you can write your own like:
    (in client servlet/JSP file etc..)
    emps = home.findByLast_name(request.getParameter("searchText")); //find by last name
    where:
    step 1) go to EJB class editor (under your main EJB directory)
    step 2) click on finder tab and click add, to add new finder methods
    step 3) (you can click help now to get more info on this..anyways) findBy<CMB field>
    would automatically check the "Managed by OC4j" check box, this means that you have matched a signature tag for finders (kind of like setXX and getXX if you are doing JavaBean...automatically done for you)
    step 4) else you can make one that is not up like findWildCard(String wildCard):
    i)by specifying the Method name to be: findWildCard
    ii)parameter (String type: wildCard)
    step 5) rebuild the EJB directory after you add this method
    step 6) use it in any of you client servlet/JSP as you would with the defualt findAll() methods etc..
    cheers,
    -Long
    [email protected]

  • Does final method works like a inline function???

    Hi,
    in c and c++ we have macro and inline functions.
    In java u can not override final methods but My query is
    Does in java final methods wroks like inline methods ?
    Inline means the method call is replaced by method body at compile time so logically it improves the performance.
    I would like to know if final method works like an inkine method up to what extend it really improves the performance.
    Thanks in advance

    It depends.
    In Java it's mostly the VM (the JIT compiler, to be more exact) that handles the optimization. It may or may not inline methods, depending on which gives better performance.

  • Custom finder methods

    I'm tring to deploy an Entity bean (CMP) with custom finder method that gets a parameter.
    I encountered two problems :
    1) defining the query in the deployment descriptor coased the app server to generate the a query without the where cloase - this was fixed by changing manualy the orion-ejb-jar.xml in the application-deployments directory.
    2)the second, and yet unresolved problem, is that OC4J doesn't bind the parameter that the query uses during runtime. I'm recieving an ORA msg that claims that not all the parameters are binded.

    see sample code
    http://otn.oracle.com/sample_code/tech/java/oc4j/htdocs/oc4jsamplecode/oc4j-demo-ejb.html
    also there should be a section in our documentation about cmp custom finder methods. oc4j attempts to generate custome finder methods based on home interface
    <finder-method query="$empNo = $1">
    <method>
                             <ejb-name>EmployeeBean</ejb-name>
                             <method-name>findByEmpNo</method-name>
                             <method-params>
                                  <method-param>java.lang.Integer</method-param>
                             </method-params>
                        </method>
                   </finder-method>

  • CMP Entity Bean with ejb-ql finder methods and INFORMIX database

    Hi,
    I have some CMP Entity Beans with finder methods defined in ejb-ql. In my ejb-jar, within <entity> definitions I have something like:
        <entity>
          <abstract-schema-name>BeanName</abstract-schema-name>
          <cmp-field><field-name>fieldOne</field-name></cmp-field>
          <cmp-field><field-name>fieldTwo</field-name></cmp-field>
          <query>
            <query-method>
              <method-name>findAll</method-name>
              <method-params></method-params>
            </query-method>
            <ejb-ql>SELECT OBJECT(o) FROM BeanName o</ejb-ql>
          </query>
        <entity>
    And in persistent.xml:
    <db-properties>
         <data-source-name>datasource_name</data-source-name>
    </db-properties>
    <entity-bean>
         <ejb-name>BeanName</ejb-name>
         <table-name>table_name</table-name>
         <field-map key-type="NoKey">
         <field-name>fieldOne</field-name>
         <column><column-name>column_one</column-name></column>
          </field-map>
         <field-map key-type="NoKey">
         <field-name>fieldTwo</field-name>
         <column><column-name>column_two</column-name></column>
          </field-map>
          <finder-descriptor>
              <method-name>findAll</method-name>
              <method-params/>
         </finder-descriptor>
    Once deployed, on server side, I can found a java source file (with corresponding compiled class file) in path:
    j2ee/cluster/server0/apps/companyName/MyEARApp/EJBContainer/temp/temp38837373733/route/to/package/
    with names:
    BeanName0_0pm.java
    BeanName0_0PM.class
    and the generated java file contains this code:
      public java.util.Enumeration ejbFindAll() throws javax.ejb.FinderException, javax.ejb.EJBException  {
        TransactionContext tc = pm.getTransactionContext();
        Connection conn = null;
        PreparedStatement pSt = null;
        ResultSet ejb_rs = null;
        int status = javax.transaction.xa.XAResource.TMSUCCESS;
        try {
          conn = pm.getConnectionForFindMethod();
          pSt = conn.prepareStatement("SELECT \"O\".\"COLUMN_ONE\",\"O\".\"COLUMN_TWO\", FROM \"TABLE_NAME\" \"O\"");
          ejb_rs = pSt.executeQuery();
    I'm trying to call this method but it throws a SQLException when preparing the statement.
    It seems that Informix does not like this SQL syntax because of upper case names, doble quotes on table alias, or something else.
    When editing persistent.xml in netweaver, I can define the element <datasource-vendor> as ORACLE, SAPDB, MS_SQL_SERVER, DB2_UDB_AS400 or DB2_UDB_OS390 but INFORMIX is not an accepted value.
    Is there any way to define how this SQL query is build?
    Thanks in advance.

    The return type of the finder method defined in the remote home interface is either the entity bean's remote interface or a collection of objects implementing the entity bean's remote interface. The return type of the finder method defined in the local home interface is either the entity bean's local interface or a collection of objects implementing the entity bean's local interface

  • Finder methods for CMP beans

    We do not implement finder method in Bean class for CMP. As such, where do we implement finder methods such as findInRange() method? How does the container implement my custom "find" methods.
    Thanks

    Using CMP 2.x, your custom finder and select methods are implemented by the container based on the EJB QL query you provide in the ejb-jar.xml. In CMP 1.1, there was no portable way to express the semantics of the query, so most vendors had a vendor-specific syntax for describing the query.
    See chapter 27 of the J2EE 1.4 Tutorial for some examples of using EJB QL :
    http://java.sun.com/j2ee/1.4/docs/tutorial/doc/index.html
    --ken
    Kenneth Saks
    J2EE SDK Team
    SUN Microsystems

  • Using wildcards in custom find methods with CMP beans

    Hi,
    I'd like to create a custom find method called findByName which accepts a string. I'd typically want to use the string in a '%<name>%' scenario, where the user needn't type in the whole name. Does anybody know what the partial query should look like? I'm not sure how to concatenate the '%' symbol to the string taken in.
    Thanks in advance
    Gillian

    Gillian-
    Bind variables are of the form $1, $2, etc., so try using a query stmt like this:
    select * from YOURTABLE where name like '%$1%'
    Regards,
    -Jon

  • Finder Methods - Does xmlbeans support this?

    Finder Methods - Does xmlbeans support this?
    Hi,
    Q1 - Is there currently a mechanism via generated xmlbeans java classes to
    find specific data required (from within the java generated methods
    provided). For example assuming in the following xml (see below) if one has
    already loaded the <main-item> via xmlbean generated java classes, but then
    wishes to find the appropriate configs/config within this section of the xml
    (i.e. the main-item entry "config" is a reference to one of the "config"
    items under "configs") , does XMLBeans currently support this? That is, it
    would be nice to have finder methods on the generated java classes so once
    you have a <configs> java instance you can issue a finder method for a
    <config> item and pass the <config-name> in. For example:
    What is available: MainXML.getConfigs().getConfig(23) -> i.e. put in
    index,
    However what about: MainXML.getConfigs().findConfig ("mainConfig");
    Q2 - If there is no support for this within the generated java classes what
    is recommended? Via xpath? Have to write your own short java finder classes
    which iterate through until the item is found?
    ATTACHMENT - XML REFERED TO
    ============================
    < MainXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="xxx.xsd">
    <configs>
    <config>
    <config-name>mainConfig</config-name>
    <report_width>1</report_width>
    </config>
    <config>
    <config-name>testConfig</config-name>
    <report_width>0</report_width>
    </config>
    </configs>
    <main-config>
    <main-item>
    <itemName>TestItem</itemName>
    <config>mainConfig</config>
    </main-item>
    </main-config>
    </sns_config>
    Cheers
    Greg

    thanks Steve
    "Steve Traut" <[email protected]> wrote in message
    news:[email protected]...
    Hello Greg,
    To my knowledge, the reference-specific kind of function you're asking for
    isn't supported. But if you're writing code on WebLogic Platform 8.1, you
    can use XPath/XQuery to accomplish this. Incidentally, your XML belowopens
    with MainXML and closes with sns_config, but I'll assume it's MainXML.
    To retrieve a main-config/main-item/config element when you know the
    config-name element's value, you could use the following expression (where
    the mainXml variable is a MainXMLDocument instance):
    String queryExpression = "$this/MainXML/configs/config[config-name=
    'mainConfig']";
    ConfigType[] configs =
    (ConfigType[])mainXml.selectPath(queryExpression);
    The configs array would contain one item in this case. The second linewould
    throw a class cast exception if no results were returned.
    Note that XPath predicates aren't supported in XMLBeans outside thecontext
    of WebLogic, but simple path expressions are.
    Steve
    "greg" <[email protected]> wrote in message news:1074728633.92236@ns1...
    Finder Methods - Does xmlbeans support this?
    Hi,
    Q1 - Is there currently a mechanism via generated xmlbeans java classes
    to
    find specific data required (from within the java generated methods
    provided). For example assuming in the following xml (see below) if onehas
    already loaded the <main-item> via xmlbean generated java classes, butthen
    wishes to find the appropriate configs/config within this section of thexml
    (i.e. the main-item entry "config" is a reference to one of the
    "config"
    items under "configs") , does XMLBeans currently support this? That is,it
    would be nice to have finder methods on the generated java classes so
    once
    you have a <configs> java instance you can issue a finder method for a
    <config> item and pass the <config-name> in. For example:
    What is available: MainXML.getConfigs().getConfig(23) -> i.e. putin
    index,
    However what about: MainXML.getConfigs().findConfig ("mainConfig");
    Q2 - If there is no support for this within the generated java classeswhat
    is recommended? Via xpath? Have to write your own short java finderclasses
    which iterate through until the item is found?
    ATTACHMENT - XML REFERED TO
    ============================
    < MainXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="xxx.xsd">
    <configs>
    <config>
    <config-name>mainConfig</config-name>
    <report_width>1</report_width>
    </config>
    <config>
    <config-name>testConfig</config-name>
    <report_width>0</report_width>
    </config>
    </configs>
    <main-config>
    <main-item>
    <itemName>TestItem</itemName>
    <config>mainConfig</config>
    </main-item>
    </main-config>
    </sns_config>
    Cheers
    Greg

  • Binary Data Type in finder methods for CMP beans

    How to write an equivalent ejb-ql query in ejb-jar.xml for a finder method accepting
    a byte array as a parameter. The finder method is for a cmp-field mapped to a
    database field with binary data type

    Using CMP 2.x, your custom finder and select methods are implemented by the container based on the EJB QL query you provide in the ejb-jar.xml. In CMP 1.1, there was no portable way to express the semantics of the query, so most vendors had a vendor-specific syntax for describing the query.
    See chapter 27 of the J2EE 1.4 Tutorial for some examples of using EJB QL :
    http://java.sun.com/j2ee/1.4/docs/tutorial/doc/index.html
    --ken
    Kenneth Saks
    J2EE SDK Team
    SUN Microsystems

  • How to implement find methods in CMP?

    As OC4J does not support EJB-QL, we need to implement the find methods by ourselves. But how? Here is my thought.
    1) Still declare the find methods in EJB home, such as
    public Collection findBySponsor(String sponsorGuid);
    2) Do not add query part to ejb-jar.xml file;
    3) In the bean class, implement the find method using JDBC code.
    Does CMP allows explicit-implementation of finder methds?
    Does CMP allows explicit-call to JDBC code?
    Thanks,

    Henry -- Why go to that trouble? For the near term I would suggest that you just modify the generated
    orion-ejb-jar.xml descriptors which will include tags to allow you to either 1) enter a partial criteria or
    2) enter a complete SQL statement. This is much less work and when EJB-QL is available with the product,
    then you have to only add the EJB-QL to the ejb-jar.xml.
    Thanks -- Jeff

  • CMP beans, VCafe IDE and " finder-expression "

    I am building CMP beans, and am trying to make some finder methods.
    VCafe allows you to make the string for the "<finder-query>" element in
    the weblogic-cmp-rdbms-jar.xml, but I can't find UI to also add a
    "<finder-expression>" element to the finder-query. Am I just missing it
    somewhere, or why the omission?

    Using this will allow me to make the <finder-query> attrubute, but NOT any
    <finder-expression> attributes.....Or am I missing something? I am trying to
    have my finder pass in a PK object, but then use the public primative members
    of the PK object to compare to what is in the database. If I say
    findbyForeignKey(ForeignPK) and the database has a foreign_id column that
    contains a long, and the ForeignPK has a long as it's id, I can't use (= $0
    foreign_id). I get an error. The EJB Deployer tool allows you to add
    expressions like <number> 0, <expression> @0.id, <type> long, all along with
    the finder query. Does anyone know how to add the expression part of the
    query, not just the WLQL query itself, in VCafe?
    Nirav Chanchani wrote:
    Michael,
    I assume you are using WebGain Studio 4.0. The sequence is
    Project->Configure Deployment Descriptor->Target Options Tab->Finders Tab.
    Nirav.
    Michael SMith wrote:
    I am building CMP beans, and am trying to make some finder methods.
    VCafe allows you to make the string for the "<finder-query>" element in
    the weblogic-cmp-rdbms-jar.xml, but I can't find UI to also add a
    "<finder-expression>" element to the finder-query. Am I just missing it
    somewhere, or why the omission?--
    Nirav Chanchani
    BEA Systems, Inc.

Maybe you are looking for

  • How can I get rid of the auto fill on my facebook and yahoo mail username?

    When I go to type in my username on yahoo or facebook, it shows my username and others that I typed wrong. The problem with this is that one time I typed my password in there and now if someone gets on my computer they can find out what my password i

  • Error in BSP of LSOCP300 Business Package

    Hi community, I've deployed a business package LSOCP300 in my J2EE 6.40. I've activated a BSP service in Backend system (ECC 5.0) with BP LSOFE300 (Sap E-Learning Solution). On testing the BSP service,I've a "Raise Exceptions" on link "Training Activ

  • Combining Aperture Libraries

    I am running Aperture 3.0 on a macbook with about 1,000 images in it and have another library (about 5,000 pics) on an external hard drive.  Can someone advise on the best way to import the images from the external hard drive into Aperture on my macb

  • How to transfer a rent movie from the iphone 4 to the computer, how to transfer a rent movie from the iphone 4 to the computer

    i recently rented a movie in my iphone 4 but i have tried to passed it to my mac but i have failed i had read that it won't passed and i wanna know if anyone have resolve this problem i would like it to know

  • Embedding video player in TLF

    Hi Guys, Can we add a video player to a Richeditable text, if yes what is wrong in the code below? I can see it adds to the editor but soesnt show up <?xml version="1.0" encoding="utf-8"?> <!-- // Copyright (C) 2009 Rad3 Limited. // All Rights Reserv