Package com.mckoi.database
Class TableDescriptions
- java.lang.Object
-
- com.mckoi.database.TableDescriptions
-
public final class TableDescriptions extends java.lang.ObjectAn 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
Constructors Constructor Description TableDescriptions(java.io.File database_path)Constructs this object with the database in the given directory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanexists()Returns true if the table descriptions file exists.DataTableDefgetDef(java.lang.String table_name)Returns the DataTableDef object for the table with the given name.java.lang.String[]getTableList()Returns a list of table name's sorted in alphebetical order.voidload()Load the entire list of table descriptions for this database.voidsave()Updates the table description file in the database.
-
-
-
Method Detail
-
exists
public boolean exists()
Returns true if the table descriptions file exists.
-
load
public void load() throws java.io.IOExceptionLoad the entire list of table descriptions for this database.- Throws:
java.io.IOException
-
save
public void save() throws java.io.IOExceptionUpdates 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:
java.io.IOException
-
getTableList
public java.lang.String[] getTableList()
Returns a list of table name's sorted in alphebetical order.
-
getDef
public DataTableDef getDef(java.lang.String table_name)
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.
-
-