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 TypeMethodDescriptionintCompares two TableInfo objects by comparing the table names.booleanintReturns the average row size.longReturns the size of the table's indices.getName()Returns the table name.longgetRows()Returns the number of rows in the table.longgetSize()Returns the size of the table.inthashCode()Returns the table name's hash code.voidsetIndexSize(long idxSize) Updates the size of the table's indices.voidsetRows(long rows) Updates the number of rows in the table.voidsetSize(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:
compareToin interfaceComparable<TableInfo>
-
equals
-