@Immutable public final class TableId extends Object implements Comparable<TableId>
| Modifier and Type | Field and Description |
|---|---|
private String |
catalogName |
private String |
id |
private String |
schemaName |
private String |
tableName |
| Constructor and Description |
|---|
TableId(String catalogName,
String schemaName,
String tableName)
Create a new table identifier.
|
| Modifier and Type | Method and Description |
|---|---|
String |
catalog()
Get the name of the JDBC catalog.
|
int |
compareTo(TableId that) |
int |
compareToIgnoreCase(TableId that) |
boolean |
equals(Object obj) |
int |
hashCode() |
static TableId |
parse(String str)
Parse the supplied string, extracting up to the first 3 parts into a TableID.
|
protected static TableId |
parse(String[] parts,
int numParts,
boolean useCatalogBeforeSchema)
Parse the supplied string, extracting up to the first 3 parts into a TableID.
|
String |
schema()
Get the name of the JDBC schema.
|
String |
table()
Get the name of the table.
|
private static String |
tableId(String catalog,
String schema,
String table) |
String |
toString() |
private final String catalogName
private final String schemaName
private final String tableName
private final String id
public TableId(String catalogName, String schemaName, String tableName)
catalogName - the name of the database catalog that contains the table; may be null if the JDBC driver does not
show a schema for this tableschemaName - the name of the database schema that contains the table; may be null if the JDBC driver does not
show a schema for this tabletableName - the name of the table; may not be nullpublic static TableId parse(String str)
str - the string representation of the table identifier; may not be nullprotected static TableId parse(String[] parts, int numParts, boolean useCatalogBeforeSchema)
parts - the parts of the identifier; may not be nullnumParts - the number of parts to use for the table identifieruseCatalogBeforeSchema - true if the parsed string contains only 2 items and the first should be used as
the catalog and the second as the table name, or false if the first should be used as the schema and the
second as the table namepublic String catalog()
public String schema()
public String table()
public int compareTo(TableId that)
compareTo in interface Comparable<TableId>public int compareToIgnoreCase(TableId that)
Copyright © 2016 JBoss by Red Hat. All rights reserved.