## org.eclipse.datatools.sqltools.core.services
Class SQLDataService

    java.lang.Object
      org.eclipse.datatools.sqltools.core.services.SQLDataService

public class SQLDataService
extends java.lang.Object

A SQL Data service that handles data types and data validation.

Author:
  Hui Cao

Constructor Summary
`SQLDataService()`

Method Summary
`java.lang.String[]` `getDatatypeAliases()` Retrieves aliases for getDatatypes().e.g.
`DataTypeProvider` `getDataTypeProvider()` Returns the data type provider for this database
`java.lang.String[]` `getDatatypes()` Retrieves all datatypes used for parameters & variables.
`DataTypeValidator` `getDataTypeValidator()` Returns the data type validator for this database
`static int` `getJDBCTypeForNamedType(java.lang.String aTypeName)` Gets the JDBC datatype identifier corresponding to the given named datatype.
`ISqlDataValidator` `getSQLDataValidator(DatabaseIdentifier databaseIdentifier)` Returns a ISqlDataValidator object which is used to validate data types and values for a database

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SQLDataService

    public SQLDataService()

Method Detail

### getSQLDataValidator

    public ISqlDataValidator getSQLDataValidator(DatabaseIdentifier databaseIdentifier)

  Returns a ISqlDataValidator object which is used to validate data types and values for a database

  Parameters:
    `databaseIdentifier` - uniquely identifies a database
  Returns:
    SQL data validator

### getDatatypes

    public java.lang.String[] getDatatypes()

  Retrieves all datatypes used for parameters & variables. This is different with datatypes defined in database model in that it includes default length for some data types.

  Returns:
    data type array

### getDatatypeAliases

    public java.lang.String[] getDatatypeAliases()

  Retrieves aliases for getDatatypes().e.g. "national char" is an alias for "nchar".

  Returns:
    data type aliases

### getJDBCTypeForNamedType

    public static int getJDBCTypeForNamedType(java.lang.String aTypeName)

  Gets the JDBC datatype identifier corresponding to the given named datatype. The default implementation simply delegates to `DataTypeHelper.getJDBCTypeForNamedType(java.lang.String)`. TODO replace SQLUtil.convert2SQLType with this method

  Parameters:
    `aTypeName` - a type name to use to lookup a JDBC datatype without parentheses
  Returns:
    int a JDBC type identifier.

### getDataTypeProvider

    public DataTypeProvider getDataTypeProvider()

  Returns the data type provider for this database

  Returns:
    the data type provider

### getDataTypeValidator

    public DataTypeValidator getDataTypeValidator()

  Returns the data type validator for this database

  Returns:
    the data type validator

Copyright © 2006 Actuate, IBM Corporation, Sybase, Inc. and others. All rights reserved.