public interface DatabaseObject extends Comparable, LiquibaseSerializable
Table,
PrimaryKey and Column.
The most important abilities of every DatabaseObject are:
AbstractDatabaseObjectLiquibaseSerializable.SerializationTypeGENERIC_CHANGELOG_EXTENSION_NAMESPACE, GENERIC_SNAPSHOT_EXTENSION_NAMESPACE, STANDARD_CHANGELOG_NAMESPACE, STANDARD_SNAPSHOT_NAMESPACE| Modifier and Type | Method and Description |
|---|---|
<T> T |
getAttribute(String attribute,
Class<T> type)
Retrieves the value of a
DatabaseObject's attributes and cast it into the desired type. |
<T> T |
getAttribute(String attribute,
T defaultValue)
Retrieves the value of a
DatabaseObject's attributes and cast it into the desired type. |
Set<String> |
getAttributes()
Returns the name of all attributes currently stored for this
DatabaseObject. |
DatabaseObject[] |
getContainingObjects() |
String |
getName() |
String |
getObjectTypeName() |
Schema |
getSchema() |
String |
getSnapshotId() |
DatabaseObject |
setAttribute(String attribute,
Object value)
Sets a given attribute for this object to the specified value.
|
DatabaseObject |
setName(String name)
Sets the name for the database object.
|
void |
setSnapshotId(String id) |
boolean |
snapshotByDefault() |
compareTogetSerializableFieldNamespace, getSerializableFields, getSerializableFieldType, getSerializableFieldValue, getSerializedObjectName, getSerializedObjectNamespace, load, serializeString getSnapshotId()
void setSnapshotId(String id)
DatabaseObject[] getContainingObjects()
String getObjectTypeName()
String getName()
DatabaseObject setName(String name)
name - the new name for the database objectSchema getSchema()
boolean snapshotByDefault()
Set<String> getAttributes()
DatabaseObject.<T> T getAttribute(String attribute, Class<T> type)
DatabaseObject's attributes and cast it into the desired type.T - the desired type of the valueattribute - case-sensitive name of the attribute for which the value will be retrievedtype - class compatible with the desired type T of the return valueRuntimeException will occur.<T> T getAttribute(String attribute, T defaultValue)
DatabaseObject's attributes and cast it into the desired type.T - the desired type of the valueattribute - case-sensitive name of the attribute for which the value will be retrieveddefaultValue - the value to be returned if no value (not even null) is stored for the attribute name in the
object.RuntimeException will occur.DatabaseObject setAttribute(String attribute, Object value)
attribute - case-sensitive name of the attributevalue - value to be setCopyright © 2019 Liquibase.org. All rights reserved.