What does the maxElements attribute do on the Finder Annotation

I have a Container Managed Bean that uses the Weblogic 9.1 Annotations, in particular the finder annotation. The following is the query I am running:
@Finder(signature = "Collection findPreviousItemByKey
(Integer itemId)",
ejbQl = "select OBJECT(o) from ItemEJB as o where o.itemFinishDate < " +
"(select r.itemFinishDate from ItemEJB as r where r.key =?
1)ORDER BY o.itemFinishDate desc", maxElements = "1")
This query could potentially return a lot of data we only want the first item (which is the previous item of the key passed in) in the collection.
What is the most efficient way of getting the first item: 1) using the maxElements attribute of the finder
OR
2) getting the entire collection back and using an iterator to take the first one.
Any info would be great.
Thanks,
Ian

see
@ejbgen:entity Annotation
go to
http://edocs.bea.com/workshop/docs81/doc/en/core/index.html
see
max-beans-in-cache
Set it to 1
See also
@ejbgen:finder Annotation
- group-name
- max-elements
set it to 1 or to desired
optional:
Add to a group the desired cmp fields, if u don't want to display all the columns.
After the exec. of the findMethod u should have 1 Object, one EJB inst., in your Collection, and furthermore only the desired DB table columns

Similar Messages

  • What does "The Finder can't complete the operation because some data in ".DS_Store" can't be read or written. (Error code -36)" mean?

    Why can't I copy from my WD MyPassport, external, 2TB drive?  The message I get is that

    It means that the drive has malfunctioned. Back up as much of the data on it as you can. You can try repairing the volume in Disk Utility, but the drive is suspect, even if the repair succeeds. If you ever have problems with it again, replace it.

  • I was playing with my ipad settings (it's an older model) and noted in the advanced settings of Safari there was a place to view website databases.  When I clicked on this I saw websites.  How do these get there and what does the space amount mean?

    I was playing with my ipad settings and noted in he advanced settings of Safari there was a place to view "website databases".  When I selected this I saw a multitude of websites.
    Can anyone tell me how these get there?  Can a website be posted even if it was never went to?  What does the space amount mean?  For example, 1.5 kb...is this quite a bit?  Would it indicate someone has gone to a site multiple times?
    I share my ipad with my teenage daughter and I'm trying to find out if she's lying to me.  Obviously she's swearing that she has "no idea" how these got there and I'm trying to keep her safe (she's only 14).
    Thanks everyone.
    Concerned Mom

    Think of your PC and the 'temporary internet folder' where it keeps cached copies of web pages or elements off a web page for 'quicker display the next time you visit'. That's pretty much what that folder is. 1.5K is tiny. Probably just a basic page with some text on it. (you might be confusing 1.5K with 1.5 megabyte....megabyte is large...it's roughly 1000 kilobytes, so the 1.5K is a tiny file)
    As far as I know, the only way info gets into that folder is if the browser has been to that site.
    if you have a concern there are browsers out there, McGruff is one i've seen recommended, that allow some degree of parental control and supervision. That or you could passcode lock the iPad or enable the restrictions to turn off some parts of the device to have some control.

  • What does the open file dialog do 'under the hood' and is there a way to simulate it

    What does the open file dialog do 'under the hood' and is there a way to simulate it?
    I have a bug in my code (that I've posted about before, here) which I can't fix at the moment, but I do have a workaround.
    Briefly, the bug:
    I call a dll from a function node, to initialise and run a spectrometer. If I start up the PC, LabVIEW and run my vi the code runs without complaint, the first call to the dll to initialise the spectrometer doesn;t return an error but the spectrometer is not detected either.
    I've tried various solutions, see the link above, and none work
    The workaround:
    If, at any time before running the code containing the function node I open an 'open file' dialog window, select the dll and click ok/hit enter then everything is fine. When I run the main code the spectrometer is detected.
    I use an express vi to open the file dialog, I specify the start path and file name as constant inputs and just click ok/hit return when the dialog pops up. I don't do anything with the dialog outputs. In fact the vi that contains the open file dialog can be run before the project containing the bug is even open.
    I have to do this everytime I turn the PC on.
    So, either
    1) Can somewone suggest a fix for the original bug?
    2) What is the easiest way to simulate the enter keypress when the open file dialog pops up
    or
    3) Can someone tell me what the open file dialog does under the hood that somehow causes the dll to work and can it be simulated in straight LabVIEW
    I suspect that the dll itself is dodgy ( I have in the past talked to the supplier but not got very far, and I will try again but I would like a quick, temporary solution too). I'm guessing that the file dialog is making some kind of check on the file, and possibly registering its presence with the OS (winXP). I tried using the file/folder exists vi to see if checking the file like that worked but no luck.
    Any help greatly appreciated.
    Dave

    Hi David
    I am very conscious about thread hijacking but this sounded like my issue so I hope you dont mind me asking about your issue. I am hoping that you have a spectrometer from the same vendor as me and its not just me seeing an Error 1097 issue. My spectrometer is from a company called Stellarnet.
    So far I have unable to get it to work with other VIs. There is one condition where I can get it to work but its no good for me.
    Case 1
    I open the VI in a fresh labview environment with no other VIs in memory. The code runs with no issue.
    Case 2
    Labview is not opened. I double click the spectrometer VI in windows explorer.  The VI opens but it fails to run resulting in Error 1097. Personally, I dont see the difference between this and Case 1 above and yet it fails.
    Case 3
    If I already have other VI's in memory and try to load the spectrometer VI and run it fails with Error 1097. This case is the one that most important to me. I have a test executive that will load test VIs dynamically and I can't get this to work. Same problem Error 1097.
    I wanted to share what I have seen with you and to let you know that maybe somebody else has the same issue. I am convinced its the DLL but the vendor dis-agreed saying it was LabVIEW. I couldn't convince him otherwise.
    Thanks in advance
    David

  • What does the ipod touch 5 come with

    What does the Ipod Touch 5 come with? (standard)

    Four calling birds, three french hens, two turtle doves and partridge in a pear tree. ;-)
    Basic troubleshooting steps  
    17" 2.2GHz i7 Quad-Core MacBook Pro  8G RAM  750G HD + OCZ Vertex 3 SSD Boot HD 
    Got problems with your Apple iDevice-like iPhone, iPad or iPod touch? Try Troubleshooting 101
     In Memory of Steve Jobs 

  • What does the recovery CD contain - Satellite A100-847

    Hello guys
    I had a few questions about the recovery CD:
    1- What does the recovery CD contain? and the other CD which is called Media something?
    2- Does it have Windows in it? So I can format my PC using it? And from where can i find the product key (windows key)
    3- What if i wanted to use the CD without formatting? etc. installing the softwares?
    Sorry for asking too much but my laptop started disturbing me. Just for knowledge my Laptop is satellite A100-847

    Hello
    I will try to answer your question.
    1 Recovery media contains recovery image. Recovery image is a kind of package that contains operating system, all necessary drivers, Toshiba tools and utilities and some additional software like WinDVD or Norton antivir application. Media something is not known to me. Maybe exact description can help.
    2 Yes it has Windows OS. Yes you can format your notebook using it. You do not need product key. Just install it.
    3 I do not know what you mean. The fact is that HDD will be formatted before you start recovery installation. Be sure all your important data are saved on some external device.
    Bye

  • When I see the usage on my iPod touch 4 they have categories for how much space is being used where. What does the "other" category contain? Like what could I delete on my iPod to get rid of the "other" category?

    when I see the usage on my iPod touch 4 they have categories for how much space is being used where. What does the "other" category contain? Like what could I delete on my iPod to get rid of the "other" category?

    What is the Other on my iPhone and How to Remove It
    An "other" larger than about 1 1/2 GB usually indicates that the "other" includes corrupted files.
    First try:
    "First you go settings/general/usage/music/then left swipe over music and press delete and you would think it deletes your music but it doesn't instead it deletes your other but make sure your ipod is connected to a computer while doing this"
    as recommended by:
    How do I get rid of "other" storage: Apple Support Communities
    Next, usually restoring from backup eliminated the corrupted files. However, sometimes restoring to factory settings/new iPod is required.
    To restore from backup see:
    iOS: How to back up
    To restore to factory settings/new iPod see:
    iTunes: Restoring iOS software

  • What does the "availability" of "free" or "busy" signify in the iPhone evevnt calendar?

    What does the status of "free" or "busy" do in the iPhone calendar event reminder?

    It shows if there are other events scheduled at the same time so you don't accidentally schedule two events at the same time

  • HT1491 Why do i keep getting the message 'Cannot connect to iTunes Store' when I have done every connection I can find? What does the error message (-1202) mean when I am on the iTunes site on my computer?

    Why do i keep getting the message 'Cannot connect to iTunes Store' when I have done every connection I can find? What does the error message (-1202) mean when I am on the iTunes site on my computer?

    Hi Velvalee,
    While there may not be specific information about that error, here is an article of steps for troubleshooting connectivity issues with the iTunes store:
    Can't connect to the iTunes Store
    http://support.apple.com/kb/ts1368
    If that article does not help, there is a link near the bottom for an additional article of advanced troubleshooting.
    Cheers!
    - Ari

  • On opening some pdfs in new tab, get a box labeled Adobe Acrobat with a ? in it. Right click on the link gets the pdf. What does the box and ? mean. Running W7, FF 10.0.2, Adobe Standard 9. Thanks

    On opening some pdfs in new tab, get a box labeled Adobe Acrobat with a ? in it. Go back to the original link, right click on the link gets the pdf. What does the box and ? mean and why do I get it when trying to open some pdfs? Running W7, FF 10.0.2, Adobe Standard 9. Thanks.

    Assuming that you are using IE10 / IE11 on Windows: http://support.microsoft.com/kb/2716529

  • CSCC - what does the "id" mean and how to get it

    https://apps.cisco.com/CustAdv/ServiceSales/contract/productDetailsIndex.do?method=loadProductDetails&contractId=55565082772&serviceLineNumber=55565082912&lineID=55565086982&instanceID=1483016052&contractNumber=93913779&id=382878711&majorOrMinor=MAJOR&coveredOrUncovered=COVERED&lineSeqNo=45823525&contextID=0.4317186686218467
    Currently I am developing a web client tool to get contract information based on the SN. And I don't find any existing API of CSCC, I had to parse the html instead. But I encountered an issue here as $subject which highlighted in the above link. What does the id number mean and how can I get it ?

    Are you running Firefox in Windows 95 or 98 compatibility mode?
    Mozilla/5.0 ('''Windows NT 4.0'''; rv:35.0) Gecko/20100101 Firefox/35.0
    Firefox won't install on Windows NT 4.0 - so something is changing your useragent and saying that your operating system is like 20 years old.
    Right-click your Firefox desk-top shortcut and select Properties. Then open the Compatibility tab and look at '''Compatibility mode''' - un-check that box if it has a check-mark.

  • What does the HSTS.plist file in the Cookies folder in /Library ?

    What does the HSTS.plist file in the Cookies folder in /Library ?
    If I open it in TextEdit it is filled with sites I never have visited.
    Does anybody know where this file is used for ?
    Thanks

    I also have this file in the same folder in the same location with two other 'documents' called:
    1. com.apple.appstore.cookies
    2. Cookies.binarycookies
    Document type shows as 'OOPlistDocumentType'.
    Yes lots of website addresses and at least one known spam tel number. The top line of the text when opened by TexEdit is as follows:
    bplist00“   ∑_ )com.apple.CFNetwork.defaultStorageSession_ !hstsd Disk Storage Schema Versionfl ±    
    This is a bit of a worry ........

  • What does the new in Pointbase JDBC Url mean?

    what does the new in the URL mean? It is out of ServiceBus config:
    jdbc:pointbase:server://localhost:9193/weblogic_eval;new
    thanks,
    Barossa

    if the database is not exist, it will create one for you.

  • What does the "S" mean in reference to lenses? EF-S vs EF lens?

    I have both a digital camera, the 60D, and recently acquired an EOS 1N 35mm film camera.  I have bought lenses for my 60D but not the 1N film camera....was told that my 18-55mm lens for my 60D would not be interchangeable with the 1N?  So, EF-S vs EF lens, what is the S and what does it indicate?   What does the "S" mean in reference to lenses?  EF-S vs EF lens? 
    Thanks.....I am just getting started in photography and do not know all the different terms....
    James

    In the simlpest of terms think of the S as standing for SMALL sensor. The sensor in crop bodies is much smaller in physical size than the area your film camera needs covering with when the shutter opens. An EF S lens won't allow light to cover the full area in the film or FF body. This allows smaller & cheaper lenses but at the expense of limiting their use. 
    see
    https://forums.usa.canon.com/t5/Lenses/Using-a-lens-designed-for-crop-bodies-on-full-frame-SAMPLES/t...
    "A skill is developed through constant practice with a passion to improve, not bought."

  • What does the scriptcollector do and how does it related to jsf lifecycle?

    hi,
    i want to know what does the scriptcollector do and how does it related to jsf lifecycle? and also in the scriptcollector if i call this,
    preRender=#{myBean.onPageLoadBegin}
    postRender=#{myBean.onPageLoadEnd}
    how my page will react?

    The hx:scriptCollector is part of the IBM Faces Client Framework and has nothing to do with Sun JSF RI.
    Lot of the hx components require specific Javascript and those hx components should be placed inside a single hx:scriptCollector which on its turn checks the nested hx components and renders the desired Javascript for it at the end of the tag. Check the HTML source for that Javascript.

Maybe you are looking for

  • Build specifications menu empty

    Hi there, Im currently trying to create a dll from a Labview project, following the instruction from this webpage : instructions on creating a dll from LV. My problem is, when I right-click on "Build Specifications" I only have one item to choose fro

  • Leopard 10.5.2 cannot see Windows shared printer

    I'm brand new to the Mac world and just got my Macbook on Monday afternoon. I'm trying to set up my Epson CX7400, which is connected to my Windows Vista desktop. Unfortunately, the Macbook can't see it under the add printers menu. I've tried installi

  • New tables not found in VKOA

    Hi experts, I defined new table 999 in "Account determination: Create tables" and activated it. However, it cannot be found in VKOA. Plz advise how to solve. Many thanks.

  • How much RAM do I have

    Ok I have a MacBook Pro. I know I have two gigs of RAM. I know the max I can put in is 4 gigs. But what I can't figure out without opening it up (which I don't want to do twice) is how much ram do I have in each slots. I know there is two slots. I do

  • I found Error in Statistics Express about the algorithm for mode

    LabVIEW 7.1 was used. today I acquired a lot of data and analyzed using Statistics Express in LabVIEW 7.1, whereas the results of mode were not correct because I analyzed the data using both Excel and SPSS. so I think there must be something wrong wi