public enum AttributeType extends Enum<AttributeType>
Enum Constant and Description |
---|
BOOLEAN
Boolean type
|
BYTE
Byte type
|
CHAR
Character type
|
DATE
Date type
|
DOUBLE
Double type
|
ENUM
Enum type
|
FLOAT
Float type
|
INT
Integer type
|
LONG
Long type
|
SHORT
Short type
|
SQL_DATE
SQL Date type
|
STRING
String type
|
Modifier and Type | Method and Description |
---|---|
static Set<Class<?>> |
getSupportedJavaTypes() |
boolean |
isComparable()
Is this type comparable?
|
static boolean |
isSupportedType(Object value)
Test the given value to see if it is a legal type
|
static AttributeType |
typeFor(Class<?> c)
Get the appropriate @{link
AttributeType enum for the given Java Class |
static AttributeType |
typeFor(String name,
Object value)
Get the appropriate @{link
AttributeType enum for the given object value. |
abstract void |
validateValue(String name,
Object value)
Validate that the given value is in fact of the correct type
|
static AttributeType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static AttributeType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final AttributeType BOOLEAN
public static final AttributeType BYTE
public static final AttributeType CHAR
public static final AttributeType DOUBLE
public static final AttributeType FLOAT
public static final AttributeType INT
public static final AttributeType LONG
public static final AttributeType SHORT
public static final AttributeType DATE
public static final AttributeType SQL_DATE
public static final AttributeType ENUM
public static final AttributeType STRING
public static AttributeType[] values()
for (AttributeType c : AttributeType.values()) System.out.println(c);
public static AttributeType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static AttributeType typeFor(String name, Object value) throws SearchException
AttributeType
enum for the given object value.name
- the attribute name (only meaningful to message if exception thrown)value
- the value to lookup the type forSearchException
- if the given value is not valid for a search attributepublic static AttributeType typeFor(Class<?> c)
AttributeType
enum for the given Java Class
c
- public static boolean isSupportedType(Object value)
value
- public abstract void validateValue(String name, Object value) throws SearchException
name
- the attribute name (only meaningful to message if exception thrown)value
- the value to validate against this typeSearchException
- if the given value is not a valid instance of this typepublic boolean isComparable()
Copyright © 2003–2016 Terracotta, Inc.. All rights reserved.