db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wenderdel, Carsten (LNG-MUE)" <Carsten.Wender...@lexisnexis.de>
Subject Mistakes in JavaDoc of Criteria
Date Wed, 01 Feb 2006 09:44:27 GMT
Hi,

I'm not sure whether this is the proper place or it is an unknown issue - if
not I apologize.

I just read the API
http://db.apache.org/torque/runtime/apidocs/org/apache/torque/util/Criteria.
html and have found some mistakes.

For example the method
    public Criteria add(java.lang.String column,
                        java.lang.Object value,
                        SqlEnum comparison)
is commented:

    If is used as follow:
    Criteria crit = new Criteria().add("column", "value",
        "Criterion.GREATER_THAN");

This should be wrong as comparison is an object of SQLEnum and not of
String. Furthermore Criterion has not a static field "GREATER_THAN", so imo
it should be:

    This is used as follows:
    Criteria crit = new Criteria().add("column", "value",
        Criteria.GREATER_THAN);


This applies also to following methods:

public Criteria add(java.lang.String table,
                    java.lang.String column,
                    java.lang.Object value,
                    SqlEnum comparison)

public Criteria and(java.lang.String column,
                    java.lang.Object value,
                    SqlEnum comparison)

public Criteria and(java.lang.String table,
                    java.lang.String column,
                    java.lang.Object value,
                    SqlEnum comparison)

public Criteria or(java.lang.String column,
                   java.lang.Object value,
                   SqlEnum comparison)

public Criteria or(java.lang.String table,
                   java.lang.String column,
                   java.lang.Object value,
                   SqlEnum comparison)

Regards, Carsten

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message