org.teiid.connector.metadata.runtime
Interface TypeModel

All Known Subinterfaces:
Element, Parameter

public interface TypeModel

Since:
4.3

Field Summary
static int NOT_NULLABLE
          Nullability constant - indicates column does not allow nulls
static int NOT_SEARCHABLE
          Searchability constant - indicates column is not searchable (cannot be evaluated in a comparison).
static int NULLABLE
          Nullability constant - indicates column does allow nulls
static int NULLABLE_UNKNOWN
          Nullability constant - indicates column may or may not allow nulls
static int SEARCHABLE
          Searchability constant - indicates column can be searched by either a comparison or a LIKE.
static int SEARCHABLE_COMPARE
          Searchability constant - indicates column can be searched with a comparison but not with a LIKE
static int SEARCHABLE_LIKE
          Searchability constant - indicates column can be searched with a LIKE but not with a comparison
 
Method Summary
 java.lang.Object getDefaultValue()
          Get default value of this element.
 java.lang.Class getJavaType()
          Get the expected Java class that should be returned for this element.
 int getLength()
          Get length of this element or 0 if no length is available.
 java.lang.String getModeledBaseType()
          Get the base type of the design-time model type name.
 java.lang.String getModeledPrimitiveType()
          Get the primitive type of the design-time model type name.
 java.lang.String getModeledType()
          Get the design-time model type name.
 int getNullability()
          Get nullability of this column.
 int getPrecision()
          Get precision of this column.
 int getScale()
          Get scale of this column.
 

Field Detail

NOT_NULLABLE

static final int NOT_NULLABLE
Nullability constant - indicates column does not allow nulls

See Also:
Constant Field Values

NOT_SEARCHABLE

static final int NOT_SEARCHABLE
Searchability constant - indicates column is not searchable (cannot be evaluated in a comparison).

See Also:
Constant Field Values

NULLABLE

static final int NULLABLE
Nullability constant - indicates column does allow nulls

See Also:
Constant Field Values

NULLABLE_UNKNOWN

static final int NULLABLE_UNKNOWN
Nullability constant - indicates column may or may not allow nulls

See Also:
Constant Field Values

SEARCHABLE

static final int SEARCHABLE
Searchability constant - indicates column can be searched by either a comparison or a LIKE.

See Also:
Constant Field Values

SEARCHABLE_COMPARE

static final int SEARCHABLE_COMPARE
Searchability constant - indicates column can be searched with a comparison but not with a LIKE

See Also:
Constant Field Values

SEARCHABLE_LIKE

static final int SEARCHABLE_LIKE
Searchability constant - indicates column can be searched with a LIKE but not with a comparison

See Also:
Constant Field Values
Method Detail

getJavaType

java.lang.Class getJavaType()
                            throws ConnectorException
Get the expected Java class that should be returned for this element.

Returns:
Data type as Java class
Throws:
ConnectorException - If an error occurs retrieving the data from runtime metadata

getNullability

int getNullability()
                   throws ConnectorException
Get nullability of this column.

Returns:
Code indicating nullability
Throws:
ConnectorException - If an error occurs retrieving the data from runtime metadata
See Also:
NOT_NULLABLE, NULLABLE, NULLABLE_UNKNOWN

getDefaultValue

java.lang.Object getDefaultValue()
                                 throws ConnectorException
Get default value of this element.

Returns:
Default value, may be null
Throws:
ConnectorException - If an error occurs retrieving the data from runtime metadata

getLength

int getLength()
              throws ConnectorException
Get length of this element or 0 if no length is available.

Returns:
Length of this element
Throws:
ConnectorException - If an error occurs retrieving the data from runtime metadata

getPrecision

int getPrecision()
                 throws ConnectorException
Get precision of this column.

Returns:
Precision
Throws:
ConnectorException - If an error occurs retrieving the data from runtime metadata
Since:
4.2

getScale

int getScale()
             throws ConnectorException
Get scale of this column.

Returns:
Scale
Throws:
ConnectorException - If an error occurs retrieving the data from runtime metadata
Since:
4.3.2

getModeledType

java.lang.String getModeledType()
                                throws ConnectorException
Get the design-time model type name.

Returns:
Model type name
Throws:
ConnectorException - If an error occurs retrieving the data from runtime metadata
Since:
5.0

getModeledBaseType

java.lang.String getModeledBaseType()
                                    throws ConnectorException
Get the base type of the design-time model type name.

Returns:
Model base type name
Throws:
ConnectorException - If an error occurs retrieving the data from runtime metadata
Since:
5.0

getModeledPrimitiveType

java.lang.String getModeledPrimitiveType()
                                         throws ConnectorException
Get the primitive type of the design-time model type name.

Returns:
Model primitive type name
Throws:
ConnectorException - If an error occurs retrieving the data from runtime metadata
Since:
5.0


Copyright © 2009. All Rights Reserved.