Interface Table

    • Method Detail

      • getImportMode

        TableImportMode getImportMode()
        Get the value for ImportMode. (What is the import mode for this table?) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • isInMemory

        boolean isInMemory()
        Get the value for InMemory. (Memory tables are loaded into memory on startup of the scheduler, or as soon as this flag is set to true.)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getNumTableValues

        Long getNumTableValues()
        Get the value for NumTableValues. (The number of TableValues this table has. This is a performance optimization field.) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setImportMode

        void setImportMode​(TableImportMode newImportMode)
        Set the value for ImportMode. (What is the import mode for this table?) This value is mandatory.
        Parameters:
        newImportMode - the new value for ImportMode. If this is null, then the object cannot be persisted.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setInMemory

        void setInMemory​(boolean newInMemory)
        Set the value for InMemory. (Memory tables are loaded into memory on startup of the scheduler, or as soon as this flag is set to true.)
        Parameters:
        newInMemory - the new value for InMemory.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • createTableValue

        TableValue createTableValue​(String key,
                                    TableDefinitionColumn tableDefinitionColumn)
        Creates a TableValue for the given key and TableDefinitionColumn. It uses the TableDefinitionColumn to set the columnName in the new TableValue and to initialize columnValue if the column specifies a default value.

        NOTE: This method is a convenience method, and should be used instead of createTableValue(), as this also sets the default value correctly, as well as pre-populating the name.

        Parameters:
        key - Key of the value that should be created.
        tableDefinitionColumn - TableDefinitionColumn for which a TableValue should be created.
        Returns:
        The new TableValue
      • getTableRowByKey

        RWIterable<TableValue> getTableRowByKey​(String key)
        Return an iterator with all the values in the row.
        Specified by:
        getTableRowByKey in interface TableComp
        Parameters:
        key - The key (case insensitive).
        Returns:
        The values in the row.
      • getRTXReader

        RTXReader getRTXReader()
        Export this table as an RTXReader.
        Returns:
        The RTXReader representing this Table.
      • getRTXReader

        RTXReader getRTXReader​(String[] cols)
        Export this table as an RTXReader filtered by columns.
        Parameters:
        cols - Column names as a list
        Returns:
        Filtered by columns RTXReader representing this Table.
      • getTableDefinition

        TableDefinition getTableDefinition()
        Get the TableDefinition.
        Returns:
        TableDefinition
        Throws:
        com.redwood.scheduler.api.exception.ObjectDeletedException - If this method is called when the object has been marked for deletion.
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - If this method is called when the object has been removed from it's session.
      • setTableDefinition

        void setTableDefinition​(TableDefinition newTableDefinition)
        Set the value for TableDefinition. This value is mandatory.
        Parameters:
        newTableDefinition - is the object to set TableDefinition to. What type of object raised this alert? If this is null, then the object cannot be persisted.
      • getTableValues

        RWIterable<TableValue> getTableValues()
        Get an RWIterable over a collection of TableValues, the collection will be ordered by Key DisplayOrder. If the collection is empty, an empty iterator will be returned, that is, this method will never return null. Table values.
        Specified by:
        getTableValues in interface TableComp
        Returns:
        An RWIterable over a collection of TableValue objects , the collection will be ordered by Key DisplayOrder.
      • getTableValueBySearchKeySearchColumnName

        TableValue getTableValueBySearchKeySearchColumnName​(String searchKey,
                                                            String searchColumnName)
        Get the TableValue by SearchKeyColumn.
        Parameters:
        searchKey -
        searchColumnName -
        Returns:
        the TableValue, or null if it could not be found
      • checkCreatePrivilege

        RequiredPermission checkCreatePrivilege()
        Check whether or not the create action can be performed on this object.
        Returns:
        a RequiredPermission instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
      • checkViewPrivilege

        RequiredPermission checkViewPrivilege()
        Check whether or not the view action can be performed on this object.
        Returns:
        a RequiredPermission instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
      • checkEditPrivilege

        RequiredPermission checkEditPrivilege()
        Check whether or not the edit action can be performed on this object.
        Returns:
        a RequiredPermission instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
      • checkDeletePrivilege

        RequiredPermission checkDeletePrivilege()
        Check whether or not the delete action can be performed on this object.
        Returns:
        a RequiredPermission instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.