org.jboss.dna.common.jdbc.model.api
Interface UserDefinedType

All Superinterfaces:
CoreMetaData, DatabaseNamedObject, SchemaObject, Serializable
All Known Implementing Classes:
UserDefinedTypeBean

public interface UserDefinedType
extends SchemaObject

Provides User Defined Type (UDT) specific metadata. Retrieves a description of the user-defined types (UDTs) defined in a particular schema. Schema-specific UDTs may have type JAVA_OBJECT, STRUCT, or DISTINCT.

Since:
1.2 (JDBC 2.0)
Author:
Sergiy Litsenko

Method Summary
 void addAttribute(Attribute attribute)
          adds Attribute
 void deleteAttribute(Attribute attribute)
          deletes Attribute
 Attribute findAttributeByName(String attributeName)
          Returns UDT attribute for specified attribute name or null
 Set<Attribute> getAttributes()
          Gets a set of UDT attributes
 SqlType getBaseType()
          Gets SQL base type from java.sql.Types.
 String getClassName()
          Returns JAVA class name for UDT
 SqlType getSqlType()
          Gets SQL type from java.sql.Types.
 UserDefinedType getSuperType()
          Retrieves a description of the user-defined type (UDT) hierarchies defined in a particular schema in this database.
 void setBaseType(SqlType baseType)
          Sets SQL base type from java.sql.Types.
 void setClassName(String className)
          Sets JAVA class name for UDT
 void setSqlType(SqlType sqlType)
          Sets SQL type from java.sql.Types.
 void setSuperType(UserDefinedType superType)
          Sets a description of the user-defined type (UDT) hierarchies defined in a particular schema in this database.
 
Methods inherited from interface org.jboss.dna.common.jdbc.model.api.SchemaObject
getCatalog, getSchema, setCatalog, setSchema
 
Methods inherited from interface org.jboss.dna.common.jdbc.model.api.DatabaseNamedObject
addExtraProperty, deleteExtraProperty, getExtraProperties, getExtraProperty, getName, getRemarks, setName, setRemarks
 

Method Detail

getClassName

String getClassName()
Returns JAVA class name for UDT

Returns:
JAVA class name for UDT

setClassName

void setClassName(String className)
Sets JAVA class name for UDT

Parameters:
className - JAVA class name for UDT

getSqlType

SqlType getSqlType()
Gets SQL type from java.sql.Types. One of JAVA_OBJECT, STRUCT, or DISTINCT

Returns:
SQL type from java.sql.Types. One of JAVA_OBJECT, STRUCT, or DISTINCT

setSqlType

void setSqlType(SqlType sqlType)
Sets SQL type from java.sql.Types. One of JAVA_OBJECT, STRUCT, or DISTINCT

Parameters:
sqlType - the SQL type from java.sql.Types. One of JAVA_OBJECT, STRUCT, or DISTINCT

getBaseType

SqlType getBaseType()
Gets SQL base type from java.sql.Types. Type code of the source type of a DISTINCT type or the type that implements the user-generated reference type of the SELF_REFERENCING_COLUMN of a structured type as defined in java.sql.Types (null if DATA_TYPE is not DISTINCT or not STRUCT with REFERENCE_GENERATION = USER_DEFINED)

Returns:
SQL base type from java.sql.Types.

setBaseType

void setBaseType(SqlType baseType)
Sets SQL base type from java.sql.Types. Type code of the source type of a DISTINCT type or the type that implements the user-generated reference type of the SELF_REFERENCING_COLUMN of a structured type as defined in java.sql.Types (null if DATA_TYPE is not DISTINCT or not STRUCT with REFERENCE_GENERATION = USER_DEFINED)

Parameters:
baseType - the SQL base type from java.sql.Types.

getAttributes

Set<Attribute> getAttributes()
Gets a set of UDT attributes

Returns:
a set of UDT attributes

addAttribute

void addAttribute(Attribute attribute)
adds Attribute

Parameters:
attribute - the Attribute

deleteAttribute

void deleteAttribute(Attribute attribute)
deletes Attribute

Parameters:
attribute - the Attribute

findAttributeByName

Attribute findAttributeByName(String attributeName)
Returns UDT attribute for specified attribute name or null

Parameters:
attributeName - the name of attribute
Returns:
UDT attribute for specified attribute name or null.

getSuperType

UserDefinedType getSuperType()
Retrieves a description of the user-defined type (UDT) hierarchies defined in a particular schema in this database. Only the immediate super type/ sub type relationship is modeled.

Returns:
super type for this UDT if any
Since:
1.4 (JDBC 3.0)

setSuperType

void setSuperType(UserDefinedType superType)
Sets a description of the user-defined type (UDT) hierarchies defined in a particular schema in this database. Only the immediate super type/ sub type relationship is modeled.

Parameters:
superType - the super type for this UDT if any
Since:
1.4 (JDBC 3.0)


Copyright © 2008-Present JBoss a division of Red Hat. All Rights Reserved.