Class DatabaseProps

All Implemented Interfaces:
EventListener, IGProp<GProp<?>[]>, IPropCnr, Cloneable
Direct Known Subclasses:
EditorDatabaseProps

public class DatabaseProps extends PropCnr
This database property container holds database service definition.
  • Field Details Link icon

    • STATEMENT_TYPE_UNKNOWN Link icon

      public static final int STATEMENT_TYPE_UNKNOWN
      Query statement type: unknown.
      See Also:
    • STATEMENT_TYPE_SELECT Link icon

      public static final int STATEMENT_TYPE_SELECT
      Query statement type: SELECT.
      See Also:
    • STATEMENT_TYPE_INSERT Link icon

      public static final int STATEMENT_TYPE_INSERT
      Query statement type: INSERT.
      See Also:
    • STATEMENT_TYPE_UPDATE Link icon

      public static final int STATEMENT_TYPE_UPDATE
      Query statement type: UPDATE.
      See Also:
    • STATEMENT_TYPE_DELETE Link icon

      public static final int STATEMENT_TYPE_DELETE
      Query statement type: DELETE.
      See Also:
    • STATEMENT_TYPE_FULLSELECT Link icon

      public static final int STATEMENT_TYPE_FULLSELECT
      Query statement type: a full select.
      See Also:
    • STATEMENT_TYPE_WITH Link icon

      public static final int STATEMENT_TYPE_WITH
      Query statement type: ..WITH...
      See Also:
    • STATEMENT_TYPE_MERGE Link icon

      public static final int STATEMENT_TYPE_MERGE
      Query statement type: MERGE.
      See Also:
    • CONNECTION_PROFILE_NAME Link icon

      public static final String CONNECTION_PROFILE_NAME
      The connection profile name property (value "connectionProfileName").
      See Also:
    • SQL_STATEMENT Link icon

      public static final String SQL_STATEMENT
      The SQL statement property (value "sqlStatement").
      See Also:
    • STATEMENT_TYPE Link icon

      public static final String STATEMENT_TYPE
      The Statement Type property name.
      See Also:
    • RESULT_SET Link icon

      public static final String RESULT_SET
      The Result Set property name.
      See Also:
    • RESULT Link icon

      public static final String RESULT
      The Result property name used for UPDATE, DELETE, ...
      See Also:
  • Constructor Details Link icon

    • DatabaseProps Link icon

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

      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 Details Link icon

    • addPredefinedProps Link icon

      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 Link icon

      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
    • clone Link icon

      public DatabaseProps clone()
      Clones the property.
      Overrides:
      clone in class PropCnr
    • getDescription Link icon

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

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

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

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

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

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

      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 Link icon

      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:
      IllegalArgumentException - If the type is invalid.
    • getInputProps Link icon

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

      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 Link icon

      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 Link icon

      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.