Class TableInfo
java.lang.Object
org.deltava.beans.stats.TableInfo
- All Implemented Interfaces:
Serializable
,Comparable<TableInfo>
A system bean to store JDBC table data.
- Since:
- 1.0
- Version:
- 11.0
- Author:
- Luke
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Compares two TableInfo objects by comparing the table names.boolean
int
Returns the average row size.long
Returns the size of the table's indices.getName()
Returns the table name.long
getRows()
Returns the number of rows in the table.long
getSize()
Returns the size of the table.int
hashCode()
Returns the table name's hash code.void
setIndexSize
(long idxSize) Updates the size of the table's indices.void
setRows
(long rows) Updates the number of rows in the table.void
setSize
(long tableSize) Updates the size of the table.
-
Constructor Details
-
TableInfo
Creates a new TableInfo bean for the specified database table.- Parameters:
tableName
- the name of the table- Throws:
NullPointerException
- if tableName is null- See Also:
-
-
Method Details
-
getName
-
getRows
public long getRows()Returns the number of rows in the table.- Returns:
- the number of rows
- See Also:
-
getAverageRowLength
public int getAverageRowLength()Returns the average row size.- Returns:
- the average bytes per row
-
getSize
public long getSize()Returns the size of the table.- Returns:
- the size of the table in bytes
- See Also:
-
getIndexSize
public long getIndexSize()Returns the size of the table's indices.- Returns:
- the size of the indices in bytes
- See Also:
-
setRows
public void setRows(long rows) Updates the number of rows in the table.- Parameters:
rows
- the number of rows- See Also:
-
setSize
public void setSize(long tableSize) Updates the size of the table.- Parameters:
tableSize
- the size of the table in bytes- See Also:
-
setIndexSize
public void setIndexSize(long idxSize) Updates the size of the table's indices.- Parameters:
idxSize
- the size of the indices in bytes- See Also:
-
hashCode
-
compareTo
Compares two TableInfo objects by comparing the table names.- Specified by:
compareTo
in interfaceComparable<TableInfo>
-
equals
-