How to update a particular field value in the DB using CMP

I wanted help on how one can update the value of a field in a table using CMP. Its very urgent please give me some guidelines. Thanks Naveen
[161 byte] By [csnaveen31a] at [2007-10-1 0:05:44]
# 1
Hi,get renote reference by calling findByPrimartKey method.then update the field by calling the corresponding setter method.regards,Krishna.
javatwoenterpriseeditiona at 2007-7-7 15:49:49 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2
> I wanted help on how one can update the value of a> field in a table using CMP. Its very urgent please> give me some guidelines. > Thanks > Naveen
MaryJeethua at 2007-7-7 15:49:49 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3

you can update the CMP field with the help of local interface of the corresponding Entity.

for example

if you want to update PERSON table.

PersonLocal plocal=personHome.findByPrimaryKey(new PersonPK(personId));

then

plocal.setPersonRole(role);//this method is a CMP setter method

(or)

if you want to set bulk of data then u can use value object.

personValue.setPersonId(personId);

personValue.setPersonRole(role);

......

plocal.setPersonValue(personValue);

I think it wud be helpful for you.

Thanks

Bala.

Boobalan.jeyaa at 2007-7-7 15:49:49 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...