Package com.jsql.model.bean.database
Class Table
java.lang.Object
com.jsql.model.bean.database.AbstractElementDatabase
com.jsql.model.bean.database.Table
Define a Table, e.g. is sent to the view by the model after injection.
Allow to traverse upward to its corresponding database.
-
Field Summary
Fields inherited from class com.jsql.model.bean.database.AbstractElementDatabase
elementValue, MOCK
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Return the number of elements contained by current element :
- for database: number of tables,
- for table: number of rows.A readable label for the table, with number of rows, displayed by the view.Traverse upward, and return the parent.Methods inherited from class com.jsql.model.bean.database.AbstractElementDatabase
setElementValue, toString
-
Constructor Details
-
Table
Define the table label, number of rows and parent database.- Parameters:
tableName
-rowCount
-parentDatabase
-
-
-
Method Details
-
getParent
Description copied from class:AbstractElementDatabase
Traverse upward, and return the parent.- Specified by:
getParent
in classAbstractElementDatabase
- Returns:
-
getChildCount
public int getChildCount()Description copied from class:AbstractElementDatabase
Return the number of elements contained by current element :
- for database: number of tables,
- for table: number of rows.- Specified by:
getChildCount
in classAbstractElementDatabase
-
getLabelCount
A readable label for the table, with number of rows, displayed by the view. If parent database is the system information_schema, number of rows is unknown, e.g. my_table (7 rows).- Specified by:
getLabelCount
in classAbstractElementDatabase
- Returns:
-