cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Malcolm Edgar" <malcolm.ed...@gmail.com>
Subject Cayenne & Flex
Date Fri, 16 Jun 2006 01:14:19 GMT
Hi All,

I am looking at using Cayenne with Flex. Flex provides a Data Services layer
which transforms Java object into matching JavaScript classes.  As Flex
needs to get and set the object id values, I want to know if what I am doing
below is the correct pattern?

regards Malcolm Edgar


package samples.contact;
..

public class Contact extends _Contact
{
    public int getContactId() {
        return ((Integer) DataObjectUtils.pkForObject(this)).intValue();
    }

    public void setContactId(int id) {
        ObjectId objectId = new ObjectId("Contact", CONTACT_ID_PK_COLUMN,
id);
        setObjectId(objectId);
    }

}

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