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
- 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
Attribute(java.lang.String name,
DataType type)
Creates an attribute with specified name and data type. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Attribute
public Attribute(java.lang.String name,
DataType type)
throws InvalidArgumentException,
ODMException
- Creates an attribute with specified name and data type.
- Parameters:
name
- attribute nametype
- data type (int, float, char, string)- Throws:
InvalidArgumentException
- is thrown
- when the name/type are NULL
- when the name > 30 bytes- See Also:
DataType
getName
public java.lang.String getName()
- Returns the attribute name.
- Returns:
- String attribute name
getDataType
public DataType getDataType()
- Returns the attribute data type.
- Returns:
DataType
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:
- boolean true if attributes are equal; false otherwise