@Test public void testGetFullTableReferenceStringLegacy() { MatcherAssert.assertThat( Schemas.getTableReferenceString(TABLE_NAME, Namespace.create("met")), Matchers.equalTo("TableReference.createWithEmptyNamespace(\"" + TABLE_NAME + "\")") ); }
public static String getTableReferenceString(String tableName, Namespace namespace) { Preconditions.checkArgument(isTableNameValid(tableName), "%s is not a valid table name", tableName); String namespaceName = namespace.getName(); if (namespace.isEmptyNamespace() || namespaceName.equals("met")) { return "TableReference.createWithEmptyNamespace(\"" + tableName + "\")"; } else { return "TableReference.createFromFullyQualifiedName(\"" + namespace.getName() + "." + tableName + "\")"; } }
Schemas { public static String getTableReferenceString(String tableName, Namespace namespace) { Preconditions.checkArgument(isTableNameValid(tableName), "%s is not a valid table name", tableName); String namespaceName = namespace.getName(); if (namespace.isEmptyNamespace() || namespaceName.equals("met")) { return "TableReference.createWithEmptyNamespace(\"" + tableName + "\")"; } else { return "TableReference.createFromFullyQualifiedName(\"" + namespace.getName() + "." + tableName + "\")"; } } }
Schemas { public static String getTableReferenceString(String tableName, Namespace namespace) { Preconditions.checkArgument(isTableNameValid(tableName), "%s is not a valid table name", tableName); String namespaceName = namespace.getName(); if (namespace.isEmptyNamespace() || namespaceName.equals("met")) { return "TableReference.createWithEmptyNamespace(\"" + tableName + "\")"; } else { return "TableReference.createFromFullyQualifiedName(\"" + namespace.getName() + "." + tableName + "\")"; } } private  Schemas(); }
Schemas { public static String getTableReferenceString(String tableName, Namespace namespace) { Preconditions.checkArgument(isTableNameValid(tableName), "%s is not a valid table name", tableName); String namespaceName = namespace.getName(); if (namespace.isEmptyNamespace() || namespaceName.equals("met")) { return "TableReference.createWithEmptyNamespace(\"" + tableName + "\")"; } else { return "TableReference.createFromFullyQualifiedName(\"" + namespace.getName() + "." + tableName + "\")"; } } private  Schemas(); static TableReference appendIndexSuffix(String indexName, IndexDefinition definition); static void createIndices(KeyValueService kvs,
            Map<TableReference, IndexDefinition> fullIndexNameToDefinition); static void createTable(KeyValueService kvs, TableReference tableRef, TableDefinition definition); static void createTable(Schema schema, KeyValueService kvs, TableReference tableRef); static void createTables(KeyValueService kvs, Map<TableReference, TableDefinition>  tableRefToDefinition); static String getTableReferenceString(String tableName, Namespace namespace); static boolean isTableNameValid(String tableName); static void createTablesAndIndexes(Schema schema, KeyValueService kvs); static void deleteTablesAndIndexes(Schema schema, KeyValueService kvs); static void truncateTablesAndIndexes(Schema schema, KeyValueService kvs); }
Schemas { public static String getTableReferenceString(String tableName, Namespace namespace) { Preconditions.checkArgument(isTableNameValid(tableName), "%s is not a valid table name", tableName); String namespaceName = namespace.getName(); if (namespace.isEmptyNamespace() || namespaceName.equals("met")) { return "TableReference.createWithEmptyNamespace(\"" + tableName + "\")"; } else { return "TableReference.createFromFullyQualifiedName(\"" + namespace.getName() + "." + tableName + "\")"; } } private  Schemas(); static TableReference appendIndexSuffix(String indexName, IndexDefinition definition); static void createIndices(KeyValueService kvs,
            Map<TableReference, IndexDefinition> fullIndexNameToDefinition); static void createTable(KeyValueService kvs, TableReference tableRef, TableDefinition definition); static void createTable(Schema schema, KeyValueService kvs, TableReference tableRef); static void createTables(KeyValueService kvs, Map<TableReference, TableDefinition>  tableRefToDefinition); static String getTableReferenceString(String tableName, Namespace namespace); static boolean isTableNameValid(String tableName); static void createTablesAndIndexes(Schema schema, KeyValueService kvs); static void deleteTablesAndIndexes(Schema schema, KeyValueService kvs); static void truncateTablesAndIndexes(Schema schema, KeyValueService kvs);  }