Interface IStatementContainer
- All Superinterfaces:
IStatement
- All Known Subinterfaces:
IDatabase,IForeignTable,IPartitionTable,ISchema,ITable,IView
- All Known Implementing Classes:
ChDatabase,ChSchema,ChTable,ChTableLog,ChView,GpExternalTable,GpPartitionTable,MsAbstractStatementContainer,MsDatabase,MsSchema,MsTable,MsType,MsView,PgAbstractForeignTable,PgAbstractRegularTable,PgAbstractStatementContainer,PgAbstractTable,PgAbstractView,PgDatabase,PgMaterializedView,PgPartitionForeignTable,PgPartitionTable,PgSchema,PgSimpleForeignTable,PgSimpleTable,PgTypedTable,PgView
Interface for database objects that can contain other statements as children.
Provides functionality for adding and retrieving child statements.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddChild(IStatement stmt) Adds a child statement to this container.Gets a child statement by name and type.getChildrenByType(DbObjType type) get all children by typeMethods inherited from interface org.pgcodekeeper.core.database.api.schema.IStatement
addDependency, appendAlterSQL, appendOwnerSQL, canDrop, canDropBeforeCreate, clearPrivileges, compare, deepCopy, formatSql, getAuthor, getBareName, getChildren, getComment, getCreationSQL, getDatabase, 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, toObjectReference
-
Method Details
-
addChild
Adds a child statement to this container.- Parameters:
stmt- the child statement to add
-
getChild
Gets a child statement by name and type.- 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
get all children by type- Parameters:
type- the type of the children- Returns:
- unmodifiable collection of child statement, or empty list
-