Package com.redwood.scheduler.api.model
Class TableFinder
- java.lang.Object
-
- com.redwood.scheduler.api.model.TableFinder
-
public class TableFinder extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Table
findTable(SchedulerSession session, String tableName)
Find a table based on its name, in a case insensitive manner.static Table
findVariablesTable(SchedulerSession session)
Find the system variables table.
-
-
-
Method Detail
-
findTable
public static Table findTable(SchedulerSession session, String tableName)
Find a table based on its name, in a case insensitive manner. If a '.' is contained in the table name, the table name is expected to be prefixed with the partition, so the table in the specified partition will be returned or null if it doesn't exist. Otherwise it first looks for the table in the session default partition; if not found, it continues to look for the table using the partition search path.- Parameters:
session
- the session to get the table from.tableName
- the name of the table.- Returns:
- the table or null if it can't be found
- Throws:
RuntimeException
- if no valid partition can be found.
-
findVariablesTable
public static Table findVariablesTable(SchedulerSession session)
Find the system variables table.- Parameters:
session
- the session to get the object from.- Returns:
- the system variables table.
-
-