Package com.gpudb.protocol
Class FilterByTableRequest
- java.lang.Object
-
- com.gpudb.protocol.FilterByTableRequest
-
- All Implemented Interfaces:
org.apache.avro.generic.GenericContainer,org.apache.avro.generic.IndexedRecord
public class FilterByTableRequest extends Object implements org.apache.avro.generic.IndexedRecord
A set of parameters forGPUdb.filterByTable.Filters objects in one table based on objects in another table. The user must specify matching column types from the two tables (i.e. the target table from which objects will be filtered and the source table based on which the filter will be created); the column names need not be the same. If a
viewNameis specified, then the filtered objects will then be put in a newly created view. The operation is synchronous, meaning that a response will not be returned until all objects are fully available in the result view. The return value contains the count (i.e. the size) of the resulting view.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFilterByTableRequest.OptionsA set of string constants for theFilterByTableRequestparameteroptions.
-
Constructor Summary
Constructors Constructor Description FilterByTableRequest()Constructs a FilterByTableRequest object with default parameters.FilterByTableRequest(String tableName, String viewName, String columnName, String sourceTableName, String sourceTableColumnName, Map<String,String> options)Constructs a FilterByTableRequest object with the specified parameters.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Objectget(int index)This method supports the Avro framework and is not intended to be called directly by the user.static org.apache.avro.SchemagetClassSchema()This method supports the Avro framework and is not intended to be called directly by the user.StringgetColumnName()Name of the column by whose value the data will be filtered from the table designated bytableName.Map<String,String>getOptions()Optional parameters.org.apache.avro.SchemagetSchema()This method supports the Avro framework and is not intended to be called directly by the user.StringgetSourceTableColumnName()Name of the column in thesourceTableNamewhose values will be used as the filter for tabletableName.StringgetSourceTableName()Name of the table whose data will be compared against in the table calledtableName, in [schema_name.]table_name format, using standard name resolution rules.StringgetTableName()Name of the table whose data will be filtered, in [schema_name.]table_name format, using standard name resolution rules.StringgetViewName()If provided, then this will be the name of the view containing the results, in [schema_name.]view_name format, using standard name resolution rules and meeting table naming criteria.inthashCode()voidput(int index, Object value)This method supports the Avro framework and is not intended to be called directly by the user.FilterByTableRequestsetColumnName(String columnName)Name of the column by whose value the data will be filtered from the table designated bytableName.FilterByTableRequestsetOptions(Map<String,String> options)Optional parameters.FilterByTableRequestsetSourceTableColumnName(String sourceTableColumnName)Name of the column in thesourceTableNamewhose values will be used as the filter for tabletableName.FilterByTableRequestsetSourceTableName(String sourceTableName)Name of the table whose data will be compared against in the table calledtableName, in [schema_name.]table_name format, using standard name resolution rules.FilterByTableRequestsetTableName(String tableName)Name of the table whose data will be filtered, in [schema_name.]table_name format, using standard name resolution rules.FilterByTableRequestsetViewName(String viewName)If provided, then this will be the name of the view containing the results, in [schema_name.]view_name format, using standard name resolution rules and meeting table naming criteria.StringtoString()
-
-
-
Constructor Detail
-
FilterByTableRequest
public FilterByTableRequest()
Constructs a FilterByTableRequest object with default parameters.
-
FilterByTableRequest
public FilterByTableRequest(String tableName, String viewName, String columnName, String sourceTableName, String sourceTableColumnName, Map<String,String> options)
Constructs a FilterByTableRequest object with the specified parameters.- Parameters:
tableName- Name of the table whose data will be filtered, in [schema_name.]table_name format, using standard name resolution rules. Must be an existing table.viewName- If provided, then this will be the name of the view containing the results, in [schema_name.]view_name format, using standard name resolution rules and meeting table naming criteria. Must not be an already existing table or view. The default value is ''.columnName- Name of the column by whose value the data will be filtered from the table designated bytableName.sourceTableName- Name of the table whose data will be compared against in the table calledtableName, in [schema_name.]table_name format, using standard name resolution rules. Must be an existing table.sourceTableColumnName- Name of the column in thesourceTableNamewhose values will be used as the filter for tabletableName. Must be a geospatial geometry column if in 'spatial' mode; otherwise, Must match the type of thecolumnName.options- Optional parameters.CREATE_TEMP_TABLE: IfTRUE, a unique temporary table name will be generated in the sys_temp schema and used in place ofviewName. This is always allowed even if the caller does not have permission to create tables. The generated name is returned inQUALIFIED_VIEW_NAME. Supported values: The default value isFALSE.COLLECTION_NAME: [DEPRECATED--please specify the containing schema for the view as part ofviewNameand useGPUdb.createSchemato create the schema if non-existent] Name of a schema for the newly created view. If the schema is non-existent, it will be automatically created.FILTER_MODE: String indicating the filter mode, eitherIN_TABLEorNOT_IN_TABLE. Supported values: The default value isIN_TABLE.MODE: Mode - should be eitherSPATIALorNORMAL. Supported values: The default value isNORMAL.BUFFER: Buffer size, in meters. Only relevant forSPATIALmode. The default value is '0'.BUFFER_METHOD: Method used to buffer polygons. Only relevant forSPATIALmode. Supported values: The default value isNORMAL.MAX_PARTITION_SIZE: Maximum number of points in a partition. Only relevant forSPATIALmode. The default value is '0'.MAX_PARTITION_SCORE: Maximum number of points * edges in a partition. Only relevant forSPATIALmode. The default value is '8000000'.X_COLUMN_NAME: Name of column containing x value of point being filtered inSPATIALmode. The default value is 'x'.Y_COLUMN_NAME: Name of column containing y value of point being filtered inSPATIALmode. The default value is 'y'.
Map.
-
-
Method Detail
-
getClassSchema
public static org.apache.avro.Schema getClassSchema()
This method supports the Avro framework and is not intended to be called directly by the user.- Returns:
- The schema for the class.
-
getTableName
public String getTableName()
Name of the table whose data will be filtered, in [schema_name.]table_name format, using standard name resolution rules. Must be an existing table.- Returns:
- The current value of
tableName.
-
setTableName
public FilterByTableRequest setTableName(String tableName)
Name of the table whose data will be filtered, in [schema_name.]table_name format, using standard name resolution rules. Must be an existing table.- Parameters:
tableName- The new value fortableName.- Returns:
thisto mimic the builder pattern.
-
getViewName
public String getViewName()
If provided, then this will be the name of the view containing the results, in [schema_name.]view_name format, using standard name resolution rules and meeting table naming criteria. Must not be an already existing table or view. The default value is ''.- Returns:
- The current value of
viewName.
-
setViewName
public FilterByTableRequest setViewName(String viewName)
If provided, then this will be the name of the view containing the results, in [schema_name.]view_name format, using standard name resolution rules and meeting table naming criteria. Must not be an already existing table or view. The default value is ''.- Parameters:
viewName- The new value forviewName.- Returns:
thisto mimic the builder pattern.
-
getColumnName
public String getColumnName()
Name of the column by whose value the data will be filtered from the table designated bytableName.- Returns:
- The current value of
columnName.
-
setColumnName
public FilterByTableRequest setColumnName(String columnName)
Name of the column by whose value the data will be filtered from the table designated bytableName.- Parameters:
columnName- The new value forcolumnName.- Returns:
thisto mimic the builder pattern.
-
getSourceTableName
public String getSourceTableName()
Name of the table whose data will be compared against in the table calledtableName, in [schema_name.]table_name format, using standard name resolution rules. Must be an existing table.- Returns:
- The current value of
sourceTableName.
-
setSourceTableName
public FilterByTableRequest setSourceTableName(String sourceTableName)
Name of the table whose data will be compared against in the table calledtableName, in [schema_name.]table_name format, using standard name resolution rules. Must be an existing table.- Parameters:
sourceTableName- The new value forsourceTableName.- Returns:
thisto mimic the builder pattern.
-
getSourceTableColumnName
public String getSourceTableColumnName()
Name of the column in thesourceTableNamewhose values will be used as the filter for tabletableName. Must be a geospatial geometry column if in 'spatial' mode; otherwise, Must match the type of thecolumnName.- Returns:
- The current value of
sourceTableColumnName.
-
setSourceTableColumnName
public FilterByTableRequest setSourceTableColumnName(String sourceTableColumnName)
Name of the column in thesourceTableNamewhose values will be used as the filter for tabletableName. Must be a geospatial geometry column if in 'spatial' mode; otherwise, Must match the type of thecolumnName.- Parameters:
sourceTableColumnName- The new value forsourceTableColumnName.- Returns:
thisto mimic the builder pattern.
-
getOptions
public Map<String,String> getOptions()
Optional parameters.CREATE_TEMP_TABLE: IfTRUE, a unique temporary table name will be generated in the sys_temp schema and used in place ofviewName. This is always allowed even if the caller does not have permission to create tables. The generated name is returned inQUALIFIED_VIEW_NAME. Supported values: The default value isFALSE.COLLECTION_NAME: [DEPRECATED--please specify the containing schema for the view as part ofviewNameand useGPUdb.createSchemato create the schema if non-existent] Name of a schema for the newly created view. If the schema is non-existent, it will be automatically created.FILTER_MODE: String indicating the filter mode, eitherIN_TABLEorNOT_IN_TABLE. Supported values: The default value isIN_TABLE.MODE: Mode - should be eitherSPATIALorNORMAL. Supported values: The default value isNORMAL.BUFFER: Buffer size, in meters. Only relevant forSPATIALmode. The default value is '0'.BUFFER_METHOD: Method used to buffer polygons. Only relevant forSPATIALmode. Supported values: The default value isNORMAL.MAX_PARTITION_SIZE: Maximum number of points in a partition. Only relevant forSPATIALmode. The default value is '0'.MAX_PARTITION_SCORE: Maximum number of points * edges in a partition. Only relevant forSPATIALmode. The default value is '8000000'.X_COLUMN_NAME: Name of column containing x value of point being filtered inSPATIALmode. The default value is 'x'.Y_COLUMN_NAME: Name of column containing y value of point being filtered inSPATIALmode. The default value is 'y'.
Map.- Returns:
- The current value of
options.
-
setOptions
public FilterByTableRequest setOptions(Map<String,String> options)
Optional parameters.CREATE_TEMP_TABLE: IfTRUE, a unique temporary table name will be generated in the sys_temp schema and used in place ofviewName. This is always allowed even if the caller does not have permission to create tables. The generated name is returned inQUALIFIED_VIEW_NAME. Supported values: The default value isFALSE.COLLECTION_NAME: [DEPRECATED--please specify the containing schema for the view as part ofviewNameand useGPUdb.createSchemato create the schema if non-existent] Name of a schema for the newly created view. If the schema is non-existent, it will be automatically created.FILTER_MODE: String indicating the filter mode, eitherIN_TABLEorNOT_IN_TABLE. Supported values: The default value isIN_TABLE.MODE: Mode - should be eitherSPATIALorNORMAL. Supported values: The default value isNORMAL.BUFFER: Buffer size, in meters. Only relevant forSPATIALmode. The default value is '0'.BUFFER_METHOD: Method used to buffer polygons. Only relevant forSPATIALmode. Supported values: The default value isNORMAL.MAX_PARTITION_SIZE: Maximum number of points in a partition. Only relevant forSPATIALmode. The default value is '0'.MAX_PARTITION_SCORE: Maximum number of points * edges in a partition. Only relevant forSPATIALmode. The default value is '8000000'.X_COLUMN_NAME: Name of column containing x value of point being filtered inSPATIALmode. The default value is 'x'.Y_COLUMN_NAME: Name of column containing y value of point being filtered inSPATIALmode. The default value is 'y'.
Map.- Parameters:
options- The new value foroptions.- Returns:
thisto mimic the builder pattern.
-
getSchema
public org.apache.avro.Schema getSchema()
This method supports the Avro framework and is not intended to be called directly by the user.- Specified by:
getSchemain interfaceorg.apache.avro.generic.GenericContainer- Returns:
- The schema object describing this class.
-
get
public Object get(int index)
This method supports the Avro framework and is not intended to be called directly by the user.- Specified by:
getin interfaceorg.apache.avro.generic.IndexedRecord- Parameters:
index- the position of the field to get- Returns:
- value of the field with the given index.
- Throws:
IndexOutOfBoundsException
-
put
public void put(int index, Object value)This method supports the Avro framework and is not intended to be called directly by the user.- Specified by:
putin interfaceorg.apache.avro.generic.IndexedRecord- Parameters:
index- the position of the field to setvalue- the value to set- Throws:
IndexOutOfBoundsException
-
-