## org.eclipse.datatools.sqltools.sql.identifier
Class DefaultIdentifierValidator

    java.lang.Object
      org.eclipse.datatools.sqltools.sql.identifier.DefaultIdentifierValidator

All Implemented Interfaces:
  IIdentifierValidator

Direct Known Subclasses:
  ASAIdentifierValidator

    public class DefaultIdentifierValidator

extends java.lang.Object
implements IIdentifierValidator

This class is the default implementation of IIdentifierValidator interface

Author:
  wanh

Field Summary
`static int` `MAXIMUM_ID_LENGTH`

Fields inherited from interface org.eclipse.datatools.sqltools.sql.identifier.IIdentifierValidator
`IDENTIFIER_TYPE_COLUM, IDENTIFIER_TYPE_CURSOR, IDENTIFIER_TYPE_EVENT, IDENTIFIER_TYPE_INDEX, IDENTIFIER_TYPE_LOCAL_VARAIBLE, IDENTIFIER_TYPE_PARAMETER, IDENTIFIER_TYPE_RULES, IDENTIFIER_TYPE_SP, IDENTIFIER_TYPE_TABLE, IDENTIFIER_TYPE_TRIGGER, IDENTIFIER_TYPE_UDF, IDENTIFIER_TYPE_UNKNOW, IDENTIFIER_TYPE_VIEW`

Constructor Summary
`DefaultIdentifierValidator()`

Method Summary
`ValidatorMessage` `doValidCheck(java.lang.String value, int identifierType, org.eclipse.datatools.sqltools.core.DatabaseIdentifier databaseIdentifier)` This method is not encouraged to overrided, if you want to add new validate rule, you can add it in checkCustomization method
`static IIdentifierValidator` `getInstance()` Get the DefaultIdentifierValidator Instance
`int` `getMaximumIdLength(int idType)` The default implementation returns the minimum supported maximum length across vendors
`static boolean` `isCurrencySymbol(char c)` Check the given if it is a currency symbol
`ValidatorMessage` `isValid(java.lang.String value, int identifierType, org.eclipse.datatools.sqltools.core.DatabaseIdentifier databaseIdentifier)` This method is not encouraged to overrided, if you want to add new validate rule, you can add it in checkCustomization method
`void` `setLevel(int level)` (non-Javadoc)

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

Field Detail

### MAXIMUM_ID_LENGTH

    public static final int MAXIMUM_ID_LENGTH

See Also:
  Constant Field Values

Constructor Detail

### DefaultIdentifierValidator

    public DefaultIdentifierValidator()

Method Detail

### getInstance

    public static IIdentifierValidator getInstance()

  Get the DefaultIdentifierValidator Instance

  Returns:

### isValid

    public ValidatorMessage isValid(java.lang.String value,
                                    int identifierType,
                                    org.eclipse.datatools.sqltools.core.DatabaseIdentifier databaseIdentifier)

  This method is not encouraged to overrided, if you want to add new validate rule, you can add it in checkCustomization method

  Specified by:
    `isValid` in interface `IIdentifierValidator`
  Parameters:
    `value` -
    `identifierType` -
    `databaseIdentifier` -
  Returns:

### doValidCheck

    public ValidatorMessage doValidCheck(java.lang.String value,
                                         int identifierType,
                                         org.eclipse.datatools.sqltools.core.DatabaseIdentifier databaseIdentifier)

  This method is not encouraged to overrided, if you want to add new validate rule, you can add it in checkCustomization method

  Parameters:
    `value` -
    `identifierType` -
    `databaseIdentifier` -
  Returns:

### isCurrencySymbol

    public static boolean isCurrencySymbol(char c)

  Check the given if it is a currency symbol

  Parameters:
    `c` - given character
  Returns:
    boolean value

### getMaximumIdLength

    public int getMaximumIdLength(int idType)

  The default implementation returns the minimum supported maximum length across vendors

  Specified by:
    `getMaximumIdLength` in interface `IIdentifierValidator`
  Parameters:
    `idType` - the identifier type @see IIdentifierValidator
  Returns:

### setLevel

    public void setLevel(int level)

  (non-Javadoc)

  Specified by:
    `setLevel` in interface `IIdentifierValidator`
  Parameters:
    `level` - error message level
  See Also:
    `org.eclipse.datatools.sqltools.parser.IIdentifierValidator#setLevel(int)`