|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.h2gis.utilities.TableLocation
public class TableLocation
Just a class used to split Catalog Schema and Table. Theses components are a unique table identifier.
| Constructor Summary | |
|---|---|
TableLocation(ResultSet rs)
|
|
TableLocation(String table)
|
|
TableLocation(String schema,
String table)
|
|
TableLocation(String catalog,
String schema,
String table)
|
|
| Method Summary | |
|---|---|
static String |
capsIdentifier(String identifier,
Boolean isH2Database)
Change case of parameters to make it more user-friendly. |
boolean |
equals(Object o)
|
String |
getCatalog()
|
String |
getCatalog(String defaultValue)
|
String |
getSchema()
|
String |
getSchema(String defaultValue)
|
String |
getTable()
|
int |
hashCode()
|
static TableLocation |
parse(String concatenatedTableLocation)
Convert catalog.schema.table, schema.table or table into a TableLocation instance. |
static TableLocation |
parse(String concatenatedTableLocation,
Boolean isH2Database)
Convert catalog.schema.table, schema.table or table into a TableLocation instance. |
static String |
quoteIdentifier(String identifier)
Always Quote string for both H2 and Postgre compatibility |
static String |
quoteIdentifier(String identifier,
boolean isH2DataBase)
Quote identifier only if necessary. |
void |
setDefaultSchema(String defaultSchema)
|
String |
toString()
|
String |
toString(boolean isH2)
String representation of Table location, for insertion in SQL statement. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TableLocation(ResultSet rs)
throws SQLException
rs - result set obtained through DatabaseMetaData.getTables(String, String, String, String[])
SQLException
public TableLocation(String catalog,
String schema,
String table)
catalog - Catalog name without quotesschema - Schema name without quotestable - Table name without quotes
public TableLocation(String schema,
String table)
schema - Schema name without quotestable - Table name without quotespublic TableLocation(String table)
table - Table name without quotes| Method Detail |
|---|
public static String quoteIdentifier(String identifier)
identifier - Catalog,Schema,Table or Field name
public static String quoteIdentifier(String identifier,
boolean isH2DataBase)
identifier - Catalog,Schema,Table or Field nameisH2DataBase - True if the quote is for H2, false if for POSTGRE
public String toString()
toString in class Objectpublic String toString(boolean isH2)
isH2 - True if H2, false if
public String getCatalog()
public String getCatalog(String defaultValue)
defaultValue - Return this value if this attribute is not defined.
public static TableLocation parse(String concatenatedTableLocation)
concatenatedTableLocation - Table location [[Catalog.]Schema.]Table
public static TableLocation parse(String concatenatedTableLocation,
Boolean isH2Database)
concatenatedTableLocation - Table location [[Catalog.]Schema.]TableisH2Database - True if H2, False if PostGreSQL, null if unknown
public static String capsIdentifier(String identifier,
Boolean isH2Database)
identifier - Table, Catalog, Schema, or column nameisH2Database - True if H2, False if PostGreSQL, null if unknown
public String getSchema()
public String getSchema(String defaultValue)
defaultValue - Return this value if this attribute is not defined.
public String getTable()
public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic void setDefaultSchema(String defaultSchema)
defaultSchema - Default connection schema, used for table location equality test.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||