Class CatalogRowFactory

    • Field Detail

      • indexNames

        protected java.lang.String[] indexNames
      • indexColumnPositions

        protected int[][] indexColumnPositions
      • indexUniqueness

        protected boolean[] indexUniqueness
      • tableUUID

        protected UUID tableUUID
      • heapUUID

        protected UUID heapUUID
      • indexUUID

        protected UUID[] indexUUID
      • indexCount

        private int indexCount
      • columnCount

        private int columnCount
      • catalogName

        private java.lang.String catalogName
    • Method Detail

      • getExecutionFactory

        public ExecutionFactory getExecutionFactory()
        Gets a ExecutionFactory
        Returns:
        an execution factory
      • getUUIDFactory

        public UUIDFactory getUUIDFactory()
        Get the UUID factory
        Returns:
        the UUID factory
      • getCanonicalTableUUID

        public UUID getCanonicalTableUUID()
        Get the UUID of this catalog. This is the hard-coded uuid for this catalog that is generated for releases starting with Plato (1.3). Earlier releases generated their own UUIDs for system objectss on the fly.
        Returns:
        the name of this catalog
      • getCanonicalHeapUUID

        public UUID getCanonicalHeapUUID()
        Get the UUID of the heap underlying this catalog. See getCanonicalTableUUID() for a description of canonical uuids.
        Returns:
        the uuid of the heap
      • getCanonicalIndexUUID

        public UUID getCanonicalIndexUUID​(int indexNumber)
        Get the UUID of the numbered index. See getCanonicalTableUUID() for a description of canonical uuids.
        Parameters:
        indexNumber - The (0-based) index number.
        Returns:
        the uuid of the heap
      • getIndexColumnCount

        public int getIndexColumnCount​(int indexNum)
        Get the number of columns in the index for the specified index number.
        Parameters:
        indexNum - The (0-based) index number.
        Returns:
        int The number of columns in the index for the specifed index number.
      • getCanonicalHeapName

        public java.lang.String getCanonicalHeapName()
        Get the name for the heap conglomerate underlying this catalog. See getCanonicalTableUUID() for a description of canonical uuids.
        Returns:
        String The name for the heap conglomerate.
      • getIndexName

        public java.lang.String getIndexName​(int indexNum)
        Get the name for the specified index number.
        Parameters:
        indexNum - The (0-based) index number.
        Returns:
        String The name for the specified index number.
      • isIndexUnique

        public boolean isIndexUnique​(int indexNumber)
        Return whether or not the specified index is unique.
        Parameters:
        indexNumber - The (0-based) index number.
        Returns:
        boolean Whether or not the specified index is unique.
      • getDataValueFactory

        public DataValueFactory getDataValueFactory()
        Gets the DataValueFactory for this connection.
        Returns:
        the data value factory for this connection
      • generateIndexName

        public java.lang.String generateIndexName​(int indexNumber)
        Generate an index name based on the index number.
        Parameters:
        indexNumber - Number of index
        Returns:
        the following index name: CatalogName + "_INDEX" + (indexNumber+1)
      • getNumIndexes

        public int getNumIndexes()
        get the number of indexes on this catalog
      • getCatalogName

        public java.lang.String getCatalogName()
        get the name of the catalog
      • initInfo

        public void initInfo​(int columnCount,
                             java.lang.String catalogName,
                             int[][] indexColumnPositions,
                             boolean[] indexUniqueness,
                             java.lang.String[] uuidStrings)
        Initialize info, including array of index names and array of index column counts. Called at constructor time.
        Parameters:
        columnCount - number of columns in the base table.
        catalogName - name of the catalog (the case might have to be converted).
        indexColumnPositions - 2 dim array of ints specifying the base column positions for each index.
        indexUniqueness - Uniqueness of the indices
        uuidStrings - Array of stringified UUIDs for table and its conglomerates
      • getCreateHeapProperties

        public java.util.Properties getCreateHeapProperties()
        Get the Properties associated with creating the heap.
        Returns:
        The Properties associated with creating the heap.
      • getCreateIndexProperties

        public java.util.Properties getCreateIndexProperties​(int indexNumber)
        Get the Properties associated with creating the specified index.
        Parameters:
        indexNumber - The specified index number.
        Returns:
        The Properties associated with creating the specified index.
      • getPrimaryKeyIndexNumber

        public int getPrimaryKeyIndexNumber()
        Get the index number for the primary key index on this catalog.
        Returns:
        a 0-based number
      • getHeapColumnCount

        public int getHeapColumnCount()
                               throws StandardException
        Get the number of columns in the heap.
        Returns:
        The number of columns in the heap.
        Throws:
        StandardException
      • makeEmptyRowForCurrentVersion

        public ExecRow makeEmptyRowForCurrentVersion()
                                              throws StandardException

        Create an empty row for this conglomerate, in the format that would be used in a database that was created with, or hard upgraded to, the currently running version. That is, even if the database is only soft-upgraded, this method should return a row in the new format.

        This method is for use in code that creates the catalogs, or that upgrades the format of the catalogs to the newest version. Other code should call makeEmptyRow(), which returns a row in the format used in the old database version if the database is soft-upgraded.

        Returns:
        an empty row
        Throws:
        StandardException - if an error happens when creating the row
      • getIndexColumnPositions

        public int[] getIndexColumnPositions​(int indexNumber)
        Return the column positions for a given index number