FileDocCategorySizeDatePackage
Type.javaAPI DocGlassfish v2 API4579Fri May 04 22:35:08 BST 2007com.sun.jdo.spi.persistence.support.sqlstore.query.util.type

Type

public abstract class Type extends Object
author
Michael Bouschen
version
0.1

Fields Summary
protected String
name
The name of the type represented by this object.
protected Class
clazz
The corresponding class object.
protected int
enumType
The FieldTypeEnumeration constant for this Type.
Constructors Summary
public Type(String name, Class clazz)
Creates a new Type object with the specified name.

param
name name of the type represented by this
param
clazz the class object for this type

        this(name, clazz, FieldTypeEnumeration.NOT_ENUMERATED);
    
public Type(String name, Class clazz, int enumType)
Creates a new Type object with the specified name.

param
name name of the type represented by this
param
clazz the class object for this type
param
enumType the FieldTypeEnumeration value for this type

        this.name = name;
        this.clazz = clazz;
        this.enumType = enumType;
    
Methods Summary
public booleanequals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one. Two types are equal if their names are equal.

        if (obj == this)
            return true;
        else if (obj instanceof Type)
            return this.name.equals(((Type)obj).name);
        else
            return false;
    
public intgetEnumType()
Returns the FieldTypeEnumeration value for this type.

        return enumType;
    
public java.lang.ClassgetJavaClass()
Returns the corresponding class object.

        return this.clazz;
    
public java.lang.StringgetName()
Returns the name of the type.

        return name;
    
public abstract booleanisCompatibleWith(com.sun.jdo.spi.persistence.support.sqlstore.query.util.type.Type type)
Checks type compatibility.

param
type the type this is checked with.
return
true if this is compatible with type; false otherwise.

public booleanisOrderable()
Returns whether this represents a type with an defined order.

return
true if an order is defined for this; false otherwise.

        return false;
    
public java.lang.StringtoString()
Representation of this type as a string.

        return getName();