ajax.type
Class BuiltInType

java.lang.Object
  |
  +--ajax.type.Type
        |
        +--ajax.type.BuiltInType

public class BuiltInType
extends Type

Class BuiltInType represents the built-in types: int, float, boolean, char and string. The instance variable this.name is the name of the built-in type (int, float, etc ...) represented by each instance of this class. This stores the maximal size for the string type. If not specidfied, this string size is set to STR_DEFAULT_SIZE.


Field Summary
protected static int STR_DEFAULT_SIZE
           
 
Fields inherited from class ajax.type.Type
BOOLEAN, CHAR, DATE, FLOAT, INTEGER, LIST, OBJECTARRAY, STRING, TABLE
 
Constructor Summary
protected BuiltInType(int size)
          Constructs a STRING built-in type with the given maximal size.
  BuiltInType(java.lang.String name)
          Constructs a built-in type from its string name.
 
Method Summary
 boolean equals(Type other)
          Compares this type to another type.
 java.lang.String getName()
          Gets the type name
 java.lang.String toDBaseType(boolean function)
          Converts this type into the database corresponding one In this case: Oracle types
 java.lang.String toJavaType()
          Converts this type into the Java corresponding one
 java.lang.String toString()
          Produces a human-readable version of the type.
 
Methods inherited from class ajax.type.Type
ARRAY, getBaseType, STRING
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

STR_DEFAULT_SIZE

protected static final int STR_DEFAULT_SIZE
Constructor Detail

BuiltInType

public BuiltInType(java.lang.String name)
Constructs a built-in type from its string name.

BuiltInType

protected BuiltInType(int size)
Constructs a STRING built-in type with the given maximal size.
Method Detail

getName

public java.lang.String getName()
Description copied from class: Type
Gets the type name
Overrides:
getName in class Type
Returns:
name of the type.

equals

public boolean equals(Type other)
Compares this type to another type.
Overrides:
equals in class Type
Returns:
true if this type equals the other type

toString

public java.lang.String toString()
Produces a human-readable version of the type.
Overrides:
toString in class Type
Returns:
a string representing the type.

toDBaseType

public java.lang.String toDBaseType(boolean function)
                             throws AjaxTypeException
Converts this type into the database corresponding one In this case: Oracle types
Overrides:
toDBaseType in class Type

toJavaType

public java.lang.String toJavaType()
                            throws AjaxTypeException
Converts this type into the Java corresponding one
Overrides:
toJavaType in class Type