Cayenne POJO enhancer

From: Gilberto C Andrade (gilbertoc..ecad.to.gov.br)
Date: Wed Oct 24 2007 - 15:17:29 EDT

  • Next message: Andrus Adamchik: "Re: Cayenne POJO enhancer"

    [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:
    br.to.gov.secad.<module>.model;
    br.to.gov.secad.<module>.dao;
    br.to.gov.secad.<module>.service;

    Thanks!

    Gilberto

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

    [1]
    [code]
    /**
     * Área de atuação do curso: informática, RH, financeira, etc.
     * ..ibernate.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() {
        }

        /**
         *..ibernate.id generator-class="sequence" column="cdarea"
    unsaved-value = "null"
         *..ibernate.generator-param name = "sequence" value =
    "scc.scc_area_sequence"
         *..eturn Integer
         */
        public Integer getCdArea() {
            return this.cdArea;
        }

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

        /**
         * ..ibernate.property column="dcarea" length="40" not-null="true"
         *
         */
        public String getDcArea() {
            return this.dcArea;
        }
    [/code]



    This archive was generated by hypermail 2.0.0 : Wed Oct 24 2007 - 16:37:49 EDT