cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilberto C Andrade <>
Subject Cayenne POJO enhancer
Date Wed, 24 Oct 2007 19:17:29 GMT
[This is second email I send, I think the first one get lost]
Hi all,

I've been searching on docs/maillist about how to persist an already
existent pojo, but have no luck. Let me explain: we have two old
projects build with hibernate 2.1.8 and all model are marked with
hibernate tag on doc area in java source [1].
But now we want to use those models with cayenne (3.0M1) without edit
them. Is that possible?

These systems included the business and data access in the same place.
So turning it impossible to change the domain logic. By the way, someone
can suggest a good design separation of package?
We are now trying this:<module>.model;<module>.dao;<module>.service;



PS.: I think we won the battle about ORM choice. Now comes the new one:
beat the eclipse hibernate tools! Thanks all for help!

 *  Área de atuação do curso: informática, RH, financeira, etc.
 *  @hibernate.class table="scc.scc_area"
public class Area implements Serializable {

    /** identifier field */
    private Integer cdArea;

    /** persistent field */
    private String dcArea;

    /** full constructor */
    public Area(Integer cdArea, String dcArea) {
        this.cdArea = cdArea;
        this.dcArea = dcArea;

    /** default constructor */
    public Area() {

     * generator-class="sequence" column="cdarea"
unsaved-value = "null"
     * @hibernate.generator-param name = "sequence" value =
     * @return Integer
    public Integer getCdArea() {
        return this.cdArea;

    public void setCdArea(Integer cdarea) {
        this.cdArea = cdarea;

     * column="dcarea" length="40" not-null="true"
    public String getDcArea() {
        return this.dcArea;

View raw message