Ignore:
Timestamp:
Oct 21, 2011, 3:37:55 PM (13 years ago)
Author:
fmguler
Message:

Fixed typed criteria method parameters from Criteria.eq(String attribute, String value) to eq(String attribute, Object value). They accept values of any type, e.g. int, string, date.

Turned off debug messages by default. They can be enabled by setting Ven.setDebug(true).

Updated to Netbeans 7.0.1, which updated build-impl.xml, nothing to do with functionality.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/fmgVen/src/com/fmguler/ven/Criteria.java

    r30 r32  
    104104     * Add a criterion where an attribue equals a value (SQL = operator) 
    105105     */ 
    106     public Criteria eq(String attribute, String value) { 
     106    public Criteria eq(String attribute, Object value) { 
    107107        criterionList.add(new Criterion(attribute, Criterion.OP_EQUALS, value)); 
    108108        return this; 
     
    112112     * Add a criterion where an attribue is like a value (SQL like operator) 
    113113     */ 
    114     public Criteria like(String attribute, String value) { 
     114    public Criteria like(String attribute, Object value) { 
    115115        criterionList.add(new Criterion(attribute, Criterion.OP_LIKE, value)); 
    116116        return this; 
     
    120120     * Add a criterion where an attribue is similar to a value (SQL similar to operator) 
    121121     */ 
    122     public Criteria similarto(String attribute, String value) { 
     122    public Criteria similarto(String attribute, Object value) { 
    123123        criterionList.add(new Criterion(attribute, Criterion.OP_SIMILAR_TO, value)); 
    124124        return this; 
     
    128128     * Add a criterion where an attribue is greater than a value (SQL > operator) 
    129129     */ 
    130     public Criteria gt(String attribute, String value) { 
     130    public Criteria gt(String attribute, Object value) { 
    131131        criterionList.add(new Criterion(attribute, Criterion.OP_GREATER_THAN, value)); 
    132132        return this; 
     
    136136     * Add a criterion where an attribue is less than a value (SQL < operator) 
    137137     */ 
    138     public Criteria lt(String attribute, String value) { 
     138    public Criteria lt(String attribute, Object value) { 
    139139        criterionList.add(new Criterion(attribute, Criterion.OP_LESS_THAN, value)); 
    140140        return this; 
Note: See TracChangeset for help on using the changeset viewer.