Class DatabaseSource

    • Constructor Detail

      • DatabaseSource

        public DatabaseSource()
    • Method Detail

      • execute

        protected void execute()
        Loads the data
      • hasData

        public boolean hasData()
        Checks whether data is available.
        Specified by:
        hasData in class AbstractSource
        Returns:
        true if available
      • getData

        public SpreadSheet getData()
        Returns the currently available data
        Specified by:
        getData in class AbstractSource
        Returns:
        the data, null if none available
      • setCurrentQuery

        public void setCurrentQuery​(SQLStatement value)
        Sets the current query.
        Parameters:
        value - the current query
      • getCurrentQuery

        public SQLStatement getCurrentQuery()
        Returns the current query.
        Returns:
        the current query
      • setCurrentConnection

        public void setCurrentConnection​(AbstractDatabaseConnection value)
        Sets the current connection.
        Parameters:
        value - the connection
      • getCurrentConnection

        public AbstractDatabaseConnection getCurrentConnection()
        Returns the current connection.
        Returns:
        the connection
      • setCurrentTypeMapper

        public void setCurrentTypeMapper​(AbstractTypeMapper value)
        Sets the current type mapper.
        Parameters:
        value - the mapper
      • getCurrentTypeMapper

        public AbstractTypeMapper getCurrentTypeMapper()
        Returns the current type mapper.
        Returns:
        the mapper
      • setCurrentDataRow

        public void setCurrentDataRow​(DataRow value)
        Sets the current data row.
        Parameters:
        value - the data row
      • getCurrentDataRow

        public DataRow getCurrentDataRow()
        Returns the current data row.
        Returns:
        the data row
      • assign

        public void assign​(AbstractWidget other)
        Retrieves the values from the other widget, if possible.
        Specified by:
        assign in class AbstractWidget
        Parameters:
        other - the other widget to get the values from
      • serialize

        public Object serialize()
        Serializes the setup from the widget.
        Specified by:
        serialize in class AbstractWidget
        Returns:
        the generated setup representation
      • deserialize

        public void deserialize​(Object data,
                                MessageCollection errors)
        Deserializes the setup and maps it onto the widget. /** Deserializes the setup and maps it onto the widget.
        Specified by:
        deserialize in class AbstractWidget
        Parameters:
        data - the setup representation to use
        errors - for collecting errors