Modify the logical operator in an Expression

Hi,
How to alter an Operator ("LIKE" to "EQUAL") inside an Expression already built - before execution ?
Let me explain my problem :
I have a central Toplink Adapter class which is responsible for executing all Expressions passed from different modules.
Each module is passing an Expression object to this Adapter.
There is a DeletionStatus column in almost all the tables whose value could be "Y" or "N".
Almost all Expressions append (through AND) this DeletionStatus column checking the value to "Y" or "N".
The problem here is the subordinates while building the Expression have used LIKE operator many places on this DeletionStatus column rather than EQUAL (or EQUALS).
My objective now is to regulate within the adapter class that EQUAL/s to be used to improve performance.
Sitting in the Adapter class...after accepting the Expression object as a parameter...how can i alter the Expression(/query) such that if the DeletionStatus column is part of the Expression built...then modify the Operator to be EQUAL/s only and not LIKE.
Seamlessly.....irrespective of the Operator used by the subordinates....the Adapter always executes with EQUALS operator thereby improving on the performance of SQL execution.
Please help.
Thank you very much in advance.
Regards,

I would think you would be best off change the code that is using like() and change it to equal() instead of leaving this code incorrect, and trying to mung it elsewhere.
If you really want to mung it, you could walk the Expression tree and look for LIKE and the field and switch the operator of the RelationExpression.
James : http://www.eclipselink.org

Similar Messages

  • SSRS Expression for Conditional Filtering using the "IN" operator

    Hello,
    I need to filter my dataset based on a parameter:
    If Period= 1 then Week must be in (W1, W2, W3),  Else Week must be in (W10, W20, W30)
    I tried using the "IN" operator but don't know how to create the expression for the "Value" field. I tried the following:
    iif(Parameters!Period.Value = 1,
    "W1, W2, W3",
    "W10, W20, W30")
    But it doesn't work.
    Expression: Week
    Operator: IN
    Value: ???
    Any help would be highly appreciated!

    Hi,
    Use split function.
    See this expression: IIF(Parameters!Period.Value = 1, SPLIT("W1,W2,W3",","), SPLIT("W10,W20,W30",","))
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/8da78c9b-7f0c-42f1-a9c4-82f065f317c9/using-the-in-operator-in-ssrs-expressions
    Thanks Shiven:) If Answer is Helpful, Please Vote

  • Ignore logical operator in string

    I assign a string string to a variable var, then show the variable using $$var$$
    This works if the string is something like "Black White", and $$var$$ returns "Black White"
    However, if the string contains a logical operator like "and" or "or", then captivate sees it as a logical operator, and returns "false".  Therefore the string "Black or White" makes the variable return "false"
    I believe I need to put something in front of or around the logical operator so that it's ignored, like "Black */or/* White", or something like that, but I can't remember what.

    Still no concatenation in CP8 One of my old, old feature requests.
    Captivate doesn't know the difference between a string and a number.

  • How to change logical operator

    Hi
    I am trying to determine Employee Responsible(ER) based on territory attributes. Determination should work on 4 attributes as Country,Region,Postal Code and Prod cat. But i could find that first 3 attributes(Country,Region,Postal Code) are grouped together by "And" operator but Prod cat is by"OR" operator.
    So in a way for correctly determined ER based in this order Prod Cat.,Cty,REGN,PCDE. How we can chnage the logical operator or grp togther these attribute so they are connected by "and" operator and as a set is evaluated in transaction to determine the correct Employee Responsible when prod. is entered.
    thanks
    chap

    Hello ,
    We too are facing the same problem of using the logical operator.
    We want to use ' "Country" AND "Product Hier/Cat" '  but can only use OR instead.
    Please advice.
    Rgds,
    Ak-

  • A quick question  of Logical Operator - NOT?

    I know that the logical operator for NOT is " ! " sign.
    But someone could please tell me how do I use the NOT operator in the below code.
    if (c instanceof JLabel) Thanks

    Before you use this, think long and hard if there's a better way to
    achieve your goal than wandering through all of a panel's
    components checking for those that aren't JLabels.
    import javax.swing.*;
    public class Not {
         public static void main(final String[] argv) {
              final JComponent panel = new JPanel();
              if (!(panel instanceof JLabel)) {
                   System.out.println("It works.");
    }

  • Regular expression evaluation with logical operator

    Hi All,
    I am bit confuse with expression evaluation with logical operator. I am trying to understand below expression.
    eXa.getTrue() && eXa.getFalse() || eXa.getFalse() && eXa.getTrue() || eXa.getFalse() comes as false and True Count: 1 False Count: 3
    As per understanding it should be true with True Count: 1 False Count: 3
    it should execute 1st getTrue() and then 1stGetFalse() and then 2nd getfalse() and should skip 2nd getTrue() and execute 3rd fetFalse()
    eXa.getTrue() && eXa.getTrue() || eXa.getFalse() && eXa.getTrue() || eXa.getFalse() comes as true and True Count: 2 False Count: 0
    As per understanding it should be true with True Count: 3 False Count: 0
    it should execute 1st 2 getTrue() and skip 1st getFalse() and then execute 3rd getTrue() and skip last getFalse().
    eXa.getTrue() || eXa.getFalse() && eXa.getFalse() || eXa.getTrue() && eXa.getFalse() comes as true and True Count: 1 False Count: 0
    As per understanding it should be true with True Count: 2 False Count: 2
    it should execute 1st getTrue() and skip 1st getFalse() and then execute 2nd getFalse() and then execute 2nd getTrue() and then 3rd getFalse()
    Please help me to understand above expressions.
    Here is the methods definition:
    private boolean getTrue() {
              trueCount++;
              boolean retrunValue = 4 > 3;
              return retrunValue;
    private boolean getFalse() {
              falseCount++;
              boolean retrunValue = 3 > 4;
              return retrunValue;
    Thanks for ur help

    >
    adding parenthesis to make order of ops more obvious. adding "?" to show un-executed calls.
    (eXa.getTrue() && eXa.getFalse()) || (eXa.getFalse() && eXa.getTrue()) || eXa.getFalse()  comes as false and True Count: 1 False Count: 3
    (T && F) = F
    (F && ?) = F
    (F) = F
    F || F || F = F
    (eXa.getTrue() && eXa.getTrue()) || (eXa.getFalse() && eXa.getTrue()) || eXa.getFalse()  comes as true and True Count: 2 False Count: 0
    (T && T) = T
    (? && ?) = ?
    (?) = ?
    T || ? || ? = T
    eXa.getTrue() || (eXa.getFalse() && eXa.getFalse()) || (eXa.getTrue() && eXa.getFalse())  comes as true and True Count: 1 False Count: 0
    (T) = T
    (? && ?) = ?
    (? && ?) = ?
    T || ? || ? = T

  • How can i get a free digital download for the Logic express 9 DVD version

    I recently bought an new Imac. There is no dvd player. What gets me frustrated is that i own almost all Apple products, but i can't seem to get my DVD version of Logic Express on my new imac. I tried to share the dvd drive of my macbook pro, but that doesnot work with copy protected software. So i can't install from that external dvd drive.
    So now i have a:
    Iphone
    Ipad mini
    Macbook pro
    Imac
    and ik can't use my officially purchased version of Logic. Microsoft offers a free digital download for registered version of Office for Mac. Is er there also a free digital download for Logic Express? Anybody?
    If there is not, i feel ripped off.
    Thanks.

    Why not ask in the Logic Express forums?

  • HT1222 I am trying like **** to download itunes 10.6.3 (64 bit - Windows 7) and I keep getting "the installer was interrupted before the requested operations for iTunes could be completed.  Your systems has not been modified."  I NEED HELP, PLEASE!

    I am trying like **** to download itunes 10.6.3 (64 bit - Windows 7) and I keep getting "the installer was interrupted before the requested operations for iTunes could be completed.  Your systems has not been modified."  I NEED HELP, PLEASE!

    I got it figured out myself... yaaaaay for me!

  • Error has occured during install before the requested operation for i tunes could not be completed your system has not been modified

    error has occured during install before the requested operation for I tunes could be completed  Your system has not been modified to complete the install run the installer again and I have it still won't work

    See:
    Trouble installing iTunes or QuickTime for Windows

  • Grouping the logical expressions in IF condition is not working

    Hi Experts,
        My requirement is to group the logical expressions in IF condition like the below
    I tried it like
    IF ( &NAST-KSCHL& = 'ZBE0' OR &NAST-KSCHL& = 'ZBEC' ) AND ( &VBDKR-SPRAS& <> 'F' )
      code...
    ELSEIF
      Code....
    ELSE
       code...
    ENDIF
    But the system is showing the grouping in the IF condition is wrong. The problem is i am not supposed to break that AND condition and put it as another IF inside the first IF condition.
    Pls provide your valuable inputs.
    Thanks,
      Srinivas

    Hi,
    Sometimes to play with sap script editor becomes very much difficult if you have scenario like as you mentioned..
    Type this, and i hope it will work..
    /:     IF &NAST-KSCHL& = 'ZBE0' OR &NAST-KSCHL& = 'ZBEC'   
    /:     IF &VBDKR-SPRAS& =  'F'
    your code..
    /:     ENDIF
    /:     ELSEIF <LOGICAL EXP>
    /:     IF &VBDKR-SPRAS& =  'F'
    your code..
    /:     ENDIF
    /:     ENDIF
    Now please try to use one more IF statement, give the logical expression same as in ELSEIF
    Although it is time consuming  but sill you can try..
    Edited by: Lokesh Tarey on May 26, 2010 12:30 PM

  • The 'or'  logical operator

    I am using the book JAVA for Dummies and am at the logical operators section. I cannot find on my keyboard the symbols of the vertical bars for the 'or' logical operator. How do you create or get the bars from your keuboard for that?

    flounder wrote:
    Looks like Joe cannot find the t-h-a-n-k-y-o-u keys either.That requires a name change from JOEBEGINJAVA to JOETHANKYOUJAVA

  • The IO operation at logical block address # for Disk # was retried

    Hello everyone,
    A warning appears in the system log:
    ===
    Log Name:      System
    Source:        disk
    Date:          2/20/2013 1:00:28 PM
    Event ID:      153
    Task Category: None
    Level:         Warning
    Keywords:      Classic
    User:          N/A
    Computer:      STRANGE.aqa.com.ru
    Description:
    The IO operation at logical block address af7ff for Disk 7 was retried.
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="disk" />
        <EventID Qualifiers="32772">153</EventID>
        <Level>3</Level>
        <Task>0</Task>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2013-02-20T09:00:28.199176700Z" />
        <EventRecordID>12669</EventRecordID>
        <Channel>System</Channel>
        <Computer>STRANGE.aqa.com.ru</Computer>
        <Security />
      </System>
      <EventData>
        <Data>\Device\Harddisk7\DR142</Data>
        <Data>af7ff</Data>
        <Data>7</Data>
        <Binary>0F01040003002C00000000009900048000000000000000000000000000000000000000000000000000020828</Binary>
      </EventData>
    </Event>
    ===
    This warning occurred in several seconds after the Windows Server Backup start. Our backup job finishes successfully. That server is in provisioning without a heavy workload, and we have not experienced any problem yet. But we do not want to face any problems
    due to this error in the production environment.
    All disks of the server are managed by the LSI MegaRAID controller, which doesn’t report any errors in the disk system.
    it is Windows Server 2012 with the latest updates.

    Wow, I have been having the exact same problems with Server 2012 WSB.  I thought I had it resolved but it started acting up again.  I tried 3 different external hard drives thinking they may be the problem.   The raid array also seems fine,
    it is not giving me any errors, no amber lights.
    If I run a backup system state + hyper-v it would fail 9/10 of the time on the host component.  I have posted every where and cannot find anything.   These are the event during any backup I run.  
    Source: Disk
    Event ID: 153
    The IO operation at logical block address 10a58027 for Disk 5 was retried.
    Source: VOLSNAP
    Event ID: 25
    The shadow copies of volume C: were deleted because the shadow copy storage could not grow in time.  Consider reducing the IO load on the system or choose a shadow copy storage volume that is not being shadow copied.
    Source: Filter Manager
    Event ID: 3
    Filter Manager failed to attach to volume '\Device\HarddiskVolume109'.  This volume will be unavailable for filtering until a reboot.  The final status was 0xC03A001C.
    Source:  VOLSNAP
    Event ID: 27
    The shadow copies of volume \\?\Volume{a21d0bb7-7147-11e2-93ed-842b2b0982fe} were aborted during detection because a critical control file could not be opened.
    Source:  VHDMP
    Event ID: 129
    Reset to device, \Device\RaidPort4, was issued.
    Source:  VOLSNAP
    Event ID: 25
    The shadow copies of volume G: were deleted because the shadow copy storage could not grow in time.  Consider reducing the IO load on the system or choose a shadow copy storage volume that is not being shadow copied.
    Windows backup gives me various errors for what did not backup.  Mainly this one:
    Error in backup of C:\ during enumerate: Error [0x80070003] The system cannot find the path specified.
    Application backup
    Writer Id: {66841CD4-6DED-4F4B-8F17-FD23F8DDC3DE}
       Component: Host Component
       Caption     : Host Component
       Logical Path: 
       Error           : 8078010D
       Error Message   : Enumeration of the files failed.
       Detailed Error  : 80070003
       Detailed Error Message : (null)
    Not just the host component, sometimes the entire C: ...
    So no one has any recommendations on fixing this?
    Is any one running dell AppAssure?  I have two servers backing up to this server with dell AppAssure.  Then I am using WSB to backup the this machines OS and 1 windows 7 VM.  

  • I have purchased a mac mini only to find I am unable to run Logic pro 9 , is there any way this can be achieved? It has been suggested that I partition the drive and install a copy of an older operating system to run the Logic Pro, is this feasible?

    I have purchased a mac mini only to find I am unable to run Logic pro 9 , is there any way this can be achieved? It has been suggested that I partition the drive and install a copy of an older operating system to run the Logic Pro, is this feasible?

    BDAqua wrote:
    ....but some other new Macs will boot frome a clone of 10.6.8...
    Only with a whole lot of effort and instability.  As the new Minis have
    hardware (HD4000, USB 3.0, etc.) that is totally unsupported in old OSes.
    The only option would be to see if it would work by installing in a virtual machine
    running 10.6.8.  I'm sure there will be some performance hit but whether it would
    be enough to be unusable is the question.

  • Expression Language: The Empty Operator

    Does anyone know how to use the empty operator?
    I have a JSF page element in which I'm trying to render/not render based on the 'emptiness' of the referenced collection.
    <h:panelGrid columns="1" rendered="!empty#{model.theList}">
    <h:outputText value="Calling getList on my model provided a non-empty collection"/>
    </h:panelGrid>
    Ideally, I'd like something like the above - "return true here if the following is not empty #{someList}"

    Try changing your expression :
    "!empty#{model.theList}"
    - to -
    "#{!empty model.theList}"
    The EL operators should be used within the delimiters.

  • The I operation at logical block address 0x747b49c0 for Disk 0 was retried

    The IO operation at logical block address 0x747b49c0 for Disk 0 was retried

    nasir-ahmad wrote:
    The IO operation at logical block address 0x747b49c0 for Disk 0 was retried
    Sounds like a bad hard drive but since we have no idea what computer this si coming form your asking us to find a needle in haystack question.
    I am a Volunteer to help others on here-not a HP employee.
    Replies aren't online 24/7 because of Time Zone differences.
    Remember in this Day and Age of Computing the Internet is Knowledge at your fingertips if you choose understand it. -2015-

Maybe you are looking for

  • Disk Shows Up in AirPort Utility But Not On Network

    I have a brand new AEBS. My network consists of my Windows XP box and an Apple TV. Using MacDrive, I formatted my external hard drive to HFS+. It is blank. When I plug it into my AEBS I can see it under the Disks pane in AirPort Utility, but cannot f

  • Updating data in User Event doesn't propogate to uses of the User Event type

    So I have a user event which is seeded with a cluster in which there are a few typedefs. Now, as you might expect, I have to pass the user event to different VIs so that they can trigger the events which are interpretted by a main vi. Pretty simple a

  • Multiple IP's on a single interface with Gateway config

    I have exasperated myself trying to figure this out!! I have setup multiple IP's on a mac mini server using USB ethernet. Everything works as it should and it's fairly snappy with the new mini. The problem is when I try to enable NAT, DHCP, etc., for

  • Maximum Time Limit for a DVD?

    Hi all, I'm working on a wedding video, and at the moment it running to 2hrs 30 minutes!!! This is way longer than i'd normall like. Will it be safe enough to create a Mpeg 2 file for DVDSP at this low bitrate? Or does it need to be down to under 2 h

  • Disable cell editing

    Hi. Can I disable cell editing in a JTable without using a TableModel and still let the user click on different cells? /lars