Class TableInfo


  • public class TableInfo
    extends java.lang.Object
    This class represents a single table in the database, including the table's name, and the tuple file that holds the table's data.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String tableName
      The name of this table.
      private TupleFile tupleFile
      The tuple file that holds the table's data.
      static java.lang.String UNNAMED_TABLE
      If a table name isn't specified, this value is used instead.
    • Constructor Summary

      Constructors 
      Constructor Description
      TableInfo​(java.lang.String tableName, TupleFile tupleFile)
      Construct a table-information object that represents the specified table name and associated tuple file.
    • Field Detail

      • UNNAMED_TABLE

        public static final java.lang.String UNNAMED_TABLE
        If a table name isn't specified, this value is used instead.
        See Also:
        Constant Field Values
      • tableName

        private java.lang.String tableName
        The name of this table.
      • tupleFile

        private TupleFile tupleFile
        The tuple file that holds the table's data.
    • Constructor Detail

      • TableInfo

        public TableInfo​(java.lang.String tableName,
                         TupleFile tupleFile)
        Construct a table-information object that represents the specified table name and associated tuple file.
        Parameters:
        tableName - the name of the table in the database
        tupleFile - the tuple file that holds the table's data
    • Method Detail

      • getTableName

        public java.lang.String getTableName()
        Returns the associated table name.
        Returns:
        the associated table name
      • getTupleFile

        public TupleFile getTupleFile()
        Returns the tuple file that holds the table's data.
        Returns:
        the tuple file that holds the table's data.
      • getDBFile

        public DBFile getDBFile()
        A helper function to simplify retrieving the table's DBFile.
      • getSchema

        public Schema getSchema()
        A helper function to simplify retrieving the table's schema.