|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.beasys.commerce.util.TypesHelper
A helper with constants for the various types and operators for configurable entity properties.
In general, there are 6 types of properties for configurable entities,
represented by constants on this class. Each of those types corresponds to
a Java object type as follows:
Constant Name | Constant Value | Class |
---|---|---|
BOOLEAN | 0 | java.lang.Boolean |
INTEGER | 1 | java.lang.Long |
FLOAT | 2 | java.lang.Double |
TEXT | 3 | java.lang.String |
DATETIME | 4 | java.sql.Timestamp |
USER_DEFINED | 5 | java.lang.Object |
java.util.Collection
of objects of the property's
type (e.g. java.lang.String's).
This class provides utility methods to get string representations of the type names, to determine a type from a java.sql.Type, and to get the list of comparision operators for a certain type.
Field Summary | |
static java.lang.String |
AND
The "and" ( && ) logical operator. |
static int |
BOOLEAN
The constant for a boolean type (0). |
static java.lang.String |
CONTAINS
The contains (" contains ") comparator constant. |
static java.lang.String |
CONTAINS_ALL
The contains all (" containsall ") comparator constant. |
static int |
DATETIME
The constant for a datetime type (4). |
static java.lang.String |
EQUALS
The equals ( == ) comparator constant. |
static int |
FLOAT
The constant for the floating-point numeric type (2). |
static java.lang.String |
GREATER_THAN
The greater than ( > ) comparator constant. |
static java.lang.String |
GREATER_THAN_EQUALS
The greater than or equals ( >= ) comparator constant. |
static int |
INTEGER
The constant for a numeric type (1). |
static java.lang.String |
LESS_THAN
The less than ( < ) comparator constant. |
static java.lang.String |
LESS_THAN_EQUALS
The less than or equals ( <= ) comparator constant. |
static java.lang.String |
LIKE
The wildcard pattern (" like ") comparator constant. |
static int |
MULTI_VALUED
The constant for a multivalued type (6). |
static java.lang.String |
NOT_EQUALS
The not equals ( != ) comparator constant. |
static java.lang.String |
OR
The "or" ( || ) logical operator. |
static int |
TEXT
The constant for a text type (3). |
static int |
USER_DEFINED
The constant for a user defined type (5). |
Constructor Summary | |
TypesHelper()
|
Method Summary | |
static int |
fromSQLType(int sqlType)
Convert a java.sql.Types constant into one of ours. |
static java.util.List |
getComparators(int type)
Get the list of comparators for a given attribute type. |
static java.lang.String |
getDisplayName(java.lang.String comparator)
Get the display name for the given comparator. |
static java.lang.String |
getTypeName(int type)
Get the descriptive type name from the type. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int BOOLEAN
public static final int INTEGER
public static final int FLOAT
public static final int TEXT
public static final int DATETIME
public static final int USER_DEFINED
public static final int MULTI_VALUED
public static final java.lang.String EQUALS
==
) comparator constant.public static final java.lang.String NOT_EQUALS
!=
) comparator constant.public static final java.lang.String GREATER_THAN
>
) comparator constant.public static final java.lang.String LESS_THAN
<
) comparator constant.public static final java.lang.String GREATER_THAN_EQUALS
>=
) comparator constant.public static final java.lang.String LESS_THAN_EQUALS
<=
) comparator constant.public static final java.lang.String LIKE
like
") comparator constant.public static final java.lang.String CONTAINS
contains
") comparator constant.public static final java.lang.String CONTAINS_ALL
containsall
") comparator constant.public static final java.lang.String AND
&&
) logical operator.public static final java.lang.String OR
||
) logical operator.Constructor Detail |
public TypesHelper()
Method Detail |
public static int fromSQLType(int sqlType)
sqlType
- value from java.sql.Types.public static java.lang.String getTypeName(int type)
type
- the type (BOOLEAN, NUMERIC, TEXT, DATETIME, MULTI_VALUED,
USER_DEFINED).public static java.util.List getComparators(int type)
public static java.lang.String getDisplayName(java.lang.String comparator)
|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |