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 protectedRelation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RelationaddColumn(Column column)intcompareTo(Object o)ColumngetColumn(String columnName)Returns the column object for the given columnName.List<Column>getColumns()DatabaseObject[]getContainingObjects()List<Index>getIndexes()StringgetName()StringgetRemarks()SchemagetSchema()List<UniqueConstraint>getUniqueConstraints()RelationsetName(String name)Sets the name for the database object.RelationsetRemarks(String remarks)RelationsetSchema(String catalog, String schema)RelationsetSchema(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:DatabaseObjectSets 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:
compareToin interfaceComparable- Overrides:
compareToin classAbstractDatabaseObject
-
-