## org.eclipse.datatools.modelbase.sql.datatypes
Interface CharacterStringDataType

All Superinterfaces:
  DataType, PredefinedDataType, SQLDataType, SQLObject

All Known Implementing Classes:
  CharacterStringDataTypeImpl

public interface CharacterStringDataType
extends PredefinedDataType

A representation of the model object 'Character String Data Type'. 4.1 Data types For reference purposes: - The data types CHARACTER , CHARACTER VARYING , and CHARACTER LARGE OBJECT are collectively referred to as character string types. - The data type BINARY LARGE OBJECT is referred to as the binary string type and the values of binary string types are referred to as binary strings. - The data types CHARACTER LARGE OBJECT and BINARY LARGE OBJECT are collectively referred to as large object string types and the values of large object string types are referred to as large object strings. - Character string types and binary string types are collectively referred to as string types and values of string types are referred to as strings. 4.2 Character strings A character string is a sequence of characters. All the characters in a character string are taken from a single character set. A character string has a length, which is the number of characters in the sequence. The length is 0 (zero) or a positive integer. A character string type is described by a character string type descriptor. A character string type descriptor contains: - The name of the specific character string type (CHARACTER , CHARACTER VARYING , and CHARACTER LARGE OBJECT ; NATIONAL CHARACTER , NATIONAL CHARACTER VARYING , and NATIONAL CHARACTER LARGE OBJECT are represented as CHARACTER , CHARACTER VARYING , and CHARACTER LARGE OBJECT , respectively). - The length or maximum length in characters of the character string type. - The catalog name, schema name, and character set name of the character set of the character string type. - The catalog name, schema name, and collation name of the collation of the character string type. The character set of a character string type may be specified explicitly or implicitly. The <key word>s NATIONAL CHARACTER are used to specify an implementation-defined character set. Special syntax (N'string') is provided for representing literals in that character set. With two exceptions, a character string expression is assignable only to sites of a character string type whose character set is the same. The exceptions are as specified in Subclause 4.2.7, "Universal character sets", and such other cases as may be implementation-defined. If a store assignment would result in the loss of non-<space> characters due to truncation, then an exception condition is raised. If a retrieval assignment or evaluation of a <cast specification> would result in the loss of characters due to truncation, then a warning condition is raised. Character sets fall into three categories: those defined by national or international standards, those defined by SQL-implementations, and those defined by applications. The character sets defined by ISO/IEC 10646 and The Unicode Standard are known as Universal Character Sets (UCS) and their treatment is described in Subclause 4.2.7, "Universal character sets". Every character set contains the <space> character (equivalent to U+0020). An application defines a character set by assigning a new name to a character set from one of the first two categories. They can be defined to "reside" in any schema chosen by the application. Character sets defined by standards or by SQL-implementations reside in the Information Schema (named INFORMATION_SCHEMA) in each catalog, as do collations defined by standards and collations, transliterations, and transcodings defined by SQL-implementations. NOTE 9 : The Information Schema is defined in ISO/IEC 9075-11.

The following features are supported:

- `Length`
- `Coercibility`
- `Fixed Length`
- `Collation Name`
- `Character Set`

See Also:
  `SQLDataTypesPackage.getCharacterStringDataType()`

Method Summary
`CharacterSet` `getCharacterSet()` Returns the value of the 'Character Set' reference.
`CoercibilityType` `getCoercibility()` Returns the value of the 'Coercibility' attribute.
`java.lang.String` `getCollationName()` Returns the value of the 'Collation Name' attribute.
`int` `getLength()` Returns the value of the 'Length' attribute.
`boolean` `isFixedLength()` Returns the value of the 'Fixed Length' attribute.
`void` `setCharacterSet(CharacterSet value)` Sets the value of the '`Character Set`' reference.
`void` `setCoercibility(CoercibilityType value)` Sets the value of the '`Coercibility`' attribute.
`void` `setCollationName(java.lang.String value)` Sets the value of the '`Collation Name`' attribute.
`void` `setLength(int value)` Sets the value of the '`Length`' attribute.

Methods inherited from interface org.eclipse.datatools.modelbase.sql.datatypes.PredefinedDataType
`getPrimitiveType, setPrimitiveType`

Methods inherited from interface org.eclipse.datatools.modelbase.sql.datatypes.DataType
`setContainer`

Methods inherited from interface org.eclipse.datatools.modelbase.sql.schema.SQLObject
`addEAnnotation, addEAnnotationDetail, getDependencies, getDescription, getEAnnotation, getEAnnotationDetail, getLabel, removeEAnnotationDetail, setAnnotationDetail, setDescription, setLabel`

Method Detail

### getLength

    public int getLength()

  Returns the value of the 'Length' attribute. The default value is `"1"`.

  If the meaning of the 'Length' attribute isn't clear, there really should be more of a description here...

  Returns:
    the value of the 'Length' attribute.
  See Also:
    `setLength(int)`, `SQLDataTypesPackage.getCharacterStringDataType_Length()`

### setLength

    public void setLength(int value)

  Sets the value of the '`Length`' attribute.

  Parameters:
    `value` - the new value of the 'Length' attribute.
  See Also:
    `getLength()`

### getCoercibility

    public CoercibilityType getCoercibility()

  Returns the value of the 'Coercibility' attribute. The literals are from the enumeration `CoercibilityType`.

  If the meaning of the 'Coercibility' attribute isn't clear, there really should be more of a description here...

  Returns:
    the value of the 'Coercibility' attribute.
  See Also:
    `CoercibilityType`, `setCoercibility(CoercibilityType)`, `SQLDataTypesPackage.getCharacterStringDataType_Coercibility()`

### setCoercibility

    public void setCoercibility(CoercibilityType value)

  Sets the value of the '`Coercibility`' attribute.

  Parameters:
    `value` - the new value of the 'Coercibility' attribute.
  See Also:
    `CoercibilityType`, `getCoercibility()`

### isFixedLength

    public boolean isFixedLength()

  Returns the value of the 'Fixed Length' attribute.

  If the meaning of the 'Fixed Length' attribute isn't clear, there really should be more of a description here...

  Returns:
    the value of the 'Fixed Length' attribute.
  See Also:
    `SQLDataTypesPackage.getCharacterStringDataType_FixedLength()`

### getCollationName

    public java.lang.String getCollationName()

  Returns the value of the 'Collation Name' attribute.

  If the meaning of the 'Collation Name' attribute isn't clear, there really should be more of a description here...

  Returns:
    the value of the 'Collation Name' attribute.
  See Also:
    `setCollationName(String)`, `SQLDataTypesPackage.getCharacterStringDataType_CollationName()`

### setCollationName

    public void setCollationName(java.lang.String value)

  Sets the value of the '`Collation Name`' attribute.

  Parameters:
    `value` - the new value of the 'Collation Name' attribute.
  See Also:
    `getCollationName()`

### getCharacterSet

    public CharacterSet getCharacterSet()

  Returns the value of the 'Character Set' reference.

  If the meaning of the 'Character Set' reference isn't clear, there really should be more of a description here...

  Returns:
    the value of the 'Character Set' reference.
  See Also:
    `setCharacterSet(CharacterSet)`, `SQLDataTypesPackage.getCharacterStringDataType_CharacterSet()`

### setCharacterSet

    public void setCharacterSet(CharacterSet value)

  Sets the value of the '`Character Set`' reference.

  Parameters:
    `value` - the new value of the 'Character Set' reference.
  See Also:
    `getCharacterSet()`

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