org.jboss.dna.common.jdbc.model.spi
Class UserDefinedTypeBean

java.lang.Object
  extended by org.jboss.dna.common.jdbc.model.spi.CoreMetaDataBean
      extended by org.jboss.dna.common.jdbc.model.spi.DatabaseNamedObjectBean
          extended by org.jboss.dna.common.jdbc.model.spi.SchemaObjectBean
              extended by org.jboss.dna.common.jdbc.model.spi.UserDefinedTypeBean
All Implemented Interfaces:
Serializable, CoreMetaData, DatabaseNamedObject, SchemaObject, UserDefinedType

public class UserDefinedTypeBean
extends SchemaObjectBean
implements UserDefinedType

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
See Also:
Serialized Form

Constructor Summary
UserDefinedTypeBean()
          Default constructor
 
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 class org.jboss.dna.common.jdbc.model.spi.SchemaObjectBean
getCatalog, getSchema, setCatalog, setSchema
 
Methods inherited from class org.jboss.dna.common.jdbc.model.spi.DatabaseNamedObjectBean
addExtraProperty, deleteExtraProperty, getExtraProperties, getExtraProperty, getName, getRemarks, setName, setRemarks
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
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
 

Constructor Detail

UserDefinedTypeBean

public UserDefinedTypeBean()
Default constructor

Method Detail

getClassName

public String getClassName()
Returns JAVA class name for UDT

Specified by:
getClassName in interface UserDefinedType
Returns:
JAVA class name for UDT

setClassName

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

Specified by:
setClassName in interface UserDefinedType
Parameters:
className - JAVA class name for UDT

getSqlType

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

Specified by:
getSqlType in interface UserDefinedType
Returns:
SQL type from java.sql.Types. One of JAVA_OBJECT, STRUCT, or DISTINCT

setSqlType

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

Specified by:
setSqlType in interface UserDefinedType
Parameters:
sqlType - the SQL type from java.sql.Types. One of JAVA_OBJECT, STRUCT, or DISTINCT

getBaseType

public 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)

Specified by:
getBaseType in interface UserDefinedType
Returns:
SQL base type from java.sql.Types.

setBaseType

public 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)

Specified by:
setBaseType in interface UserDefinedType
Parameters:
baseType - the SQL base type from java.sql.Types.

getAttributes

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

Specified by:
getAttributes in interface UserDefinedType
Returns:
a set of UDT attributes

addAttribute

public void addAttribute(Attribute attribute)
adds Attribute

Specified by:
addAttribute in interface UserDefinedType
Parameters:
attribute - the Attribute

deleteAttribute

public void deleteAttribute(Attribute attribute)
deletes Attribute

Specified by:
deleteAttribute in interface UserDefinedType
Parameters:
attribute - the Attribute

findAttributeByName

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

Specified by:
findAttributeByName in interface UserDefinedType
Parameters:
attributeName - the name of attribute
Returns:
UDT attribute for specified attribute name or null.

getSuperType

public 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.

Specified by:
getSuperType in interface UserDefinedType
Returns:
super type for this UDT if any
Since:
1.4 (JDBC 3.0)

setSuperType

public 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.

Specified by:
setSuperType in interface UserDefinedType
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.