Top Description Inners Fields Constructors Methods
liquibase

public Class CatalogAndSchema

extends Object
Class Inheritance
Imports
liquibase.database.Database, liquibase.structure.core.Catalog, .Schema, liquibase.util.StringUtil, java.util.Locale

Object representing a database catalog and schema. This differs from liquibase.structure.core.Schema in that it has not come from an actual database Schema.

A null value for catalogName or schemaName signifies the default catalog/schema.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum

Field Summary

Modifier and TypeField and Description
private final String
public static final CatalogAndSchema
private final String

Constructor Summary

AccessConstructor and Description
public
CatalogAndSchema(String catalogName, String schemaName)

Method Summary

Modifier and TypeMethod and Description
public CatalogAndSchema
customize(Database accordingTo)

Returns a new CatalogAndSchema object with null/default catalog and schema names set to the correct default catalog and schema.

public boolean
equals(CatalogAndSchema catalogAndSchema, Database accordingTo)

private boolean

Returns:

true if value1 and value2 equal
equals
(Database
- it's db object to getSchemaAndCatalogCase
database
,
String
- schema or catalog to compare with value2
value1
,
String
- schema or catalog to compare with value1
value2
)

This method does schema or catalog comparison

public String
public String
public CatalogAndSchema
standardize(Database accordingTo)

This method returns a new CatalogAndSchema adjusted based on the configuration of the passed database.

public String
toString()

Overrides java.lang.Object.toString.

String version includes both catalog and schema.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

catalogNameback to summary
private final String catalogName
DEFAULTback to summary
public static final CatalogAndSchema DEFAULT
schemaNameback to summary
private final String schemaName

Constructor Detail

CatalogAndSchemaback to summary
public CatalogAndSchema(String catalogName, String schemaName)

Method Detail

customizeback to summary
public CatalogAndSchema customize(Database accordingTo)

Returns a new CatalogAndSchema object with null/default catalog and schema names set to the correct default catalog and schema. If the database does not support catalogs or schemas they will retain a null value. Catalog and schema capitalization will match what the database expects.

See Also
CatalogAndSchema#standardize(liquibase.database.Database)
equalsback to summary
public boolean equals(CatalogAndSchema catalogAndSchema, Database accordingTo)
equalsback to summary
private boolean equals(Database database, String value1, String value2)

This method does schema or catalog comparison

Parameters
database:Database

- it's db object to getSchemaAndCatalogCase

value1:String

- schema or catalog to compare with value2

value2:String

- schema or catalog to compare with value1

Returns:boolean

true if value1 and value2 equal

getCatalogNameback to summary
public String getCatalogName()
getSchemaNameback to summary
public String getSchemaName()
standardizeback to summary
public CatalogAndSchema standardize(Database accordingTo)

This method returns a new CatalogAndSchema adjusted based on the configuration of the passed database. If the database does not support schemas, the returned object will have a null schema. If the database does not support catalogs, the returned object will have a null catalog. If either the schema or catalog matches the database default catalog or schema, they will be nulled out. Catalog and/or schema names will be upper case unless the database violates the SQL standard by being case-sensitive about some or all unquoted identifiers.

See Also
CatalogAndSchema#customize(liquibase.database.Database)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

String version includes both catalog and schema. If either is null it returns the string "DEFAULT" in its place.

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object

Annotations
@Override
liquibase back to summary

public final Enum CatalogAndSchema.CatalogAndSchemaCase

extends Enum<CatalogAndSchema.CatalogAndSchemaCase>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final CatalogAndSchema.CatalogAndSchemaCase
public static final CatalogAndSchema.CatalogAndSchemaCase
public static final CatalogAndSchema.CatalogAndSchemaCase

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static CatalogAndSchema.CatalogAndSchemaCase
public static CatalogAndSchema.CatalogAndSchemaCase[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

LOWER_CASEback to summary
public static final CatalogAndSchema.CatalogAndSchemaCase LOWER_CASE
ORIGINAL_CASEback to summary
public static final CatalogAndSchema.CatalogAndSchemaCase ORIGINAL_CASE
UPPER_CASEback to summary
public static final CatalogAndSchema.CatalogAndSchemaCase UPPER_CASE

Constructor Detail

CatalogAndSchemaCaseback to summary
private CatalogAndSchemaCase()

Method Detail

valueOfback to summary
public static CatalogAndSchema.CatalogAndSchemaCase valueOf(String name)
valuesback to summary
public static CatalogAndSchema.CatalogAndSchemaCase[] values()