Universal Entity EJB find/select method for single db table

Hi there.
I'm quite new in bea spheres and my question reflects my small knowledge:
Is there any way to perform "universal" sql query on single database table via find/select methods? This means, that I would like to pass whole WHERE clause to these methods, not just some fields values.
What do I mean?
Normally we define find/select method that looks like this one:
SELECT OBJECT(o) FROM Cities AS o WHERE population>=?1 AND state=?2
We call this a method this way:
finder1 (1000000, 'France')
Method returns collection with objects holding data about cities in France with more than 1000000 inhabitans..
But, I want to define method, that could be called this way:
finder1 ("o.population>=1000000 AND o.state='France'")
This method should be able to perform any query on 'Cities' database table.
I tried with defining find method for following query:
but it does not work, of course.
Is there possibility to define method that could be called this way?
I use Bea Weblogic Workshop 8.1 SP3
Message was edited by akla at Oct 23, 2004 5:21 PM

The 'Dynamic Query' feature of WebLogic 8.1's EJB container can help you here. This feature enables you to execute complete EJB QL queries that are constructed on the fly. Check the WebLogic 8.1 documentation for more details.

Similar Messages

  • Finder/Select methods and NetBeans 4.1

    Hi All,
    I'm implementing an EJB Module in NetBeans IDE 4.1 and I have some problems with finder/select methods of CMP EJBs.
    My problem is that i cant pass J2EE verify whene I add finder/select methods with parameters; Verifier Tool tell me It doesn't find query element corresponding ti method in DD.
    Does anyone face a similar problem?
    Thanks in advance.

    several people reported such problem and it seems emulator started working when they turned off CPU hyperthreading

  • Unable to find setter method for attribute:

    I am using Jboss jboss-4.2.3.GA, JDK 1.6.
    I am trying to deploy our application on Jboss. When loading sources page or whenever we try to load the taglib we are getting the following error.
    org.apache.jasper.JasperException: jspfile.jsp(67,1) Unable to find setter method for attribute: collection
    at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
    at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
    at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:148)
    at org.apache.jasper.compiler.Generator$GenerateVisitor.evaluateAttribute(Generator.java:2736)
    at org.apache.jasper.compiler.Generator$GenerateVisitor.generateSetters(Generator.java:2965)
    at org.apache.jasper.compiler.Generator$GenerateVisitor.generateCustomStart(Generator.java:2169)
    at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1689)
    at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1507)
    at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2338)
    at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2388)
    at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2394)
    at org.apache.jasper.compiler.Node$Root.accept(Node.java:489)
    at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2338)
    at org.apache.jasper.compiler.Generator.generate(Generator.java:3374)
    at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:210)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
    at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:316)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
    at com.ssmb.common.servlets.GenericControllerServlet.service(GenericControllerServlet.java:639)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
    at java.lang.Thread.run(Thread.java:619)
    The line corresponding in JSP file is ,
    <ssmb:list name="src_" collection="sources" showAll='<%= "" + true %>'>
    Please let me know if you have faced this issue before.

    Have you written this tag in a tld or a tag file?
    How have you declared the attribute "collection"?
    Does the class which implements the custom tag <ssmb:list> have a method in it: public void setCollection(String collection) ?

  • Where can I find the script for the sample table?

    Where can I find the script for the sample tables, like emp, dept, ... ?

    Where can I find the script for the sample tables, like emp, dept, ... ?

  • How to make select-option for one inner table

    Who can teach me to  make select-option for a inner table, which let select-option display data from this inner table.
    Thanks in advance.

    Is this what you are looking for?
    report zrich_0002.
    data: begin of itab occurs 0,
          matnr type mara-matnr,
          spras type makt-spras,
          maktx type makt-maktx,
          end of itab.
    select-options: s_matnr for itab-matnr.
    select-options: s_spras for itab-spras.
      select mara~matnr makt~spras makt~maktx
               into corresponding fields of table itab
                      from mara
                            inner join makt
                               on mara~matnr = makt~matnr
                                        where mara~matnr in s_matnr
                                          and makt~spras in s_spras.
      check sy-subrc = 0.
    Rich Heilman

  • How to write lead selection method for a  tree by nesting table column

    I have implemented a table with TreeByNestingTableColumn(To show the tree structure in the table).I am not able to get the selected row element in lead selection method.(I am able to get parent element.) .
    could anyone please tell me about this code?

    Follow the below steps to the solution for your problem
    1. Create Action "LeadSelection" in View with parameter (name : 'seletedItem'
    and type : I<your node>Element
    2. Bind this action to Table property "onLeadSelec"
    3. In wdModify()
         IWDTable table = (IWDTable) view.getElement("Your table id");
         table.mappingOfOnLeadSelect().addSourceMapping("nodeElement", "selectedEle");
    4. In onActionLeadSelection()
         wdComponentAPI.getMessageManager().reportSuccess("Selected Item : "+selectedEle.get<Your Node Attribute>());
    Let me know if you need more clarification

  • How to find the Datasources for the given table names ?

    Hi All,
    I have an urgent requirement where I ned to find the names of BW Datasources, created for the given table names.
    Both the tables and Datasources are in BW system only. I can see the table in SE11 but I am unable to find its associated Datasources in the 'Where Used List'.
    Is there any method ?
    Will assign points to satisfactory answers.

    Check this thread on how to find the DS.
    I have the field name, please help me find the data source.
    Once you identify your DS you find which all Data targets are fed by trying to see the " Show data flow" in RSA1 for this data source.
    Hope this helps.
    Edited by: Jitu Krishna on Apr 30, 2008 11:52 AM

  • How to change the score method for ses crawler table result?

    There is a customer urgent requirement,they want customize methods to score the result which come from database same table different column source for relevancy boosting.For example.there is a table t_table which have 3 column:name,short description,long description.Now i create 3 source for this table,every source has different content column.source 1's content column is name,source 2's content column is short description,source 3's content column is long description,is it possible for me to define the priority for those 3 source.For example,source 1 's priority is 50%,source 2 's priority is 30%,source 3 's priority is 20%.
    By the way,i wonder that exists a API to fetch the result set score attribute and primary key value?
    any advice is appreciate.

    Kevin, have replied via internal mailing list on this. There is an undocumented method for boosting relevance by section. It is considered experimental at the moment and the exact details may change before we include it as a standard feature.

  • Subject Area not showing for Single Logical Table Repository Schema

    I'm trying to create a very simple OBIEE repository schema for a sales proof of concept. The schema consits of a single physical table, single BMM (logical) table and a single presentation table.
    I have created all the layers OK. However, when I check for global consistancy i get an error message 'Logical table SALES_POC does not join to any other logical table'. Now i understand this error, but in this case this is how the design is intended. However, if ignore this error i'm not seeing the new subject area after bouncing BI server & BI presentation services.
    Anyone know a way round this, or do i need to have at least 2 logical tables?

    Yes I think RPD is in the correct folder & NQSConfig.INI is set correctly.
    RPD is called ethreeCustomv1.RPD & saved in /ora/biee/
    NQSConfig.INI has the following definition:
    BIEE = ethreeCustomv1.rpd, DEFAULT;
    [ CACHE ]
    ENABLE     =     NO;

  • Find the key for join between table "crhd" and "equi" for use field "answt"

    I make program for read data from table "crhd" for print  about machine report
    but I can not find the key for link join to table "equi" for print field "answt" (acquistion value)
    please help me  find the key field for join between table "crhd" and "equi" for use field "answt"
    thank you very much...

    This is how the Work Center is linked to a particular Equipment -
    Functional - In IE03 ( view Equipments) You see the Work Center of a particular Equipment.
    Technical - Go to view V_EQUI ( view of EQUI and EQUZ). Pass the Equipment number alongwith V_EQUI-PM_OBJTY = 'A' ( i,.e searching for the Object Type Work Center).  In this way u ll get the V_EQUI-GEWRK - this is the Work Center ID.
    You can pass this Work Center ID to CRHD. And you will get the Work Center text.
    CRHD-OBJTY = 'A'
    and u ll get the CRHD-ARBPL - this is the Work Center.
    So u need to come backwards, alongwith ur CRHD-OBJTY and CRHD-OBJID , you pass the same to V_EQUI and u get the list of equipment numbers alongwith ur ANSWT(Acquisition value).
    I guess it solves ur problem.

  • Standardise definition & selection method for ALL third party plugin presets!!!

    Over at LogicProHelp there is a very useful topic relating to Logic presets - in which many users have spent time saving individual third party plugin settings as LOGIC presets... which is enormously helpful when selecting instruments etc because they can be selected using a keystroke etc and found within the Logic Library browser window - which is of course searchable!
    These presets have then been uploaded to the forum for others to download.
    I posted on the topic recently and thought it worth mentioning over here on the Apple forum.
    Here's what I said - does anyone agree/disagree? Is this something that Apple should work on? For me it's a no brainer but I'd like to know what others think....
    "MO 3rd party instruments that rely on mouse-clicks or anything more than one button press to change a preset are incredibly badly designed. It's massively frustrating and impedes creative flow to have to use a mouse, or press several keyboard buttons just to move from one sound to another. Native Instruments interfaces are amongst the worst offenders - you even have to MANUALLY specify what presets you want to use with specific MIDI Program Change messages - because the latter are the only way I know of using anything other than the NI interface to change sounds in their plugins.
    The Logic Channel Strip settings saved along with 3rd party Plugin settings saved as Logic Presets have proved a recent revelation for me.
    Now I can change instrument presets using a keystroke, a midi message, almost anything I want.
    And then there's the Logic Library browser - now that so many sounds are saved as Logic Presets, the Logic browser window has become really powerful - being able to search my entire library for "bass" or a particular instrument name - REGARDLESS of which third party plugin is required to play the sound - IT JUST LOADS AND PLAYS!
    Maybe I'm in the minority but I think of a sound I want first, NOT which instrument I should load and then browse through - the latter is kind of backwards for me.
    I really think that we users should pressure Apple and plugin developers to provide Logic (and indeed other DAWs) presets with ALL of their products because the amount of effort on their part is minimal compared with countless end-users doing this task manually over and over. The current situation is ridiculous.
    DAWs are incredibly powerful these days but the lack of a plugin preset/sound library definition standard is quite crippling to work flow.
    I mean if there were a STANDARD LIBRARY DEFINITION such as with Native Instrument libraries or Apple loops where sounds are defined universally and supplied as such in a common preset it would revolutionise sound discovery/selection within DAWs.
    Kind of like a document management system that applies to ALL plugins, by ALL developers and the installer for a plugin would then add all its presets to the management system/common library"

    Sid Merrett wrote:
    Can you give me an example of a plugin that doesn't work with the Logic save preset function?
    Sure, I could give you lists of plugins for each of those particular scenarios I addressed.
    In that specific case, for one example, Spectrasonics instruments for a few years did not support the hosts' save/recall settings function (at least in Logic), and when contacting them and asking why Stylus RMX could not recall settings saved via Logic's preset system I was given the explanation that it wasn't supported for technical reasons.Basically, it only save/recalled a small handful of settings, the rest were lost, meaning it was impossible for quite some time to use the Logic's save/load settings feature to save user presets, you had to use the plugin's own internal save features. (Yes, the instrument's state was saved in the song, but *wasn't* able to be saved via the preset handling, for technical reasons).
    A year or so later, and later Logic versions, they finally got round to making it work as the varioous parts of the host and instruments were upgraded to handle larger data requirements. Spectrasonics instruments are examples of instruments with very specific, custom browser features, many of which you lose if you save data using Logic's functionality - not to mention the effort of saving, naming and organising 8000+ patches per instrument. Plus you have many levels of data - you often load a loop into a part, and a part into a group of parts, and they are different types of data. The hosts save/load feature only saves the state of the plugin - it can't be used to load Loop 14 into part 2, for example. It's the whole plugin, or nothing. More workarounds in terms of how you organise your loading/saving of different types of data.
    There are other instruments too, and ones I've beta tested where I've got into the technical details and had to have the preset format changed or simplified because hosts had difficulties storing the data correctly. It's quite a complex thing, in the main, and different instruments implentation of preset handling mean that the whole thing is full of workarounds, compromises, or plain failure to use the feature completely.
    Other instruments, such as Minimonsta, lose functionality when saving via the host - for example, you only get the meta patches and patch morphing functions when saving via the plugin's own file format, and that stuff doesn't happen when saving via the host.
    I could go on and on about this - every develop has different requirements and they mostly all either do it very basically and rely on the host, or bypass the hosts save/load functionality and implement their own which they can be in control of and that will work across hosts and across platforms. For instance, there is little point having a beautifully organised Oddity library if all those sounds are now unavailable to me if I choose to work in Live...
    That's why the whole preset thing is a complicated mess and isn't liable to be sorted soon.
    There is a developer over on the PC trying to make a system to unify this stuff between plugins - it's PC only right now, and I forget the details this second, but it's acknowledgement that people recognise this whole thing is a mess and looking at ways to improve the situation.
    Sid Merrett wrote:
    I hadn't spotted that - thanks. You can't use the Logic Library window to search for Plugin Settings, only Channel Strip Settings.
    You *can* use it to search for plugin presets, but only within the context of a single plugin. Ie, if I select the ES2, I can see, and search, the ES2 plugin settings. But often I want "a bass sound", I don't necessarily know that I was an "ES2 bass sound", or a "Minimonsta bass sound" or whatever.
    The point being, I just want a sound that will work, and I don't know where it will come from. Forcing me to choose and instrument first can be counter productive. How many times have you needed a sound, and you go "Ok, there might be something in pluginX that'll work?" - you load up pluginX, flip through the sounds, don't find anything useful, then go "Ok, let's try pluginY", no... pluginZ etc etc
    I miss Soundiver in many ways. *Ideally*, I'd like one central method of storing my presets which will work cross-plugin, cross-host, cross-format and cross-platform that is a standard that all developers and hosts support, and that offers the main core features that developers need, from simple, single patches with names, up to full meta data, cataloging, organising, author and notes tagging and so on. You can still give the users a choice to use the individual plugin and individual plugin's gui for patch selection, but you can get far more standardised if you want, with the advantages that gives - and you don't have to export patches into the system, as it's developer supported, all presets for your instruments would be instantly available in the library, just as they are in the instrument directly.
    But it's difficult to get developers to agree on much, these days - the most likely thing to happen is someone somewhere creates a cross-platform standard for this that gains momentum and that developers and hosts want, or *need* to support.

  • Select query for single record

    hi all,
    i am working for script which is letter.
    i had to extract the fields as shown in the code. from two tables i had to extract single record. and pass this values to script.i developed the code. wen i execute the code its going to dump. can any body help me.
    PARAMETERS : p_vbeln LIKE vbak-vbeln.
    Data : name like kna1-name1.
    Data: begin of wa_vbak ,
           end of wa_vbak.
    Data: begin of wa_final,
           end of wa_final.
           Select single vbeln
                         smenr from vbak
                         into wa_vbak where vbeln = p_vbeln.
        If sy-subrc = 0.
           Select single name1 from kna1 into name  where kunnr  =  wa_vbak-kunnr.
        If sy-subrc = 0.
          Move wa_vbak-vbeln to wa_final-vbeln.
          Move wa_vbak-netwr to wa_final-netwr.
          Move wa_vbak-bstdk to wa_final-bstdk.
          Move wa_vbak-kunnr to wa_final-kunnr.
          Move wa_vbak-smenr to wa_final-smenr.
          Move name to wa_final-name1.
        write:/10 wa_final-vbeln, 20 wa_final-netwr.

    Make sure that field names(itab) are same as database tables.
    The modified code is as below:
    PARAMETERS : p_vbeln LIKE vbak-vbeln.
    Data : name like kna1-name1.
    Data: begin of wa_vbak ,
    end of wa_vbak.
    Data: begin of wa_final,
    end of wa_final.
      T_wa_vbak like standard table of  wa_vbak.
    Select single vbeln
    smenr from vbak
    into <b>CORRESPONDING FIELDS OF TABLE T_</b>wa_vbak where vbeln = p_vbeln.
    If sy-subrc = 0.
    Select single name1 from kna1 into name where kunnr = wa_vbak-kunnr.
    If sy-subrc = 0.
    Move wa_vbak-vbeln to wa_final-vbeln.
    Move wa_vbak-netwr to wa_final-netwr.
    Move wa_vbak-bstdk to wa_final-bstdk.
    Move wa_vbak-kunnr to wa_final-kunnr.
    Move wa_vbak-smenr to wa_final-smenr.
    Move name to wa_final-name1.
    write:/10 wa_final-vbeln, 20 wa_final-netwr.
    Rama chary.Pammi

  • Add to Selection Fails for Single Row/Column

    Has anyone encountered this. Making additions to selections with the Rectangular and Elliptical Marquee tools works fine. However it fails with both single row and single column marquee tools. This was doable with my previous version of Photoshop but fails on CS4.  I'm running CS4 64 bit on Windows 7.

    Yes I did
    However this was evidentially some sort of temporary insanity on the part of PS.
    I just a short while ago shut down PS and reopened it and abracadabra the problem disappeared.
    Of course this isn't the first time that shutting down and restarting PS has "fixed" some problem I was having.

  • Simplest method for single PW entry to a web page

    I have a website and would like to make a single web page
    accessible to those who know a single password. What is the
    simplest way to set this up? Even though I created the website, I
    have a very limited knowledge of Dreamweaver because I use it but
    once a year and have to learn it over each time. If you could point
    me to a site showing how to do this I would be very

    That would only be true when you are hosted on *nix.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    - Template Triage!
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    - Macromedia (MM) Technotes
    "Raizel" <[email protected]> wrote in message
    news:e5gea3$shl$[email protected]..
    > In article <e5gc3b$rln$[email protected]>,
    > "ackerberg" <[email protected]> wrote:
    >> I have a website and would like to make a single web
    page accessible to
    >> those
    >> who know a single password. What is the simplest way
    to set this up?
    >> Even
    >> though I created the website, I have a very limited
    knowledge of
    >> Dreamweaver
    >> because I use it but once a year and have to learn
    it over each time. If
    >> you
    >> could point me to a site showing how to do this I
    would be very grateful.
    > To have password protected areas on your domain you need
    > capability from your host. And, it's usually a directory
    that's blocked
    > (which could be only 1 page). How will visitors get the
    password? Pick
    > their username/password? You issue? Those determine what
    you need to
    > protect the page.

  • Unable to find setter method for attribute: forceIdIndexFormula

    When I try to use advanced dataTable tag and in particular the given property - I get the error.
    What could it be?

    In older versions of my faces "forceIdIndexFormula" , is not defined. So it errors out when u try to use it, since it doesnt know what forceIdIndexFormula is all about.
    When u try to assign a value to a attribute it will call its corresponding setter method. Since it is not found it errors out.
    The solution is you have to make use of the latest myfaces version which supports the forceIdIndexFormula attribute in the datatable.

Maybe you are looking for