Stored Procedure Support

From: Andrus (andru..bjectstyle.org)
Date: Sun Feb 02 2003 - 20:53:48 EST

  • Next message: Holger Hoffstätte: "Further deprecation / arrays vs. List"

    One of the 2 features I wanted to see in Beta is stored procedure support.
    Here is a little description of the initial planned implementation.

    1. Cayenne will support "modification" Queries based on stored procedures.

    2. Cayenne will support select queries based on stored procedures, allowing
    to fetch data rows or DataObjects based on some ObjEntity (not directly
    related to Stored Procedure).

    3. Cayenne will NOT support stored procedures in the DataMap yet, but the
    design should be flexible enough to allow for this in the future.

    4. Cayenne will NOT support OUT parameters of stored procedures in this
    release.

    With this in mind I created a little UML diagram showing participating
    classes (and by doing this betrayed the principles of XP that do not allow
    any upfront design :-)).

    Basically "StoredProcedureEntity" class will reside in the map package and
    will stay transparent to the user (until we start supporting them in the
    DataMap explicitly). Public API will consist of StoredProcedureQuery and
    SelectStoredProcedureQuery. Both queries will probably create
    StoredProcedureEntity internally on the fly. All needed mappings will be
    added via "addParam" and "addResultParam".

    First argument is the name of Stored Procedure IN parameter or ResultSet
    column name. If the second argument to these methods is int, this is a JDBC
    type, if it is String, it is an ObjAttribute name and will be resolved in
    the mapping.

    Translators and OperationObservers will be created to support this
    functionality.

    Any comments?

    Andrus




    This archive was generated by hypermail 2.0.0 : Sun Feb 02 2003 - 20:54:04 EST