Oracle Data Mining Java API Reference
10g Release 1 (10.1)

B12276-01

oracle.dmt.odm.data
Class Attribute

java.lang.Object
  |
  +--oracle.dmt.odm.MiningObject
        |
        +--oracle.dmt.odm.data.Attribute
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AttributeInstance, MiningAttribute, SignatureAttribute

public class Attribute
extends MiningObject

An instance of Attribute maps to a column with a name and datatype. The attribute corresponds to a column in a database table. When assigned to a column, the column must have a compatible data type; if the data type is not compatible, a runtime exception is likely.

Class Attribute is also used as a common superclass for objects requiring a name and datatype, such as MiningAttribute.

Since:
9.0.1
See Also:
Serialized Form

Constructor Summary
Attribute(java.lang.String name, DataType type)
          Creates an attribute with specified name and data type.

 

Method Summary
 boolean equals(Attribute attribute)
          Compares two attributes.
 DataType getDataType()
          Returns the attribute data type.
 java.lang.String getName()
          Returns the attribute name.
 void setDataType(DataType type)
          Sets the attribute data type.

 

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

 

Constructor Detail

Attribute

public Attribute(java.lang.String name,
DataType type)
          throws InvalidArgumentException,
ODMException
Creates an attribute with specified name and data type.
Parameters:
name - attribute name
type - data type (int, float, char, string)
Throws:
InvalidArgumentException - is thrown
- when the name/type are NULL
- when the name > 30 bytes
InvalidArgumentException
ODMException
See Also:
DataType
Method Detail

getName

public java.lang.String getName()
Returns the attribute name.
Returns:
attribute name

getDataType

public DataType getDataType()
Returns the attribute data type.
Returns:
attribute data type

setDataType

public void setDataType(DataType type)
Sets the attribute data type.
Parameters:
type - data type (int, float, char, string)

equals

public boolean equals(Attribute attribute)
Compares two attributes.
Parameters:
attribute - attribute to be compared
Returns:
true if attributes are equal; false otherwise

Copyright © 2003 Oracle Corporation. All Rights Reserved.