Class MsAbstractStatementContainer
java.lang.Object
org.pgcodekeeper.core.database.base.schema.AbstractStatement
org.pgcodekeeper.core.database.ms.schema.MsAbstractStatement
org.pgcodekeeper.core.database.ms.schema.MsAbstractStatementContainer
- All Implemented Interfaces:
IRelation,ISearchPath,IStatement,IStatementContainer,IHashable
public abstract class MsAbstractStatementContainer
extends MsAbstractStatement
implements IRelation, IStatementContainer, ISearchPath
Abstract base class for database objects that can contain other statements.
Provides common functionality for containers like tables and views that can have
indexes, triggers, rules, policies, and constraints as child objects.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddChild(IStatement st) Adds a child statement to this container.booleanDeep part ofAbstractStatement.equals(Object).voidcomputeChildrenHash(Hasher hasher) voidfillChildrenList(List<Collection<? extends AbstractStatement>> l) Gets a child statement by name and type.getChildrenByType(DbObjType type) get all children by typegetTrigger(String name) booleanChecks if this container has any clustered indexes or constraints.Methods inherited from class org.pgcodekeeper.core.database.ms.schema.MsAbstractStatement
appendOwnerSQL, formatSql, getQuoter, getRenameCommand, getSeparator, isOwnedMethods inherited from class org.pgcodekeeper.core.database.base.schema.AbstractStatement
addDependency, addPrivilege, appendAlterComments, appendComments, appendPrivileges, canDrop, canDropBeforeCreate, checkComments, clearPrivileges, compare, deepCopy, equals, fillDescendantsList, getAuthor, getBareName, getChildren, getComment, getDependencies, getDescendants, getDropSQL, getDropSQL, getLibName, getLocation, getName, getObjectState, getObjectState, getOwner, getParent, getPrivileges, getQualifiedName, getSQL, getTwin, hasChildren, hashCode, isLib, setAuthor, setComment, setLibName, setLocation, setOwner, setParent, shallowCopy, toStringMethods inherited from interface org.pgcodekeeper.core.hasher.IHashable
computeHashMethods inherited from interface org.pgcodekeeper.core.database.api.schema.IRelation
getRelationColumnsMethods inherited from interface org.pgcodekeeper.core.database.api.schema.ISearchPath
getContainingSchema, getDatabase, getSchemaName, toObjectReferenceMethods inherited from interface org.pgcodekeeper.core.database.api.schema.IStatement
addDependency, appendAlterSQL, appendOwnerSQL, canDrop, canDropBeforeCreate, clearPrivileges, compare, deepCopy, formatSql, getAuthor, getBareName, getChildren, getComment, getCreationSQL, getDependencies, getDescendants, getDropSQL, getLibName, getLocation, getName, getOwner, getParent, getPrivileges, getQualifiedName, getQuotedName, getQuoter, getRenameCommand, getSeparator, getSQL, getStatementType, getTwin, getTypeName, hasChildren, isLib, isOwned, quote, setComment, setLibName, setLocation, setOwner, shallowCopy
-
Method Details
-
fillChildrenList
- Overrides:
fillChildrenListin classAbstractStatement
-
getChild
Description copied from interface:IStatementContainerGets a child statement by name and type.- Specified by:
getChildin interfaceIStatementContainer- Parameters:
name- the name of the child to findtype- the type of the child to find- Returns:
- the child statement, or null if not found
-
getChildrenByType
Description copied from interface:IStatementContainerget all children by type- Specified by:
getChildrenByTypein interfaceIStatementContainer- Parameters:
type- the type of the children- Returns:
- unmodifiable collection of child statement, or empty list
-
addChild
Description copied from interface:IStatementContainerAdds a child statement to this container.- Specified by:
addChildin interfaceIStatementContainer- Parameters:
st- the child statement to add
-
isClustered
public boolean isClustered()Checks if this container has any clustered indexes or constraints. -
getTrigger
-
computeChildrenHash
-
compareChildren
Description copied from class:AbstractStatementDeep part ofAbstractStatement.equals(Object). Compares all object's child PgStatements for equality.- Overrides:
compareChildrenin classAbstractStatement
-