Class DatabaseProps

    • Field Detail

      • STATEMENT_TYPE_UNKNOWN

        public static final int STATEMENT_TYPE_UNKNOWN
        Query statement type: unknown.
        See Also:
        Constant Field Values
      • STATEMENT_TYPE_SELECT

        public static final int STATEMENT_TYPE_SELECT
        Query statement type: SELECT.
        See Also:
        Constant Field Values
      • STATEMENT_TYPE_INSERT

        public static final int STATEMENT_TYPE_INSERT
        Query statement type: INSERT.
        See Also:
        Constant Field Values
      • STATEMENT_TYPE_UPDATE

        public static final int STATEMENT_TYPE_UPDATE
        Query statement type: UPDATE.
        See Also:
        Constant Field Values
      • STATEMENT_TYPE_DELETE

        public static final int STATEMENT_TYPE_DELETE
        Query statement type: DELETE.
        See Also:
        Constant Field Values
      • STATEMENT_TYPE_FULLSELECT

        public static final int STATEMENT_TYPE_FULLSELECT
        Query statement type: a full select.
        See Also:
        Constant Field Values
      • STATEMENT_TYPE_WITH

        public static final int STATEMENT_TYPE_WITH
        Query statement type: ..WITH...
        See Also:
        Constant Field Values
      • STATEMENT_TYPE_MERGE

        public static final int STATEMENT_TYPE_MERGE
        Query statement type: MERGE.
        See Also:
        Constant Field Values
      • CONNECTION_PROFILE_NAME

        public static final java.lang.String CONNECTION_PROFILE_NAME
        The connection profile name property (value "connectionProfileName").
        See Also:
        Constant Field Values
      • SQL_STATEMENT

        public static final java.lang.String SQL_STATEMENT
        The SQL statement property (value "sqlStatement").
        See Also:
        Constant Field Values
      • STATEMENT_TYPE

        public static final java.lang.String STATEMENT_TYPE
        The Statement Type property name.
        See Also:
        Constant Field Values
      • RESULT_SET

        public static final java.lang.String RESULT_SET
        The Result Set property name.
        See Also:
        Constant Field Values
      • RESULT

        public static final java.lang.String RESULT
        The Result property name used for UPDATE, DELETE, ...
        See Also:
        Constant Field Values
    • Constructor Detail

      • DatabaseProps

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

        public DatabaseProps​(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 PropCnr
        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 PropCnr
      • getDescription

        public java.lang.String getDescription()
        Gets the database transaction description.
        Returns:
        A description, or null for none.
      • createInputProps

        protected InputProps createInputProps()
        Creates the input properties.
        Returns:
        The InputProps instance named Atom.INPUT.
      • getConnectionProfileName

        public java.lang.String getConnectionProfileName()
        Gets the connection profile name.
        Returns:
        the connectionProfileName
      • setConnectionProfileName

        public void setConnectionProfileName​(java.lang.String connectionProfileName)
        Sets the connection profile name to use.
        Parameters:
        connectionProfileName - The connectionProfileName to set.
      • getSQLStatement

        public java.lang.String getSQLStatement()
        Gets the SQL statement.
        Returns:
        The SQL statement, null for none.
      • setSQLStatement

        public boolean setSQLStatement​(java.lang.String sql)
        Gets the SQL statement.
        Parameters:
        sql - The SQL statement string.
        Returns:
        true for changed, false for no change.
      • getStatementType

        public int getStatementType()
        Gets the statement type.
        Returns:
        One of the values:
        • STATEMENT_TYPE_SELECT,
        • STATEMENT_TYPE_INSERT,
        • STATEMENT_TYPE_UPDATE,
        • STATEMENT_TYPE_DELETE,
        • STATEMENT_TYPE_FULLSELECT,
        • STATEMENT_TYPE_WITH,
        • STATEMENT_TYPE_MERGE, or
        • STATEMENT_TYPE_UNKNOWN.
      • setStatementType

        public void setStatementType​(int type)
        Sets the statement type. This method is used internally in the Designer and should not be called elsewhere.
        Parameters:
        type - One of the values:
        • STATEMENT_TYPE_SELECT,
        • STATEMENT_TYPE_INSERT,
        • STATEMENT_TYPE_UPDATE,
        • STATEMENT_TYPE_DELETE,
        • STATEMENT_TYPE_FULLSELECT,
        • STATEMENT_TYPE_WITH,
        • STATEMENT_TYPE_MERGE, or
        • STATEMENT_TYPE_UNKNOWN.
        Throws:
        java.lang.IllegalArgumentException - If the type is invalid.
      • getInputProps

        public InputProps getInputProps()
        Gets the input properties containing VirtualSpace, parameter definitions, etc.
        Returns:
        The input properties of the database transaction.
      • getResultProps

        public ResultProps 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.

        Returns:
        The result properties, null for none.
      • getResultSetProps

        public ResultSetProps getResultSetProps()
        Gets the result set properties.

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

        Returns:
        The result set properties, null for none.
      • getConnectionProfileSetup

        public ConnectionProfileSetup getConnectionProfileSetup​(IAppSessionGyro appGyro)
        Gets the connection profile setup configured for this database transaction. In case the setup is not found, an error is logged.
        Parameters:
        appGyro - The application session gyro interface.
        Returns:
        The ConnectionProfileSetup, or null if not found.