wt.query
Class FixedLengthStringExpression

java.lang.Object
  extended bywt.query.FixedLengthStringExpression
All Implemented Interfaces:
Expression, RelationalExpression, Serializable

public class FixedLengthStringExpression
extends Object
implements RelationalExpression, Serializable

This class represents a fixed length string constant in a SQL statement.

Supported API: true

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
private static DMLGenerator dmlGenerator
           
private static String RESOURCE
           
private  String value
           
 
Fields inherited from interface wt.query.RelationalExpression
BIND_PARAMETER
 
Fields inherited from interface wt.query.Expression
FROM_COUNT
 
Constructor Summary
FixedLengthStringExpression(Character a_value, int a_length, char a_fill)
          

Supported API: true
FixedLengthStringExpression(String a_value, int a_length, char a_fill)
          

Supported API: true
 
Method Summary
 Object getBindParameter()
          Gets the value of the attribute: bindParameter; Returns a bind parameter for this expression (if supported).
 List getClassAttributes()
          

Supported API: false
private  DMLGenerator getDMLGenerator()
           
 String getExpression(boolean a_useBind, Vector a_tableInfos, Vector a_aliases, boolean a_outerJoin)
          Return string representation of this expression.
 int getFromCount()
          Gets the value of the attribute: fromCount; Number of from index values that this expression requires

Supported API: false
 int setFromAlias(String[] a_aliases, int a_offset)
          This method sets the FROM clause alias for this expression.
 int validate(TableExpression[] a_tableExpressions, int a_offset)
          This method validates this expression against the specified table expression.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

value

private String value

dmlGenerator

private static DMLGenerator dmlGenerator
Constructor Detail

FixedLengthStringExpression

public FixedLengthStringExpression(String a_value,
                                   int a_length,
                                   char a_fill)


Supported API: true

Parameters:
a_value - String value.
a_length - Fixed length of the string column.
a_fill - Character to use to fill if the string size is less than a_length.

FixedLengthStringExpression

public FixedLengthStringExpression(Character a_value,
                                   int a_length,
                                   char a_fill)


Supported API: true

Parameters:
a_value - Character value for the String
a_length - Fixed length of the string column.
a_fill - Character to use to fill if the string size is less than a_length.
Method Detail

getBindParameter

public Object getBindParameter()
                        throws WTException
Gets the value of the attribute: bindParameter; Returns a bind parameter for this expression (if supported).

Supported API: false

Specified by:
getBindParameter in interface RelationalExpression
Returns:
Object
Throws:
WTException

getExpression

public String getExpression(boolean a_useBind,
                            Vector a_tableInfos,
                            Vector a_aliases,
                            boolean a_outerJoin)
                     throws QueryException
Return string representation of this expression.

Supported API: false

Specified by:
getExpression in interface RelationalExpression
Parameters:
a_useBind - Indicates that bind variables should be used for this expression.
a_tableInfos -
a_aliases -
a_outerJoin - Indicates that outer join syntax should be used for this expression.
Returns:
String
Throws:
QueryException

getClassAttributes

public List getClassAttributes()


Supported API: false

Specified by:
getClassAttributes in interface RelationalExpression
Returns:
List

getFromCount

public int getFromCount()
Gets the value of the attribute: fromCount; Number of from index values that this expression requires

Supported API: false

Specified by:
getFromCount in interface Expression
Returns:
int

validate

public int validate(TableExpression[] a_tableExpressions,
                    int a_offset)
             throws QueryException
This method validates this expression against the specified table expression. A QueryException is thrown if this expression is not valid.

Supported API: false

Specified by:
validate in interface Expression
Parameters:
a_tableExpressions - Table expression to validate against.
a_offset - Offset index into the TableExpression array for the next valid TableExpression
Returns:
number of TableExpressions validated
Throws:
QueryException

setFromAlias

public int setFromAlias(String[] a_aliases,
                        int a_offset)
This method sets the FROM clause alias for this expression. This alias is used in this Expression in place of the corresponding TableExpression.

Supported API: false

Specified by:
setFromAlias in interface Expression
Parameters:
a_aliases - Array of aliases for expressions
a_offset - Offset index into the alias array for the next valid alias
Returns:
number of aliases used

getDMLGenerator

private DMLGenerator getDMLGenerator()