code: private TableIndex getOrCreateTableIndex() {
  		TableIndex tableIndex = getTableIndex();
  
  		if (tableIndex == null) {
  			try {
  				if (!tableIndexDao.isTableExists()) {
  					geoPackage.createTableIndexTable();
  				}
  
  				tableIndex = new TableIndex();
  				tableIndex.setTableName(tableName);
  				tableIndex.setLastIndexed(null);
  
  				tableIndexDao.create(tableIndex);
  			} catch (SQLException e) {
  				throw new GeoPackageException(
  						"Failed to create Table Index for GeoPackage: "
  								+ geoPackage.getName() + ", Table Name: "
  								+ tableName + ", Column Name: " + columnName, e);
  			}
  		}
  
  		return tableIndex;
  	}
docs: Get or create if needed the table index
  
  @return table index