|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.martealert.martealertTable
Object made with a vector of vector to store result of a sql query, and another vector to store column names.
Field Summary | |
protected static java.lang.String |
_
|
static martealertHashtable |
ALIASVAR
|
protected java.util.Vector |
columnNames
|
protected java.util.Vector |
data
|
static martealertHashtable |
DEFAULT
|
static martealertHashtable |
GROUPBY
|
static martealertHashtable |
IDENT
|
static martealertHashtable |
INDEX
|
static martealertHashtable |
INDEXSEARCH
|
static martealertHashtable |
NAMEDVAR
|
static martealertHashtable |
RELATION
|
static martealertHashtable |
SELECT
|
static martealertHashtable |
TX
|
static martealertHashtable |
UNNAMEDVAR
|
static martealertHashtable |
VAR
|
Fields inherited from interface com.martealert.martealertConstants |
AMBIGUOUS_FIELDS, ANALYZER, CLASSIFICATION, COMPLETION, FTS, FTSTZ, HOUR_IN_MILLIS, INTERVAL, IPADDRS, LASTJOIN, LTS, LTSTZ, MAXMSGID, MAXSEVERITY, MFTS, MLTS, MSGID, MSOURCEPORT, NALERTS, NOTNULL_FIELDS, NULL_FIELDS, NXCLASSIFICATION, ORDER_BY_ALERTS, ORDER_BY_MAXTIME, ORDER_BY_TIME, PRELUDE_TABLES, PROTOCOL, SENSOR, SEVERITY, SEVERITY_COMPLETION, SOURCE, SOURCEIP, SOURCEPORT, SOURCEUID, TARGET, TARGETIP, TARGETPORT, TARGETPORT_PROTOCOL, TARGETUID, TERMINAL, TIME, TIMETZ, TLAST, TOP, TOTALTIME |
Fields inherited from interface com.martealert.martealertRealTimeInterface |
REAL_TIME_CLASSIFICATION, REAL_TIME_COMPLETION, REAL_TIME_MSGID, REAL_TIME_SEVERITY, REAL_TIME_SOURCEIP, REAL_TIME_TARGETIP, REAL_TIME_TIME |
Constructor Summary | |
martealertTable()
Creates a new empty instance of preludeTable |
|
martealertTable(java.sql.Connection con,
java.lang.String sql)
Creates an instance with table obtained from SQL query and connection specified in params. |
|
martealertTable(java.util.Vector data,
java.util.Vector columnNames)
Creates an initialized instance of preludeTable |
Method Summary | |
void |
clear()
|
java.util.Vector |
getColumn(int column)
Get a column from this martealertTable |
java.util.Vector |
getColumnNames()
Get this.columnNames Vector. |
int |
getColumnSize()
Get N dimension of MxN this.data Vector of Vectors |
java.util.Vector |
getData()
Get this.data Vector of Vectors. |
protected int |
getFTSColumn()
Get number of FTS column. |
int[] |
getIgnoredColumnsPdf()
Get column numbers of a martealertTable to be ignored for generating pdf report. |
int[] |
getIpColumns()
Get IP-columns numbers in an array of int. |
protected int |
getLTSColumn()
Get number of LTS column. |
int[] |
getMultilineColumns()
Get array with number of columns which rows can store multiline values (sub-rows). |
int[] |
getPercentColumns()
|
int[] |
getPortColumns()
Get port columns numbers in an array of int. |
int[] |
getProtocolColumns()
Get array with number of protocol columns, to be solved from protocol table in database. |
java.util.Vector |
getRow(int row)
Get a row from this martealertTable. |
int |
getRowSize()
Get M dimension of MxN this.data Vector of Vectors |
int |
getSeverityColumn()
|
static java.lang.String |
getSqlRelation(java.lang.String sqltable,
martealertHashFilter filter)
|
static martealertTable |
getTableVector(java.sql.Connection con,
java.lang.String sql)
Method to get tuples and columns according to sql query. |
java.lang.Object |
getValue(int row,
int column)
Get value from data Vector of Vectors in Object generic format. |
java.lang.Object |
getValue(int row,
int column,
java.lang.Object defaultIfNull)
Get value from this data Vector of Vectors in Object generic format if value is not null. |
java.lang.Object |
getValue(int row,
int column,
java.lang.Object ob,
java.lang.Object defaultIfobFound)
Get value in position (row,column) of a table. |
void |
printTable()
Print a Prelude generic table Vector in standard output |
void |
reload(java.sql.Connection con,
martealertHashFilter filter)
reload a martealertTable object in time interval [FTS, LTS] |
void |
setColumnNames(java.util.Vector columnNames)
Set initial values to columnNames vector. |
void |
setDataVector(java.util.Vector data)
Sets initial values to vectors. |
void |
setDataVector(java.util.Vector data,
java.util.Vector columnNames)
Sets initial values to data and columnNames vectors. |
void |
setValue(int row,
int column,
java.lang.Object ob)
Set ob Object into this.data Vector of Vectors at (row, column) position |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.Vector data
protected java.util.Vector columnNames
protected static final java.lang.String _
public static martealertHashtable GROUPBY
public static martealertHashtable DEFAULT
public static martealertHashtable IDENT
public static martealertHashtable VAR
public static martealertHashtable NAMEDVAR
public static martealertHashtable UNNAMEDVAR
public static martealertHashtable ALIASVAR
public static martealertHashtable TX
public static martealertHashtable RELATION
public static martealertHashtable SELECT
public static martealertHashtable INDEXSEARCH
public static martealertHashtable INDEX
Constructor Detail |
public martealertTable()
public martealertTable(java.sql.Connection con, java.lang.String sql) throws java.sql.SQLException
con
- Connection variable to access PostgreSQL database.sql
- String with SQL query to fill martealertTable object.
java.sql.SQLException
- SQL syntax error executing query to define an object.public martealertTable(java.util.Vector data, java.util.Vector columnNames)
data
- Vector of Vectors to store data.columnNames
- Vector with column names.Method Detail |
public void reload(java.sql.Connection con, martealertHashFilter filter) throws java.sql.SQLException
con
- Connection variable to access PostgreSQL databasefilter
- String to be added at the end of SQL query.
java.sql.SQLException
- SQL syntax error executing query.public void clear()
public void setDataVector(java.util.Vector data, java.util.Vector columnNames)
data
- Vector of vector to store database table query.columnNames
- Vector with column namespublic void setColumnNames(java.util.Vector columnNames)
columnNames
- Vector with column names.public java.lang.Object getValue(int row, int column) throws java.lang.ArrayIndexOutOfBoundsException
row
- integer with row index of data vector.column
- integer with column indes of data vector.
java.lang.ArrayIndexOutOfBoundsException
- index exceeded of this martealertTablepublic java.lang.Object getValue(int row, int column, java.lang.Object defaultIfNull)
row
- row index.column
- column index.defaultIfNull
- Object returned if value in (row, column) position is null.
java.lang.ArrayIndexOutOfBoundsException
- index exceeded of this martealertTablepublic java.lang.Object getValue(int row, int column, java.lang.Object ob, java.lang.Object defaultIfobFound)
row
- int row index.column
- int column index.ob
- Object specified to return defaultIfobFound
in case ob is found.defaultIfobFound
- Object returned if ob
is found.
this
.public java.util.Vector getRow(int row) throws java.lang.ArrayIndexOutOfBoundsException
row
- row index wanted.
java.lang.ArrayIndexOutOfBoundsException
- index exceeded of this martealertTablepublic java.util.Vector getColumn(int column) throws java.lang.ArrayIndexOutOfBoundsException
column
- column index wanted.
java.lang.ArrayIndexOutOfBoundsException
- index exceeded of this martealertTablepublic int getRowSize()
public int getColumnSize()
public void setValue(int row, int column, java.lang.Object ob)
row
- row index.column
- column index.ob
- Object to be set.public void setDataVector(java.util.Vector data)
data
- Vector of vector to store database table query.public java.util.Vector getData()
public java.util.Vector getColumnNames()
public int[] getIgnoredColumnsPdf()
public void printTable()
public static martealertTable getTableVector(java.sql.Connection con, java.lang.String sql) throws java.sql.SQLException
con
- Connection ip_address:port to connect to database.sql
- SQL command to execute over connection con.
java.sql.SQLException
- SQL syntax error in statement.executeQuery(String sql);public int[] getIpColumns()
public int[] getMultilineColumns()
martealertFirstLevel
.
protected int getFTSColumn()
protected int getLTSColumn()
public int[] getProtocolColumns()
public int[] getPortColumns()
public int[] getPercentColumns()
public int getSeverityColumn()
public static java.lang.String getSqlRelation(java.lang.String sqltable, martealertHashFilter filter)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |