public class MySQLOutput extends SerialOutput
Constructor | Description |
---|---|
MySQLOutput(MySQLSession session,
java.lang.String isfName) |
Sets a read-write connection to the database and creates the tables needed to store the
decision problem.
|
Modifier and Type | Method | Description |
---|---|---|
void |
done() |
Ends database transaction, commits all changes and closes the
database connection.
|
int |
getAttributeCount() |
|
java.lang.String |
getAttrName(int i) |
Returns a string containing the name of the attribute.
|
java.lang.String |
getSubtype(int i) |
Returns a string containing the attribute subtype.
|
java.lang.String |
getType(int i) |
Returns a string containing the attribute type.
|
void |
outputExample(Example example) |
Outputs example
|
void |
outputMetadata(Metadata metadata) |
Outputs metadata
|
void |
setAttributes(Attribute[] attributes) |
Sets attributes
|
public MySQLOutput(MySQLSession session, java.lang.String isfName) throws SerialIOException
session
- contains session parameters.isfName
- the name of the decision problem.SerialIOException
- when something goes wrong.public void outputMetadata(Metadata metadata) throws SerialIOException
outputMetadata
in class SerialOutput
metadata
- metadata to outputSerialIOException
public void done() throws SerialIOException
done
in class SerialOutput
SerialIOException
- when something goes wrong with the databasepublic java.lang.String getSubtype(int i) throws java.sql.SQLException
i
- the attribute indexjava.sql.SQLException
- when the database operation failespublic java.lang.String getType(int i) throws java.sql.SQLException
i
- the attribute indexjava.sql.SQLException
- when the database operation failespublic java.lang.String getAttrName(int i) throws java.sql.SQLException
i
- the attribute indexjava.sql.SQLException
- when the database operation failespublic int getAttributeCount() throws java.sql.SQLException
java.sql.SQLException
- when the database operation failespublic void setAttributes(Attribute[] attributes) throws SerialIOException
attributes
- attributes to setSerialIOException
public void outputExample(Example example) throws SerialIOException
outputExample
in class SerialOutput
example
- example to outputSerialIOException