public enum TextMatchStyle extends java.lang.Enum<TextMatchStyle> implements ValueEnum
AdvancedCriteria
.Enum Constant and Description |
---|
EXACT
case-insensitive exact match ("foo" matches "foo" and "FoO", but not "FooBar")
|
EXACT_CASE
case-sensitive exact match ("foo" matches only "foo")
|
STARTS_WITH
case-insensitive prefix match ("foo" matches "FooBar" but not "BarFoo")
|
SUBSTRING
case-insenstive substring match ("foo" matches "foobar" and "BarFoo")
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getValue() |
static TextMatchStyle |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static TextMatchStyle[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TextMatchStyle EXACT
If this enumerated value is used in a Component XML
file or server-side DataSource descriptor (.ds.xml file), use the value "exact".
public static final TextMatchStyle EXACT_CASE
If this enumerated value is used in a Component XML
file or server-side DataSource descriptor (.ds.xml file), use the value "exactCase".
public static final TextMatchStyle SUBSTRING
If this enumerated value is used in a Component XML
file or server-side DataSource descriptor (.ds.xml file), use the value "substring".
public static final TextMatchStyle STARTS_WITH
textMatchStyle behavior is consistent across the client and all three of the built-in server DataSource implementations - SQL, Hibernate and JPA - to the maximum extent that is practical. Known inconsistencies, some of which can be tweaked with configuration settings, are described below
ignoreTextMatchStyle
declaration. This behavior is
consistent across client and server implementations, with the proviso that case-sensitive behavior is inherently
inconsistent in the server-side implementations (see below for a more detailed discussion of this)field types
. Such fields are always checked for equality. If you have
a need for more complex matching, such as date-range checking, use AdvancedCriteriaDate
objects on the client, instances of
java.util.Date
on the server). Attempting to match against a string or any other type of value will result
in an "always fails" clause being generated. This behavior is how the client code has always worked, but is a change
for the server-side DataSources, in the interests of consistency. The previous behavior was:server.properties
file:
sql.temporal.fields.require.date.criteria: false
server.properties
file:
jpa.temporal.fields.require.date.criteria: false
or hibernate.temporal.fields.require.date.criteria:
false
, as appropriateincludeFrom
declarations or entity
relations in Hibernate or JPA. Again, such comparisons are always for equalityserver.properties
file: sql.substring.numeric.criteria: true
or
hibernate.substring.numeric.criteria: true
or jpa.substring.numeric.criteria: true
, as
appropriateSET IGNORECASE
directive - see here
If this enumerated value is used in a Component XML
file or server-side DataSource descriptor (.ds.xml file), use the value "startsWith".
public static TextMatchStyle[] values()
for (TextMatchStyle c : TextMatchStyle.values()) System.out.println(c);
public static TextMatchStyle valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null