Parentheses not enforcing evaluation order.

Greetings Forum Folks,
I'm attempting to do some EJB QL on Jboss 4.0.4 compiled for ejb3 and I've run into a problem. The query I am attempting is the following:
Query query = entityManager.createQuery("FROM ProjectEstimate AS pe WHERE
((pe.subStartDate IS NOT NULL and pe.subEndDate IS NULL and :date >= pe.subStartDate)
or (pe.subEndDate IS NOT NULL and pe.subStartDate IS NULL and :date <= pe.subEndDate)
or (pe.subStartDate IS NOT NULL and pe.subEndDate IS NOT NULL and :date >= pe.subStartDate and :date <= pe.subEndDate))
ORDER BY pe.name ");
query.setParameter("date", new java.util.Date());However, when this runs, the where clause of the sql is:
WHERE (pe.subStartDate IS NOT NULL) and (pe.subEndDate IS NULL) and (:date >= pe.subStartDate)
or (pe.subEndDate IS NOT NULL) and (pe.subStartDate IS NULL) and (:date <= pe.subEndDate)
or (pe.subStartDate IS NOT NULL) and (pe.subEndDate IS NOT NULL) and (:date >= pe.subStartDate and :date <= pe.subEndDate)We all know that those two where clauses don't return the same data. Reading the J2EE tutorial on sun, it states the following:
A WHERE clause consists of a conditional expression, which is evaluated from left to right within a precedence level.
You can change the order of evaluation by using parentheses.
So, theoretically, it should process my query, with the parentheses intact. But it is not. What am I doing wrong? or is there another way of doing this?
Thanks,
Andy

Try to use backing beans and property rendered in JSF tags instead of <fiona:displayForRole role="BUS">.

Similar Messages

  • How to enforce an order in which the Individual tabs are rendered in a tab navigator?

    I have a TabNavigator with multiple tabs as below.
    On the creationComplete  event, the individual child elements are added as below.
    xx.addElement(child1);
    yy.addElement(child2);
    zz.addElement(child3);
    where
    Bindable] 
    public var child1:Child1= new Child1();[
    Bindable] 
    public var child2:Child2= new Child2();[
    Bindable] 
    public var child3:Child3= new Child3();
    Issue:
    Is there a way to enforce the order in which these individual tabs are rendered? The order is not predictable and there is a dependency in the application  that one of the tabs is already completed rendered before the other. Please let me know.
    <mx:TabNavigator id="writTabs" x="9.7" y="290.35" width="696" height="466" fontWeight="normal"tabWidth="
    90" >
    <s:NavigatorContent id="debtorNc" label="Debtor" width="100%" height="100%" >
    <view:WritDebtor id="writDebtor" width="695" height="432"/>
    </s:NavigatorContent>
    <s:NavigatorContent id="xx" width="100%" height="100%">
    </s:NavigatorContent>
    <s:NavigatorContent id="yy" width="100%" height="100%">
    </s:NavigatorContent>
    <s:NavigatorContent id="zz" width="100%" height="100%">
    </s:NavigatorContent>
    </mx:TabNavigator>
    </s:Panel>

    Try validateNow

  • I want to order files (e.g., photos) in a particular order (not necessarily an order that is an option in MacOS. Ie, my own custom order, and I want them STAY in that order until I change the order. Is this possible?

    I want to order files (e.g., photos) in a particular order (not necessarily an order that is an option in MacOS. Ie, my own custom order, and I want them STAY in that order until I change the order. Is this possible?

    Custom sort order is not a typical option in the list view of any desktop computing systems I know of. The way you're seeing it work is also how it works in Windows and other systems.
    There is no "None" sort order. What you're seeing is a "None" option under "Arrange By." Arranging is not the same as sorting; arranging is how the files are grouped in the window. For example, you can arrange (group) files by Kind while sorting by Name. You'll notice that if you are in List view and you choose Arrange By "None," in the window there is still a sort triangle next to the column name that it's sorting by.
    If Arrange is set to None, the files appear in one big group (the traditional view) that is controlled by the Sort order (where there is no None option).
    I didn't even know the difference between Sort and Arrange until I saw your question and did a little research! This Macworld article helped:
    How to arrange and sort files in Lion Finder (also applies to later OSs like Mavericks)
    As for your main question, how to do a custom sort order in the Finder, you can only rearrange files manually in Icon view. As with other operating systems, if you want to create a custom sort order for photos there are other ways:
    Use a photo organizer application like iPhoto or Lightroom. Some let you have custom sort orders in folders, but others only let you have a custom sort inside a different container like an "album" or "collection". Having those additional container types is part of why photos are often best managed in an organizer application and not on the desktop.
    Rename the files. You can use a renaming utility program to rename the photos with numbers that will enforce your sort order when sorted by name on the desktop, like
    01 Photo.jpg
    01 Photo.jpg
    01 Photo.jpg
    or
    Photo 01.jpg
    Photo 02.jpg
    Photo 03.jpg

  • What is the evaluation order of Page Items

    I just wonder what the execution order of page item assignments are in the page rendering process.
    Sequence (+ Region), Type of items, more clever by checking dependencies ??
    I couldn't find anything here, or looked with the wrong keywords.
    I just need to know, what reliable assumption to make about dependencies amongst page items?
    Is that visible in the APEX code? A pointer to that would be OK.
    Many thanks
    Thomas

    fac586 wrote:
    What do you mean by "assignments"?The "Source" ("Source value or expression" in combination with the "Source Type") on the Page Item [Application Express 4.1.0.00.32]
    fac586 wrote:
    Items are rendered in order of region position/region sequence/item sequence. Item values will be evaluated in this order, but may also be set by computations or processes which run in order of processing point/computation sequence/process sequence.
    You can view page components in event order in the App Builder by selecting the Utilities > Page Events view in the page definition, and the actual sequence of runtime events in the debug trace.That was exactly what I was thinking, but that is not the case as far as I can tell. The order which is shown "*Utilities > Page Events*" seems to be the display order, but not necessarily the evaluation order in order to obtain the values.
    I have a database field that is shown much further down in this sequence, but I have a dependent field that is calculated based on this value and is shown before in that sequence.
    So I was wondering whether there is an implied order - possibly based on the Source Type of the page item.
    And to answer the question. There are no other computations or processes ... other than the associated "Automated Row Fetch" related to the database column used in the page items on the page.

  • Smartview Query Evaluation Order and Performance

    In which order does Smartview evaluate a query? i.e., rows first, then columns, then POV? I have experimented with a few large drill-downs and queries using a single dense dimension in the row (organization), and putting everything else in the columns, and timed that against a query that takes everything in the columns except Month into the POV. The query that is only rows and columns (no POV) has won every single time, sometimes twice as fast.
    I am curious about the evaluation order (if there is one), and am wondering if having a POV, or not, affects performance.
    Thanks

    Also look at the Execution Plan. The execution plan might be changing
    because of different bind variables being "peeked".
    With a certain execution plan, Oracle might be doing an Index Range Scan
    and retrieving the rows by the Index order, making the ORDER BY redundant
    (even if you see it in the Explain Plan).
    With a different execution plan, the rows might not be appearing in order and
    Oracle has to really do an explicit ORDER BY.

  • HP - Evaluation Order

    What is the use of Evaluation Order in Planning, what does it impact and how and when is it used ?
    Any reponse is greatly appreciated !

    For example
    You have an account members data type set as percentage
    A entity members data type set as a smart list
    If Account is the first in the evaluation list then the value agains the member will be shown as percentage.
    If Entity was first in the evaluation list then the smart list would be shown.
    Now if the account member data type was set as unspecified then this will not be evaluated and the next dimension in the list (entity) will be evaluated, if the entity member was set as a smart list then the smart list would be shown.
    Hopefully you understand now.
    Don't forget to mark the replies to your posts as correct or helpful as you don't seem to be doing it.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • IS NOT NULL in order clause

    Hi -
    It is not allowed to have IS NOT NULL in order by clause, isn't it? When order by clause is being formed dynamically, is there anyway to check for not nulls in any column to be used for order by clause? Thanks,

    If we have order by C1, C2, C3, then .. it is not the same as just C2 and C3 - is it?No, results depend upon content of result set.
    SQL> drop table nulls_ob;
    Table dropped.
    SQL> create table nulls_ob (id1 number, id2 number, id3 number);
    Table created.
    SQL> insert into nulls_ob values(null,100,null);
    1 row created.
    SQL> insert into nulls_ob values(null,110,null);
    1 row created.
    SQL> insert into nulls_ob values(null,null,100);
    1 row created.
    SQL> insert into nulls_ob values(null,null,120);
    1 row created.
    SQL> insert into nulls_ob values(null,90,100);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select * from nulls_ob order by 1,2,3;
           ID1       ID2          ID3
                 90          100
                100
                110
                        100
                        120
    SQL> insert into nulls_ob values(70,110,null);
    1 row created.
    SQL> insert into nulls_ob values(90,null,100);
    1 row created.
    SQL> insert into nulls_ob values(80,90,100);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select * from nulls_ob order by 1,2,3;
           ID1       ID2          ID3
         70       110
         80        90          100
         90               100
                 90          100
                100
                110
                        100
                        120
    8 rows selected.
    SQL> select * from nulls_ob order by   2,3;
           ID1       ID2          ID3
         80        90          100
                 90          100
                100
                110
         70       110
                        100
         90               100
                        120
    8 rows selected.

  • PO screen custom fields are not in correct order

    Hi Experts,
    After creating Shopping cart and purchase order successfully created.
    Added my custom fields for PO structure INCL_EEW_PD_ITEM_CSD_PO fields are visible in PO screen automatically with out adding my custom fields in PO layout /SAPSRM/WDC_DODC_PO_I_BD
    when i go to PO screen i can see my custom fields but all fields are not in correct order.How can my fields should be in order.
    and i added two custom buttons in my PO layout for WD component /SAPSRM/WDC_DODC_PO_I_BD i am not able to see my buttons?
    Could you please help me out in this issues its urgent.
    Thanks,
    Venkatesh G

    I've had this problem. There may be a more elegant solution, but what I do is make a playlist of the album and put the movements in the correct order in the playlist. I've also put numbers (01, 02, etc.) in front of the name of the movements. Either one works.
    Hope this helps.
    Ben

  • Web form fields not staying in order

    Does anyone know why the fields in my forms keep re-arranging themselves. For example I will move "Field 2" below "Field 6" and everything looks like it works but when I insert the form on a page the fields are not in the order I set. Any advice?

    Hi,
    That is a bit strange do you have an example form on your site that we can look into further? 
    Please also provide the exact steps that you are doing so we can closely replicate to see where the issue could be coming from. 
    Cheers!
    -Sidney

  • Apple TV (1st gen) photos in an Event not in date order

    I have synced selected Events from iPhoto to my Apple TV 1st gen with iTunes 11.0.1
    The events synced are "merged" events from 2 cameras on a month-by-month basis.
    In iPhoto, I have the event sorted by date, but on the Apple TV, the photos are NOT in date order.
    How can I get the Apple TV to reflect the choice I make in iPhoto ??

    Thanks Winston
    DIT-DIT-DIT-DAH

  • Delivery note from sale order

    Hi all,
    While trying to create a delivery note against sale order in VL10G, the message "only 0 ea of  material XXX available".    In stock material quantity is available.  The material has some reservations against it.  Will this be resulting in not creating delivery note. 
    Regards
    sappy

    Hello,
    Is your material stock against order ie restricted to specific order  or is it make to stock ie in Unrestricted.
    Please check the availability check in sales order. It will show if any delivery is created but not done PGI. Either delete that delivery & then you will be able to create the delivery for this order.
    Let me know if the problem still continues.
    Thanks

  • Credit block should not prevent service order creation

    An upgrade from 4.7 to  ECC6, without any changes made to the configuration or program change, has lead to the following issue. ECC6 is not creating a service order connected to a sales order, when the customer has exceeded the credit limit. The sales order of custom order type is getting saved with a warning message that credit limit has exceeded. However, earlier in 4.7, the message would not stop creating subsequent service order. What could be different, that prevent ECC6 environment to hold on to service order creation? A subsequent release of the credit block through VKM1 however triggers the service order being created.

    Are you using credit card processing in SAP to get the authorization?
    If you are then the authorization should not block the order.
    Or are you using credit card as a form of payment (without authorization) in which case this needs to be put on the customers account as a payment and then the order entered.
    Where are you holding the credit card details?

  • MRP Run can not create Planned order to Sales order

    Hi,
    I have a problem with planning run to sales order. We have a configurable material which have make to order strategy. MRP Run does not create planned order to some of our sales order. I think it has relation with schedule lines but i can not understand the problem.
    If schedule line has 1 as confirmed quantity MRP run can not plan but 0 as confirmed quantity MRP Run creates planned order.  How can i solve this problem?
    Regards,
    techmastere

    Hi,
    Order for which qty is confirming, check which schedule line is determined and which requirement type system is determining.
    then in VOV6 for schedule line tick mark availability check & Transfer of requirement
    for requirement class OVZG tick mark availability check & Transfer of requirement
    Note: if schedule line is not relevent for availability check & ToR then system always defaul confirm quantity.
    kapil

  • HT1040 why can i not seem to order more than one print at a time, which obviously becomes expensive with the shipping, it does not seem to offer me the facility to choose again?

    why can i not seem to order more than one print at a time, which of course becomes expensive with shipping, it does not seem to offer me the facility to choose again? either order or cancel!

    make an album containing the photos you wnat to print, select all photos in the album  and order
    LN

  • Error "Token in strings could not be evaluated" in form personalization

    Getting Error "Token in strings could not be evaluated" in form personalization.
    The syntax used is -
    ='BEGIN
    CREATE_URL_COLL('''||${item.IEXPYPRS_CC.CC_TYPE_DSP.value}||''');
    end'
    Please suggest where I am going wrong.
    Thanks and Regards,
    Dibyanshu

    Andreas.
    ='BEGIN
    CREATE_URL_COLL('''||${item.IEXPYPRS_CC.CC_TYPE_DSP.value}||''');
    end'what about the above code is it related with form?
    because i tried to use that something like this
    BEGIN
    CREATE_URL_COLL('''||${item.IEXPYPRS_CC.CC_TYPE_DSP.value}||''');
    end;and it gave me error, compilation error.
    sarah

Maybe you are looking for

  • Problems with basic lower third ?

    Is anyone having a problem with the "basic lower third" template ? I keep getting a second, "ghost" copy of the first (top) line of the title created, shifted about 10 pixels above the original .. this only seems to happen after the project and/or li

  • SSAS - Creating a Measure For Defects Per Unit

    Hello, everyone I'm attempting to create a Defect Per Unit calculation. I have an odd situation where my source data is recording all of instances of a given Defect (the single defect is recorded in multiple locations, DimLocation). So I'm receiving

  • Image size different in debug and in publish

    My project is purely actionscript based movie. I am trying to display an image file (jpg) that is received from the movie server. The image file displays with corect zoom dimensions when in development environment but after the movie is published...t

  • Installation - Adobe LiveCycle Designer 8.0

    Hi All, While creating layout in Adobe form in WD ABAP I got the following error------- 'Could not start Layout Designer(see long text)'. I am getting this error probably because 'Adobe LiveCycle Designer 8.0 ' is not installed in my machine. Please

  • Windows 8: Hard drive at 100% far more often that in Windows 7

    Hello I have installed Windows 8 Professional roughly 4/5 days ago. I find that the hard drive is at 100% far more than when I was doing similar tasks in Windows 7. My general tasks are: Visual Studio Sql Server GIMP Chrome Windows Media Player Inter