Class EditorDatabaseProps

    • Constructor Detail

      • EditorDatabaseProps

        public EditorDatabaseProps()
        Creates the property container without a name. The name must be set in all cases using the setPropertyAtom call.
      • EditorDatabaseProps

        public EditorDatabaseProps​(Atom propertyAtom)
        Creates the property container with the specified name. All system-reserved names for components begins with "$".
        Parameters:
        propertyAtom - the name of the component, unique within it's parent.
    • Method Detail

      • addPredefinedProps

        protected void addPredefinedProps()
                                   throws PropException
        Adds the predefined properties for this container. This method is called once just after construction of the property container.

        Properties added:

          - InputProps as Atom.INPUT
         

        Overrides:
        addPredefinedProps in class DatabaseProps
        Throws:
        PropException - for property exceptions.
      • getPredefinedProps

        protected void getPredefinedProps()
        Gets potential references to predefined properties for this container. This method is called once just after cloning of the property container.

        The method should get reference to using the getProp(...) methods. This allows the subclass to be able to retrieve the new instances to the properties created during addPredefinedProps() if stored in instance variables.

        Overrides:
        getPredefinedProps in class DatabaseProps
      • getInputSQLProp

        public StringProp getInputSQLProp()
        Gets the input SQL property.
        Returns:
        The StringProp used to store the SQL statement in.
      • getUndoContext

        public org.eclipse.core.commands.operations.IUndoContext getUndoContext()
        Gets the undo context.
        Specified by:
        getUndoContext in interface IPropUndoContext
        Returns:
        The undo context for the Editor part(s) for this container.
      • getPersistentMemento

        public MementoPropCnr getPersistentMemento​(boolean doCreate)
        Gets the memento used to save the editor in this property.
        Parameters:
        doCreate - Creation flag.
        Returns:
        A property container that implements IMemento, or null if this container is disposed of.
      • getOmitSchemaInfo

        public org.eclipse.datatools.sqltools.sqlbuilder.model.IOmitSchemaInfo getOmitSchemaInfo()
        Gets information about whether or not to omit the default schema name from SQL generated in the SQL Builder.
        Returns:
        The IOmitSchemaInfo belong to this ISQLBuilderEditorInput.
      • setOmitSchemaInfo

        public void setOmitSchemaInfo​(org.eclipse.datatools.sqltools.sqlbuilder.model.IOmitSchemaInfo omitSchemaInfo)
        Sets information about whether or not to omit the default schema name from SQL generated in the SQL Builder.
        Parameters:
        omitSchemaInfo - The IOmitSchemaInfo to be set.
      • getConnectionInfo

        public org.eclipse.datatools.sqltools.editor.core.connection.ISQLEditorConnectionInfo getConnectionInfo()
        Gets the ISQLEditorConnectionInfo associated with this input.
        Returns:
        the current ISQLEditorConnectionInfo object
      • setConnectionInfo

        public void setConnectionInfo​(org.eclipse.datatools.sqltools.editor.core.connection.ISQLEditorConnectionInfo connInfo)
        Sets the ISQLEditorConnectionInfo associated with this input to the given object.
        Parameters:
        connInfo - the ISQLEditorConnectionInfo object to set
      • getInputUsageOptions

        public org.eclipse.datatools.sqltools.sqlbuilder.input.ISQLBuilderEditorInputUsageOptions getInputUsageOptions()
        Gets the usage options of the editor input. The options may be configured independent of the existence of specific input info.
        Returns:
        The input usage options.
      • setInputUsageOptions

        public void setInputUsageOptions​(org.eclipse.datatools.sqltools.sqlbuilder.input.ISQLBuilderEditorInputUsageOptions options)
        Sets the usage options of the editor input.
        Parameters:
        options - The ISQLBuilderEditorInputUsageOptions to be set.
      • initialize

        public void initialize​(org.eclipse.datatools.connectivity.IConnectionProfile cp,
                               int type,
                               java.lang.String sql)
        Initializes a new instance of the database properties, as the new wizard provides.
        Parameters:
        cp - The connection profile.
        type - The type, e.g. StatementHelper.STATEMENT_TYPE_SELECT.
        sql - The SQL string.
      • save

        public void save​(CustomSQLBuilder sqlBuilder,
                         boolean saveSQL)
        Saves the SQLBuilderEditorInput into this container.
        Parameters:
        sqlBuilder - The SQLBuilder instance.
        saveSQL - Flag to save the SQL or just the window settings.
      • getInputSQL

        public java.lang.String getInputSQL()
        Gets the input SQL for the SQL builder.
        Returns:
        The SQL statement.
      • createInput

        public org.eclipse.datatools.sqltools.sqlbuilder.input.SQLBuilderEditorInput createInput()
        Creates a new input from the current properties.
        Returns:
        A new EditorInput for the SQLBuilder initialized from the properties.
      • getResultProps

        public EditorResultProps getResultProps()
        Gets the result properties.

        The result properties is available when the statement is not a SELECT query statement, and the SQL statement has been parsed successfully.

        Overrides:
        getResultProps in class DatabaseProps
        Returns:
        The result properties, null for none.
      • getResultSetProps

        public EditorResultSetProps getResultSetProps()
        Gets the result set properties.

        The result set properties is only available for a SELECT query statement, and this method returns null otherwise.

        Overrides:
        getResultSetProps in class DatabaseProps
        Returns:
        The result set properties, null for none.
      • verify

        public boolean verify​(PropVerification verification)
        Verifies this property container. The check performed is the extension of classes and that no circular reference is present.
        Specified by:
        verify in interface IGProp<GProp<?>[]>
        Overrides:
        verify in class PropCnr
        Parameters:
        verification - The property verification class.
        Returns:
        true if verification should proceed, false if disposed of and verification should not take place.