ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pankaj savita <pankajsav...@gmail.com>
Subject Re: Entity engine compare columns
Date Mon, 11 Oct 2010 13:23:40 GMT
In entitymodel.xml partyId will be defined as:
   <field name="partyId" type="id-ne"></field>
&
 In java service you can get & compare using:
   String partyId = getPartyId(context);
   if (UtilValidate.isEmpty(partyId)) { //your code...}

-- 
Thanks & Regards,
Pankaj Savita
Mob: +91 9890262476
Mail to: pankajsavita@gmail.com

On Mon, Oct 11, 2010 at 6:47 PM, varun bhansaly <vbhansaly@gmail.com> wrote:

> Thanks, but I wish to compare two columns.
> BTW, if I write this in java service, what should be the type for partyId ?
>
> On Mon, Oct 11, 2010 at 6:43 PM, Chirag Manocha <cmanocha@emforium.com
> >wrote:
>
> > Hi Varun,
> > Following will work for you :-
> > EntityCondition.makeCondition("USER_LOGIN_ID",
> > EntityJoinOperator.NOT_EQUAL, partyId)
> >
> > Regards
> > --
> > Chirag Manocha
> > Emforium Software Pvt. Ltd. | ALL-IN Software
> > +91-98735-47457 | +91-98263-19099
> > Please don't print this Email unless you really need to - this will
> > preserve trees on planet earth.
> >
> >
> >
> >
> > From: "pankaj savita" <pankajsavita@gmail.com>
> > To: user@ofbiz.apache.org
> > Sent: Monday, October 11, 2010 6:12:44 PM
> > Subject: Re: Entity engine compare columns
> >
> > Hi Varun,
> >
> > You can make EntityCondition using:
> >
> > EntityCondition.makeCondition("USER_LOGIN_ID",
> > EntityOperator.GREATER_THAN_EQUAL_TO, PARTY_ID)
> >
> > or
> >
> > EntityCondition.makeCondition("USER_LOGIN_ID",
> > EntityOperator.LESS_THAN_EQUAL_TO, PARTY_ID)
> >
> >
> > --
> > Thanks & Regards,
> > Pankaj Savita
> > Mob: +91 9890262476
> > Mail to: pankajsavita@gmail.com
> >
> >
> > On Mon, Oct 11, 2010 at 4:40 PM, varun bhansaly <vbhansaly@gmail.com>
> > wrote:
> >
> > > Hi,
> > > Is it possible to compare two columns using the entity engine,
> > > For eg, write a query like this -
> > > SELECT * FROM USER_LOGIN WHERE USER_LOGIN_ID <> PARTY_ID
> > >
> > > --
> > > Regards,
> > > Varun Bhansaly
> > >
> >
> >
>
>
> --
> Regards,
> Varun Bhansaly
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message