|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object system.Bol
public class Bol
This class is the data storage and processing power of the entire API.
Nested Class Summary | |
---|---|
static class |
Bol.IOType
The Input/Output types for text file loading/saving |
Field Summary | |
---|---|
private java.util.ArrayList<java.lang.String> |
catalogs
|
private java.util.ArrayList<java.lang.Object> |
columnClassTypes
|
private java.util.ArrayList<java.lang.Object> |
columnNames
|
private static char |
COMMA
|
private java.util.List<java.util.List<java.lang.Object>> |
data
|
private static java.lang.String[] |
dataTypes
|
private static java.lang.String |
DEFAULT_COLUMN_NAME
|
private static java.util.ArrayList<java.lang.Exception> |
errors
|
private static java.lang.String |
NEW_LINE
|
(package private) static java.lang.String |
SPACE
|
private java.util.ArrayList<java.lang.String> |
tables
|
Constructor Summary | |
---|---|
Bol()
|
Method Summary | |
---|---|
(package private) void |
changeDataType(java.lang.Object newDataType,
int position)
Changes the classes based on the users choice of dataType. |
(package private) void |
clearData()
Removes the data and columnNames from the current BOL Object. |
(package private) void |
deleteColumn(int col)
Deletes a column at the position selected. |
(package private) void |
deleteRow(int row)
Deletes a record at the position selected. |
(package private) java.util.ArrayList<java.lang.String> |
getCatalogs()
Gets the catalogs. |
(package private) java.util.ArrayList<java.lang.Object> |
getClasses()
Gets the data classes of the Bol2. |
java.util.ArrayList<java.lang.Object> |
getColumnNames()
Returns the current BOL's columnNames arraylist. |
(package private) boolean |
getConnection(java.lang.String url,
int vendor,
java.lang.String user,
java.lang.String password)
Sends through the various parameters needed for the connection. |
(package private) java.util.List<java.util.List<java.lang.Object>> |
getData()
Returns the current BOL's data arraylist. |
java.util.ArrayList<java.lang.Object> |
getDataType()
Checks the data type of the data and returns it. |
(package private) boolean |
getDataTypeSingle(java.lang.Object value,
int position)
Get the data type of the string and checks whether it matches the previously set data type. |
(package private) static java.lang.String |
getErrors()
Gets the errors from the error list. |
(package private) java.util.ArrayList<java.lang.String> |
getTables(java.lang.String catalog)
Gets the databases tables. |
(package private) java.lang.String[] |
getVendors()
Gets the vendors of supplying DBMS. |
(package private) void |
insertColumn(int pos)
Inserts a new column at the position selected. |
(package private) void |
insertRow(int pos)
Inserts a new record at the position selected. |
(package private) void |
modifyCell(int row,
int column,
java.lang.Object newContent)
Sets the data in an individual record and field. |
(package private) void |
modifyColumnName(int column,
java.lang.Object newText)
Changes the column name. |
(package private) boolean |
populate(java.lang.String fileName,
Bol.IOType type)
Populates the data arraylist. |
(package private) boolean |
saveData(Bol.IOType type,
java.lang.String fileName)
Saves the data as a text document. |
(package private) boolean |
sendDataToDBMS(java.lang.String database,
java.lang.String tableName)
Gets the database name and table name. |
void |
setData(java.util.List<java.util.List<java.lang.Object>> data)
Sets the current BOL's data arraylist. |
void |
setDefaultColumnNames()
Sets the default column names if the column names are blank. |
(package private) java.util.ArrayList<java.lang.String> |
writeDataTypes(int colNumber)
Gets the list of available data types for a column. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final java.lang.String SPACE
private static final java.lang.String NEW_LINE
private static final java.lang.String DEFAULT_COLUMN_NAME
private static final java.lang.String[] dataTypes
private static java.util.ArrayList<java.lang.Exception> errors
private static final char COMMA
private java.util.ArrayList<java.lang.Object> columnNames
private java.util.List<java.util.List<java.lang.Object>> data
private java.util.ArrayList<java.lang.Object> columnClassTypes
private java.util.ArrayList<java.lang.String> tables
private java.util.ArrayList<java.lang.String> catalogs
Constructor Detail |
---|
public Bol()
Method Detail |
---|
void clearData()
java.util.List<java.util.List<java.lang.Object>> getData()
public void setData(java.util.List<java.util.List<java.lang.Object>> data)
data
- - the data to be added to this BOL's data arraylist.public java.util.ArrayList<java.lang.Object> getColumnNames()
boolean populate(java.lang.String fileName, Bol.IOType type)
fileName
- - the name of the file to be opened and the data copied into the API.type
- - the users selected file type enum.
boolean saveData(Bol.IOType type, java.lang.String fileName)
type
- the users selected file type enum to save as.fileName
- the name of the file to be saved.
public void setDefaultColumnNames()
public java.util.ArrayList<java.lang.Object> getDataType()
boolean getDataTypeSingle(java.lang.Object value, int position)
value
- - string sent from user to change for validation check.position
- - position of the data in the arraylist
java.lang.String[] getVendors()
boolean getConnection(java.lang.String url, int vendor, java.lang.String user, java.lang.String password)
url
- the url of the connection stream.vendor
- the vendor of the conection stream.user
- the username of the conection stream.password
- the password of the conection stream.
java.util.ArrayList<java.lang.String> getTables(java.lang.String catalog)
catalog
- the catalogs to get the tables.
java.util.ArrayList<java.lang.String> getCatalogs()
boolean sendDataToDBMS(java.lang.String database, java.lang.String tableName)
database
- the database name.tableName
- the database table.
java.util.ArrayList<java.lang.Object> getClasses()
void modifyColumnName(int column, java.lang.Object newText)
column
- the column to have the new name changed.newText
- the new name of the column.void deleteRow(int row)
row
- the position of the new record.void insertRow(int pos)
pos
- the position of the new record.void deleteColumn(int col)
col
- the position of the new column.void insertColumn(int pos)
pos
- the position of the new column.void modifyCell(int row, int column, java.lang.Object newContent)
row
- - the record to be modified.column
- - the field to be modified.newContent
- - the new data to be modified.java.util.ArrayList<java.lang.String> writeDataTypes(int colNumber)
colNumber
- position the column's position in the list.
void changeDataType(java.lang.Object newDataType, int position)
newDataType
- - the new data type of the field.position
- - the position of the data type in the data type array.static java.lang.String getErrors()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |