Package org.apache.sis.storage.sql
Class ResourceDefinition
Object
ResourceDefinition
Definition of a resource (table, view or query) to include in a 
SQLStore.- Since:
- 1.1
Defined in the sis-sqlstore module
- 
Method SummaryModifier and TypeMethodDescriptionbooleanReturnstrueif this definition is equal to the given object.getName()Returns the name of the table, view or query to access as a resource.Returns the SQL query to execute for the resource, or empty if the resource is a table or a view.intReturns a hash code value for this resource definition.static ResourceDefinitionCreates a resource definition for a SQL query.static ResourceDefinitionCreates a resource definition for a table or a view in any catalog and schema of the database.static ResourceDefinitionCreates a resource definition for a table or a view in the database.Returns a string representation of this resource definition.
- 
Method Details- 
tableCreates a resource definition for a table or a view in any catalog and schema of the database. The table name can contain SQL wildcard characters:'_'matches any single character and'%'matches any sequence of characters.- Parameters:
- tablePattern- pattern (with- '_'and- '%'wildcards) of a table.
- Returns:
- resource definition for the named table.
 
- 
tableCreates a resource definition for a table or a view in the database. The table name can be any of the followings:- catalog.schemaPattern.tablePattern
- schemaPattern.tablePattern
- tablePattern
 '_'matches any single character and'%'matches any sequence of characters.- Parameters:
- catalog- name of a catalog as it is stored in the database, or- nullfor any catalog.
- schemaPattern- pattern (with- '_'and- '%'wildcards) of a schema, or- nullfor any schema.
- tablePattern- pattern (with- '_'and- '%'wildcards) of a table.
- Returns:
- resource definition for the named table.
 
- 
queryCreates a resource definition for a SQL query. Each column in the query should have a distinct name, using SQLASkeyword if needed. It is caller's responsibility to ensure that the given query is not subject to SQL injection vulnerability.- Parameters:
- name- name of the resource.
- query- the SQL query to execute.
- Returns:
- resource definition for the given SQL query.
 
- 
getNameReturns the name of the table, view or query to access as a resource. There is small differences in the way it is used depending on whether the resource is a table or a query:- If the resource is a table or a view, then this is the fully qualified name (including catalog and schema)
       of the table or view to include in the store. It may contain LIKEwildcard characters, in which case all tables matching the pattern will be included.
- If the resource is a query, then this is an arbitrary name to assign to the resource which will contain the query result.
 - Returns:
- the name of the table, view or query.
 
- If the resource is a table or a view, then this is the fully qualified name (including catalog and schema)
       of the table or view to include in the store. It may contain 
- 
getQueryReturns the SQL query to execute for the resource, or empty if the resource is a table or a view.- Returns:
- the SQL query to execute for the resource.
 
- 
equalsReturnstrueif this definition is equal to the given object.
- 
hashCodepublic int hashCode()Returns a hash code value for this resource definition.
- 
toStringReturns a string representation of this resource definition.
 
-