I am missing Expression architecture

From: Giulio Cesare Solaroli (slrgcs..bn-italy.com)
Date: Wed Oct 01 2003 - 09:43:07 EDT

  • Next message: Andrus Adamchik: "Re: I am missing Expression architecture"

    Hi,

    I am looking at the cayenne.exp package, but I am missing the
    architecture of the classes.

    The Expression class, if I understand it right, should be the class
    that represents the criteria I want to use filter the objects.
    To represents the different criteria I thought to find a set of
    subclasses, one with a given logic to implement.

    Instead the only subclasses defined from the Expression class are
    subclasses with different parameters (unary, binary, trinary, list);
    all the available type of expression seems to be listed in static
    method in the Expression class (ADD, ALL, AND, ANY, ...).

    Where is the logic to use the expression to filter objects in memory?
    Where is the logic to create the SQL statement from an expression
    object? (Andrus has suggested me to look into QueryTranslator and
    QualifierTranslator)
    Where do I start if I want to add a new logical expression to the
    available ones?

    The current layout of Cayenne classes could be reasonable, but it feels
    very strange.

    Why do I need different subclasses of Expression just to store
    different kind of parameters?
    Why isn't the different logic of behaviour associated with different
    expression isolated in explicit classes?
    What am I missing in the current Cayenne classes layout that avoids me
    to understand where I should put my code?

    Thank you very much for your attention.

    Giulio Cesare



    This archive was generated by hypermail 2.0.0 : Wed Oct 01 2003 - 09:42:34 EDT