Package org.apache.sis.storage.sql
Class SQLStoreProvider
Object
DataStoreProvider
SQLStoreProvider
Provider of 
SQLStore instances.- Since:
- 1.0
Defined in the sis-sqlstore module
- 
Nested Class SummaryNested classes/interfaces inherited from class DataStoreProviderDataStoreProvider.Prober<S>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final ParameterDescriptor<Map>Description of the parameter providing the queries to include as resources in theSQLStore.static final ParameterDescriptor<DataSource>Description of the "location" parameter.static final ParameterDescriptor<GenericName[]>Description of the parameter providing the list of tables or views to include as resources in theSQLStore.Fields inherited from class DataStoreProviderCREATE, LOCATION
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic GenericNamecreateTableName(String catalog, String schemaPattern, String tablePattern) Create a qualified table name.Returns a description of all parameters accepted by this provider for opening a connection to the database.Returns a generic name for this data store, used mostly in warnings or error messages.open(StorageConnector connector) Returns aSQLStoreimplementation associated with this provider.open(ParameterValueGroup parameters) Returns a data store implementation associated with this provider for the given parameters.probeContent(StorageConnector connector) ReturnsProbeResult.SUPPORTEDif the given storage appears to be supported bySQLStore.Methods inherited from class DataStoreProvidergetFormat, getLogger, getSupportedVersions, probeContent
- 
Field Details- 
SOURCE_PARAMDescription of the "location" parameter. This parameter is mandatory.- Since:
- 1.1
 
- 
TABLES_PARAMDescription of the parameter providing the list of tables or views to include as resources in theSQLStore. At least one ofTABLES_PARAMorQUERIES_PARAMmust be provided.- Since:
- 1.1
 
- 
QUERIES_PARAMDescription of the parameter providing the queries to include as resources in theSQLStore. Map keys are the resource names asGenericNameorStringinstances. Values are SQL statements (asStringinstances) to execute when the associated resource is requested. At least one ofTABLES_PARAMorQUERIES_PARAMmust be provided.- Since:
- 1.1
 
 
- 
- 
Constructor Details- 
SQLStoreProviderpublic SQLStoreProvider()Creates a new provider.
 
- 
- 
Method Details- 
createTableNamepublic static GenericName createTableName(String catalog, String schemaPattern, String tablePattern) Create a qualified table name. The returnedGenericNamecan be any of the following:- 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.
- tablePattern- pattern (with- '_'and- '%'wildcards) of a table.
- Returns:
- the fully qualified name.
 
- 
getShortNameReturns a generic name for this data store, used mostly in warnings or error messages.- Specified by:
- getShortNamein class- DataStoreProvider
- Returns:
- a short name or abbreviation for the data format.
- See Also:
 
- 
getOpenParametersReturns a description of all parameters accepted by this provider for opening a connection to the database. The group containsSOURCE_PARAM,TABLES_PARAMandQUERIES_PARAM.- Specified by:
- getOpenParametersin class- DataStoreProvider
- Returns:
- description of available parameters for opening a connection to a database.
- See Also:
 
- 
probeContentReturnsProbeResult.SUPPORTEDif the given storage appears to be supported bySQLStore. ReturningSUPPORTEDfrom this method does not guarantee that reading or writing will succeed, only that there appears to be a reasonable chance of success based on a brief inspection of the connection.- Specified by:
- probeContentin class- DataStoreProvider
- Parameters:
- connector- information about the storage (data source).
- Returns:
- SUPPORTEDif the given storage seems to be usable by- SQLStoreinstances.
- Throws:
- DataStoreException- if an SQL error occurred.
 
- 
openReturns aSQLStoreimplementation associated with this provider. The store will provide resources for all tables and views in all schemas and catalogs.- Specified by:
- openin class- DataStoreProvider
- Parameters:
- connector- information about the storage (data source).
- Returns:
- a data store implementation associated with this provider for the given storage.
- Throws:
- DataStoreException- if an error occurred while creating the data store instance.
- See Also:
 
- 
openReturns a data store implementation associated with this provider for the given parameters.- Overrides:
- openin class- DataStoreProvider
- Parameters:
- parameters- opening parameters as defined by- getOpenParameters().
- Returns:
- a data store implementation associated with this provider for the given parameters.
- Throws:
- DataStoreException- if an error occurred while creating the data store instance.
- See Also:
 
 
-