© 2002 BEA Systems, Inc.


com.beasys.commerce.util
Class TypesHelper

java.lang.Object
  |
  +--com.beasys.commerce.util.TypesHelper

Deprecated. Use Expression and subclasses instead.

public class TypesHelper
extends java.lang.Object

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 NameConstant ValueClass
BOOLEAN0java.lang.Boolean
INTEGER1java.lang.Long
FLOAT2java.lang.Double
TEXT3java.lang.String
DATETIME4java.sql.Timestamp
USER_DEFINED5 java.lang.Object
Additionally, a property can also be multi-valued, in which case the value will be a 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.

See Also:
ExpressionHelper

Field Summary
static java.lang.String AND
          Deprecated. The "and" (&&) logical operator.
static int BOOLEAN
          Deprecated. The constant for a boolean type (0).
static java.lang.String CONTAINS
          Deprecated. The contains ("contains") comparator constant.
static java.lang.String CONTAINS_ALL
          Deprecated. The contains all ("containsall") comparator constant.
static int DATETIME
          Deprecated. The constant for a datetime type (4).
static java.lang.String EQUALS
          Deprecated. The equals (==) comparator constant.
static int FLOAT
          Deprecated. The constant for the floating-point numeric type (2).
static java.lang.String GREATER_THAN
          Deprecated. The greater than (>) comparator constant.
static java.lang.String GREATER_THAN_EQUALS
          Deprecated. The greater than or equals (>=) comparator constant.
static int INTEGER
          Deprecated. The constant for a numeric type (1).
static java.lang.String LESS_THAN
          Deprecated. The less than (<) comparator constant.
static java.lang.String LESS_THAN_EQUALS
          Deprecated. The less than or equals (<=) comparator constant.
static java.lang.String LIKE
          Deprecated. The wildcard pattern ("like") comparator constant.
static java.lang.String LIKE_IGNORECASE
          Deprecated. The wildcard pattern ("likeignorecase") comparator constant.
static int MULTI_VALUED
          Deprecated. The constant for a multivalued type (6).
static java.lang.String NOT_EQUALS
          Deprecated. The not equals (!=) comparator constant.
static java.lang.String OR
          Deprecated. The "or" (||) logical operator.
static int TEXT
          Deprecated. The constant for a text type (3).
static int USER_DEFINED
          Deprecated. The constant for a user defined type (5).
 
Constructor Summary
TypesHelper()
          Deprecated.  
 
Method Summary
static int fromSQLType(int sqlType)
          Deprecated. Convert a java.sql.Types constant into one of ours.
static java.util.List getComparators(int type)
          Deprecated. Get the list of comparators for a given attribute type.
static java.lang.String getDisplayName(java.lang.String comparator)
          Deprecated. Get the display name for the given comparator.
static java.lang.String getTypeName(int type)
          Deprecated. 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

BOOLEAN

public static final int BOOLEAN
Deprecated. 
The constant for a boolean type (0).

INTEGER

public static final int INTEGER
Deprecated. 
The constant for a numeric type (1).

FLOAT

public static final int FLOAT
Deprecated. 
The constant for the floating-point numeric type (2).

TEXT

public static final int TEXT
Deprecated. 
The constant for a text type (3).

DATETIME

public static final int DATETIME
Deprecated. 
The constant for a datetime type (4).

USER_DEFINED

public static final int USER_DEFINED
Deprecated. 
The constant for a user defined type (5).

MULTI_VALUED

public static final int MULTI_VALUED
Deprecated. 
The constant for a multivalued type (6).

EQUALS

public static final java.lang.String EQUALS
Deprecated. 
The equals (==) comparator constant.

NOT_EQUALS

public static final java.lang.String NOT_EQUALS
Deprecated. 
The not equals (!=) comparator constant.

GREATER_THAN

public static final java.lang.String GREATER_THAN
Deprecated. 
The greater than (>) comparator constant.

LESS_THAN

public static final java.lang.String LESS_THAN
Deprecated. 
The less than (<) comparator constant.

GREATER_THAN_EQUALS

public static final java.lang.String GREATER_THAN_EQUALS
Deprecated. 
The greater than or equals (>=) comparator constant.

LESS_THAN_EQUALS

public static final java.lang.String LESS_THAN_EQUALS
Deprecated. 
The less than or equals (<=) comparator constant.

LIKE

public static final java.lang.String LIKE
Deprecated. 
The wildcard pattern ("like") comparator constant.

LIKE_IGNORECASE

public static final java.lang.String LIKE_IGNORECASE
Deprecated. 
The wildcard pattern ("likeignorecase") comparator constant.

CONTAINS

public static final java.lang.String CONTAINS
Deprecated. 
The contains ("contains") comparator constant.

CONTAINS_ALL

public static final java.lang.String CONTAINS_ALL
Deprecated. 
The contains all ("containsall") comparator constant.

AND

public static final java.lang.String AND
Deprecated. 
The "and" (&&) logical operator.

OR

public static final java.lang.String OR
Deprecated. 
The "or" (||) logical operator.
Constructor Detail

TypesHelper

public TypesHelper()
Deprecated. 
Method Detail

fromSQLType

public static int fromSQLType(int sqlType)
Deprecated. 
Convert a java.sql.Types constant into one of ours.

Parameters:
sqlType - value from java.sql.Types.
Returns:
the corresponding attribute type (BOOLEAN, NUMERIC, TEXT, DATETIME, MULTI_VALUED, or USER_DEFINED).

getTypeName

public static java.lang.String getTypeName(int type)
Deprecated. 
Get the descriptive type name from the type.

Parameters:
type - the type (BOOLEAN, NUMERIC, TEXT, DATETIME, MULTI_VALUED, USER_DEFINED).
Returns:
the type name as a String.

getComparators

public static java.util.List getComparators(int type)
Deprecated. 
Get the list of comparators for a given attribute type.

Returns:
an unmodifiable List of comparators represented by the constants in this class.

getDisplayName

public static java.lang.String getDisplayName(java.lang.String comparator)
Deprecated. 
Get the display name for the given comparator.

© 2002 BEA Systems, Inc.

Copyright © 2002 BEA Systems, Inc. All Rights Reserved