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

All Superinterfaces:
  DataType, DistinctUserDefinedType, SQLObject, UserDefinedType

All Known Implementing Classes:
  DomainImpl

public interface Domain
extends DistinctUserDefinedType

A representation of the model object 'Domain'. 4.12 Domains A domain is a set of permissible values. A domain is defined in a schema and is identified by a <domain name> . The purpose of a domain is to constrain the set of valid values that can be stored in a column of a base table by various operations. A domain definition specifies a data type. It may also specify a <domain constraint> that further restricts the valid values of the domain and a <default clause> that specifies the value to be used in the absence of an explicitly specified value or column default. A domain is described by a domain descriptor. A domain descriptor includes: - The name of the domain. - The data type descriptor of the data type of the domain. - The value of <default option> , if any, of the domain. - The domain constraint descriptors of the domain constraints, if any, of the domain. 4.17.3 Domain constraints A domain constraint is a constraint that is specified for a domain. It is applied to all columns that are based on that domain, and to all values cast to that domain. A domain constraint is described by a domain constraint descriptor. In addition to the components of every constraint descriptor a domain constraint descriptor includes: - The . A domain constraint is satisfied by SQL-data if and only if, for any table T that has a column named C based on that domain, the specified , with each occurrence of VALUE replaced by C, is not False for any row of T. A domain constraint is satisfied by the result of a <cast specification> if and only if the specified , with each occurrence of VALUE replaced by that result, is not False.

The following features are supported:

- `Constraint`
- `Default Value`

See Also:
  `SQLDataTypesPackage.getDomain()`

Method Summary
`EList` `getConstraint()` Returns the value of the 'Constraint' containment reference list.
`java.lang.String` `getDefaultValue()` Returns the value of the 'Default Value' attribute.
`void` `setDefaultValue(java.lang.String value)` Sets the value of the '`Default Value`' attribute.

Methods inherited from interface org.eclipse.datatools.modelbase.sql.datatypes.DistinctUserDefinedType
`getPredefinedRepresentation, setPredefinedRepresentation`

Methods inherited from interface org.eclipse.datatools.modelbase.sql.datatypes.UserDefinedType
`getOrdering, getSchema, setOrdering, setSchema`

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

### getConstraint

    public EList getConstraint()

  Returns the value of the 'Constraint' containment reference list. The list contents are of type `CheckConstraint`.

  If the meaning of the 'Constraint' containment reference list isn't clear, there really should be more of a description here...

  Returns:
    the value of the 'Constraint' containment reference list.
  See Also:
    `SQLDataTypesPackage.getDomain_Constraint()`

### getDefaultValue

    public java.lang.String getDefaultValue()

  Returns the value of the 'Default Value' attribute.

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

  Returns:
    the value of the 'Default Value' attribute.
  See Also:
    `setDefaultValue(String)`, `SQLDataTypesPackage.getDomain_DefaultValue()`

### setDefaultValue

    public void setDefaultValue(java.lang.String value)

  Sets the value of the '`Default Value`' attribute.

  Parameters:
    `value` - the new value of the 'Default Value' attribute.
  See Also:
    `getDefaultValue()`

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