Re: Hook in the cayenne internals

From: jerome moliere (jerome.molier..mail.com)
Date: Mon Apr 02 2007 - 05:02:24 EDT

  • Next message: Michael K: "Calling MySql Stored Procedure return no resultset"

    2007/4/2, jerome moliere <jerome.molier..mail.com>:
    >
    > Hi all,
    > I'd like to show on a simple test the Cayenne equivalent for the Hibernate
    > UserType, that is to say
    > a way to map some SQL types with some user provided code...
    > Example given is : my customers use sybase image type to store XML gzipped
    > huge files...
    > I'd like to be able to be able to store/read the XML transparently...Image
    > type is a detail of implementation
    > org.apache.cayenne.access.types.ExtendedType
    > seems to be the Cayenne solution but there are no big details on this
    > subject...
    >
    > Is the Cayenne source code my only source ?
    > Moreover if you have UML sequence diagrams and other conception documents
    > on Cayenne, I'd very happy to read them..

    I 'll try to give your more clues...
    In fact if I understand the ExtendedType machanism as plugged in the
    DBadapters, a question still remains..
    Let's imagine a small table schema:

    (it will use a Postgresql syntax, with the bytea binary type)

    CREATE TABLE PAITINGS_TBL(painting_id int primary key,painting_data bytea);

    CREATE TABLE ARTISTS_BIO(artist_id int primary key, artist_text_bio bytea);

    in this schema 2 tables with 2 BLOB fields, the first one is simply the JPEG
    while the second is a long text with all the artist bio...

    The extendedtype could permit me to change the Cayenne behavior but for all
    bytea fields isn't it ?
    I dont want to manage a JPEG in the same fashion as the authors bio...

    Thanks for any help
    cheers
    jerome

    -- 
    Jerome Moliere - Mentor/J
    http://romjethoughts.blogspot.com/
    auteur Eyrolles
    



    This archive was generated by hypermail 2.0.0 : Mon Apr 02 2007 - 05:03:10 EDT