Class View

    • Constructor Detail

      • View

        protected View​(java.lang.String schemaName,
                       java.lang.String objectName,
                       int version,
                       java.lang.String selectClause,
                       java.util.Collection<IDatabaseObject> dependencies,
                       java.util.Map<java.lang.String,​java.lang.String> tags,
                       java.util.Collection<GroupPrivilege> privileges,
                       java.util.List<Migration> migrations,
                       boolean create)
        Protected constructor
        Parameters:
        schemaName -
        objectName -
        version -
        selectClause -
        dependencies -
        tags -
        privileges -
        migrations -
        create -
    • Method Detail

      • apply

        public void apply​(ISchemaAdapter target,
                          SchemaApplyContext context)
        Description copied from interface: IDatabaseObject
        Apply the DDL for this object to the target database
        Parameters:
        target - the database target
        context - context to control the schema apply process
      • apply

        public void apply​(java.lang.Integer priorVersion,
                          ISchemaAdapter target,
                          SchemaApplyContext context)
        Description copied from interface: IDatabaseObject
        Apply migration logic to bring the target database to the current level of this object
        target - the database target
        context - to control the schema apply process
      • grantGroupPrivileges

        protected void grantGroupPrivileges​(ISchemaAdapter target,
                                            java.util.Set<Privilege> group,
                                            java.lang.String toUser)
        Description copied from class: BaseObject
        Internal method which can be override by different object types which may need to call a different grant method on the adapter
        Overrides:
        grantGroupPrivileges in class BaseObject
      • drop

        public void drop​(ISchemaAdapter target)
        Description copied from interface: IDatabaseObject
        DROP this object from the target database
      • builder

        public static View.Builder builder​(java.lang.String schemaName,
                                           java.lang.String viewName)
        Create a new Builder instance which can be used to create immutable instances of View
        Returns:
      • isCreate

        public boolean isCreate()
        Getter for the create flag
        Returns:
        whether the view should be created or not