Package liquibase.structure.core
Class Relation
- java.lang.Object
-
- liquibase.structure.AbstractDatabaseObject
-
- liquibase.structure.core.Relation
-
- All Implemented Interfaces:
Comparable
,LiquibaseSerializable
,DatabaseObject
public abstract class Relation extends AbstractDatabaseObject
A container of columns. Usually a table or view.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface liquibase.serializer.LiquibaseSerializable
LiquibaseSerializable.SerializationType
-
-
Field Summary
-
Fields inherited from class liquibase.structure.AbstractDatabaseObject
CURLY_BRACKET_PATTERN
-
Fields inherited from interface liquibase.serializer.LiquibaseSerializable
GENERIC_CHANGELOG_EXTENSION_NAMESPACE, GENERIC_SNAPSHOT_EXTENSION_NAMESPACE, STANDARD_CHANGELOG_NAMESPACE, STANDARD_SNAPSHOT_NAMESPACE
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Relation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Relation
addColumn(Column column)
int
compareTo(Object o)
Column
getColumn(String columnName)
Returns the column object for the given columnName.List<Column>
getColumns()
DatabaseObject[]
getContainingObjects()
List<Index>
getIndexes()
String
getName()
String
getRemarks()
Schema
getSchema()
List<UniqueConstraint>
getUniqueConstraints()
Relation
setName(String name)
Sets the name for the database object.Relation
setRemarks(String remarks)
Relation
setSchema(String catalog, String schema)
Relation
setSchema(Schema schema)
-
Methods inherited from class liquibase.structure.AbstractDatabaseObject
getAttribute, getAttribute, getAttributes, getObjectTypeName, getSerializableFieldNamespace, getSerializableFields, getSerializableFieldType, getSerializableFieldValue, getSerializedObjectName, getSerializedObjectNamespace, getSnapshotId, load, serialize, setAttribute, setSnapshotId, shouldIncludeCatalogInSpecification, snapshotByDefault, toString
-
-
-
-
Method Detail
-
getName
public String getName()
-
setName
public Relation setName(String name)
Description copied from interface:DatabaseObject
Sets the name for the database object.- Parameters:
name
- the new name for the database object- Returns:
- a reference to the same object (implementing classes are expected to return a reference to the same object).
-
getUniqueConstraints
public List<UniqueConstraint> getUniqueConstraints()
-
getContainingObjects
public DatabaseObject[] getContainingObjects()
-
getRemarks
public String getRemarks()
-
getColumn
public Column getColumn(String columnName)
Returns the column object for the given columnName. If the column does not exist in this table, return null.
-
getSchema
public Schema getSchema()
- Returns:
- Returns the schema.
-
compareTo
public int compareTo(Object o)
- Specified by:
compareTo
in interfaceComparable
- Overrides:
compareTo
in classAbstractDatabaseObject
-
-