Package com.mckoi.database
Class TableDescriptions
java.lang.Object
com.mckoi.database.TableDescriptions
An object that is a key part of Database. This object maintains a list
of descriptions of all tables in the database. The list contains
information about the columns in the table and any other misc table options.
- Author:
- Tobias Downer
-
Constructor Summary
ConstructorsConstructorDescriptionTableDescriptions
(File database_path) Constructs this object with the database in the given directory. -
Method Summary
Modifier and TypeMethodDescriptionboolean
exists()
Returns true if the table descriptions file exists.Returns the DataTableDef object for the table with the given name.String[]
Returns a list of table name's sorted in alphebetical order.void
load()
Load the entire list of table descriptions for this database.void
save()
Updates the table description file in the database.
-
Constructor Details
-
TableDescriptions
Constructs this object with the database in the given directory.
-
-
Method Details
-
exists
public boolean exists()Returns true if the table descriptions file exists. -
load
Load the entire list of table descriptions for this database.- Throws:
IOException
-
save
Updates the table description file in the database. The table description file describes every table in the database. It is loaded when the database is initialized and refreshed whenever a table alteration occurs or the database is shut down.- Throws:
IOException
-
getTableList
Returns a list of table name's sorted in alphebetical order. -
getDef
Returns the DataTableDef object for the table with the given name. The description must have been loaded before this method is called. Returns null if the table was not found.
-