Skip to content

Use enums for MatchCriteria operators #16

@GoogleCodeExporter

Description

@GoogleCodeExporter
Instead of using the String constants MatchCriteria.EQUALS, 
MatchCriteria.GREATER, etc, an enum should be created for these operators.

This way, we could better assure the type safety of MatchCriteria's 
constructors, that currently will accept anything as a valid operator. 
e.g.:

 Criteria criteria = new MatchCriteria(myColumn, "~=", 42);

The constructors accepting String should be @deprecated and their 
implementation would be changed to use the correct enum value (or throw 
java.lang.IllegalArgumentException).

Original issue reported on code.google.com by brunoabdon on 6 Aug 2010 at 5:06

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions