Package org.gvsig.fmap.dal.store.db
Class AbstractDBStoreParameters
java.lang.Object
org.gvsig.fmap.dal.spi.AbstractDataParameters
org.gvsig.fmap.dal.spi.AbstractDataStoreParameters
org.gvsig.fmap.dal.store.db.AbstractDBStoreParameters
- All Implemented Interfaces:
org.gvsig.fmap.dal.DataParameters,org.gvsig.fmap.dal.DataStoreParameters,org.gvsig.fmap.dal.feature.OpenFeatureStoreParameters,org.gvsig.fmap.dal.OpenDataStoreParameters,org.gvsig.fmap.dal.resource.db.DBParameters,org.gvsig.fmap.dal.serverexplorer.db.DBConnectionParameter,org.gvsig.fmap.dal.store.db.DBStoreParameters,org.gvsig.json.SupportFromJson,org.gvsig.json.SupportToJson,org.gvsig.tools.dynobject.DynObject,org.gvsig.tools.persistence.Persistent,org.gvsig.tools.util.Validator
public abstract class AbstractDBStoreParameters
extends org.gvsig.fmap.dal.spi.AbstractDataStoreParameters
implements org.gvsig.fmap.dal.store.db.DBStoreParameters
Abstract Data base Store Parameters
- Author:
- jmvivo
-
Field Summary
Fields inherited from interface org.gvsig.fmap.dal.DataParameters
CRS_PARAMTER_NAMEFields inherited from interface org.gvsig.fmap.dal.resource.db.DBParameters
DBNAME_PARAMTER_NAME, HOST_PARAMTER_NAME, PASSWORD_PARAMTER_NAME, PORT_PARAMTER_NAME, USER_PARAMTER_NAMEFields inherited from interface org.gvsig.fmap.dal.store.db.DBStoreParameters
BASEFILTER_PARAMTER_NAME, BASEORDER_PARAMTER_NAME, DEFAULTGEOMETRY_PARAMTER_NAME, FIELDS_PARAMTER_NAME, GEOMETRYSUBTYPE_PARAMTER_NAME, GEOMETRYTYPE_PARAMTER_NAME, PARAMETERS_DEFINITION_NAME, PKFIELDS_PARAMTER_NAME, SQL_PARAMTER_NAME, TABLE_PARAMTER_NAME, WORKINGAREA_PARAMTER_NAME -
Constructor Summary
ConstructorsConstructorDescriptionAbstractDBStoreParameters(String parametersDefinitionName, String providerName) -
Method Summary
Modifier and TypeMethodDescriptionGet initial filter to use.
This filter is passed to BD provider on each request as a base filter.Get initial order to use.
This order is used if no custom order is request in query.org.gvsig.crs.projection.lib.ProjectiongetCRS()Get the SRS id string set manually for thedefault geometryfield of this layer.
if is set tonullmeans that the library must detect it automatically.
Supported only for stores with geometric fields.Return the geometry field to use like default geometry (seeFeature.getDefaultGeometry())
This option is supported only in geometry providers.
If this parameters is not set and store has only one field geometry then library uses that field as defaultprotected org.gvsig.tools.dynobject.DelegatedDynObjectString[]Get an array of the field names that we want to use.
Anullmeans that we want all fields available.Get a comma separated list of the field names that we want to use.
Anullor empty string means that we want all fields available.intintgetHost()String[]Get an array of the field names that compound the primary key.
Anullor empty string means that library must detect this information.
Note: seegetPkFieldsString()Get a comma separated list of the field names that compound the primary key.
Anullor empty string means that library must detect this information.
Note:If this parameters is undefined, the library can't do this detection, some services will don't be available for this store (like selection, editing orFeature.getReference())getPort()getSQL()Get the SQL to use as source of the store instead a table or a view.
If this property is set the store changes his work flow: store is in read only mode.tableproperty is ignored.pkFieldsis not identified automatically filter and order will be resolved locally (pour performance)getTable()Gettableparameter value
This parameters describes what table or view we want to connect.
Not used ifsqlparameter set.getUser()org.gvsig.fmap.geom.primitive.EnvelopeGet the filter by area ofgetDefaultGeometryField()used in this store.
Supported only for stores with geometric fieldsbooleanisValid()voidsetBaseFilter(String filter) Set initial filter to use.
This filter is passed to BD provider on each request as a base filter.voidsetBaseOrder(String order) Set initial order to use.
This order is used if no custom order is request in query.voidvoidsetCRS(org.gvsig.crs.projection.lib.Projection srs) Set manually the SRS for thedefault geometryfield of this layer.
if is set tonullor empty string means that the library must detect it automatically.
Supported only for stores with geometric fields.voidSetdata base name/code> parameter valuevoidsetDefaultGeometryField(String geomName) Set the geometry field to use like default geometry.
SeegetDefaultGeometryField()for description.voidSet a comma separated list of the field names that we want to use.
Anullmeans that we want all fields available.voidSet an array of the field names that we want to use.
Anullmeans that we want all fields available.voidsetGeometrySubtype(int geometrySubtype) voidsetGeometryType(int geometryType) voidvoidsetPassword(String password) Setpassword/code> parameter valuevoidsetPkFields(String fields) Set a comma separated list of the field names that compound the primary key.
Anullor empty string means that library must detect this information.
Note: seegetPkFieldsString()voidsetPkFields(String[] fields) Set an array of the field names that compound the primary key.
Anullor empty string means that library must detect this information.
Note: seegetPkFieldsString()voidsetPort(int port) voidSetport/code> parameter valuevoidSet the SQL to use as source of the store instead a table or a view.
Note:seegetSQL()for descriptionvoidSettableparameter value
This parameters describes what table or view we want to connect.
Not used ifsqlparameter set.voidSetuser/code> parameter valuevoidsetWorkingArea(org.gvsig.fmap.geom.primitive.Envelope workingArea) Set the filter by area ofgetDefaultGeometryField()used in this store.
Supported only for stores with geometric fieldsMethods inherited from class org.gvsig.fmap.dal.spi.AbstractDataStoreParameters
getSourceId, isTheSameExplorer, isTheSameStoreMethods inherited from class org.gvsig.fmap.dal.spi.AbstractDataParameters
clear, copyValuesTo, delegate, equals, fromByteArray, fromJson, getCause, getCopy, getDynClass, getDynValue, getMessage, getProviderName, hasDynValue, hashCode, implement, invokeDynMethod, invokeDynMethod, isValid, loadFromState, loadPRJ, loadWLD, saveToState, setDynValue, toByteArray, toJson, toJsonBuilder, toString, toString, validateMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.gvsig.fmap.dal.DataParameters
clear, getCopy, toByteArray, toString, validateMethods inherited from interface org.gvsig.fmap.dal.DataStoreParameters
getProviderName, getSourceId, isTheSameExplorer, isTheSameStoreMethods inherited from interface org.gvsig.tools.dynobject.DynObject
delegate, getDynClass, getDynValue, hasDynValue, implement, invokeDynMethod, invokeDynMethod, setDynValueMethods inherited from interface org.gvsig.tools.persistence.Persistent
loadFromState, saveToStateMethods inherited from interface org.gvsig.json.SupportFromJson
fromJsonMethods inherited from interface org.gvsig.json.SupportToJson
toJson, toJson, toJsonBuilder, toJsonBuilder
-
Constructor Details
-
AbstractDBStoreParameters
-
-
Method Details
-
getDelegatedDynObject
protected org.gvsig.tools.dynobject.DelegatedDynObject getDelegatedDynObject()- Specified by:
getDelegatedDynObjectin classorg.gvsig.fmap.dal.spi.AbstractDataParameters
-
getDataStoreName
- Specified by:
getDataStoreNamein interfaceorg.gvsig.fmap.dal.DataStoreParameters- Specified by:
getDataStoreNamein interfaceorg.gvsig.fmap.dal.store.db.DBStoreParameters- Overrides:
getDataStoreNamein classorg.gvsig.fmap.dal.spi.AbstractDataParameters
-
getDescription
- Specified by:
getDescriptionin interfaceorg.gvsig.fmap.dal.DataStoreParameters- Specified by:
getDescriptionin interfaceorg.gvsig.fmap.dal.store.db.DBStoreParameters- Overrides:
getDescriptionin classorg.gvsig.fmap.dal.spi.AbstractDataParameters
-
isValid
public boolean isValid()- Specified by:
isValidin interfaceorg.gvsig.fmap.dal.DataStoreParameters- Specified by:
isValidin interfaceorg.gvsig.fmap.dal.store.db.DBStoreParameters
-
getHost
- Specified by:
getHostin interfaceorg.gvsig.fmap.dal.resource.db.DBParameters- Specified by:
getHostin interfaceorg.gvsig.fmap.dal.store.db.DBStoreParameters
-
getPort
- Specified by:
getPortin interfaceorg.gvsig.fmap.dal.resource.db.DBParameters- Specified by:
getPortin interfaceorg.gvsig.fmap.dal.store.db.DBStoreParameters
-
getDBName
- Specified by:
getDBNamein interfaceorg.gvsig.fmap.dal.resource.db.DBParameters- Specified by:
getDBNamein interfaceorg.gvsig.fmap.dal.store.db.DBStoreParameters
-
getUser
- Specified by:
getUserin interfaceorg.gvsig.fmap.dal.resource.db.DBParameters- Specified by:
getUserin interfaceorg.gvsig.fmap.dal.store.db.DBStoreParameters
-
getPassword
- Specified by:
getPasswordin interfaceorg.gvsig.fmap.dal.resource.db.DBParameters- Specified by:
getPasswordin interfaceorg.gvsig.fmap.dal.store.db.DBStoreParameters
-
setHost
- Specified by:
setHostin interfaceorg.gvsig.fmap.dal.resource.db.DBParameters- Specified by:
setHostin interfaceorg.gvsig.fmap.dal.store.db.DBStoreParameters
-
setPort
public void setPort(int port) - Specified by:
setPortin interfaceorg.gvsig.fmap.dal.store.db.DBStoreParameters
-
setPort
Setport/code> parameter value- Specified by:
setPortin interfaceorg.gvsig.fmap.dal.resource.db.DBParameters- Specified by:
setPortin interfaceorg.gvsig.fmap.dal.store.db.DBStoreParameters- Parameters:
port-
-
setDBName
Setdata base name/code> parameter value- Specified by:
setDBNamein interfaceorg.gvsig.fmap.dal.resource.db.DBParameters- Specified by:
setDBNamein interfaceorg.gvsig.fmap.dal.store.db.DBStoreParameters- Parameters:
data- base name
-
setUser
Setuser/code> parameter value- Specified by:
setUserin interfaceorg.gvsig.fmap.dal.resource.db.DBParameters- Specified by:
setUserin interfaceorg.gvsig.fmap.dal.store.db.DBStoreParameters- Parameters:
user-
-
setPassword
Setpassword/code> parameter value- Specified by:
setPasswordin interfaceorg.gvsig.fmap.dal.resource.db.DBParameters- Specified by:
setPasswordin interfaceorg.gvsig.fmap.dal.store.db.DBStoreParameters- Parameters:
password-
-
getTable
Gettableparameter value
This parameters describes what table or view we want to connect.
Not used ifsqlparameter set.- Specified by:
getTablein interfaceorg.gvsig.fmap.dal.store.db.DBStoreParameters- Parameters:
password-- See Also:
-
setTable
Settableparameter value
This parameters describes what table or view we want to connect.
Not used ifsqlparameter set.- Specified by:
setTablein interfaceorg.gvsig.fmap.dal.store.db.DBStoreParameters- Parameters:
password-- See Also:
-
getFieldsString
Get a comma separated list of the field names that we want to use.
Anullor empty string means that we want all fields available.- Specified by:
getFieldsStringin interfaceorg.gvsig.fmap.dal.store.db.DBStoreParameters- Returns:
- See Also:
-
getFields
Get an array of the field names that we want to use.
Anullmeans that we want all fields available.- Specified by:
getFieldsin interfaceorg.gvsig.fmap.dal.store.db.DBStoreParameters- Returns:
- See Also:
-
setFields
Set a comma separated list of the field names that we want to use.
Anullmeans that we want all fields available.- Specified by:
setFieldsin interfaceorg.gvsig.fmap.dal.store.db.DBStoreParameters- See Also:
-
setFields
Set an array of the field names that we want to use.
Anullmeans that we want all fields available.- Specified by:
setFieldsin interfaceorg.gvsig.fmap.dal.store.db.DBStoreParameters- See Also:
-
getSQL
Get the SQL to use as source of the store instead a table or a view.
If this property is set the store changes his work flow:- store is in read only mode.
tableproperty is ignored.pkFieldsis not identified automatically- filter and order will be resolved locally (pour performance)
- Specified by:
getSQLin interfaceorg.gvsig.fmap.dal.store.db.DBStoreParameters- Returns:
- sql to use
- See Also:
-
setSQL
Set the SQL to use as source of the store instead a table or a view.
Note:seegetSQL()for description- Specified by:
setSQLin interfaceorg.gvsig.fmap.dal.store.db.DBStoreParameters- See Also:
-
getBaseFilter
Get initial filter to use.
This filter is passed to BD provider on each request as a base filter.- Specified by:
getBaseFilterin interfaceorg.gvsig.fmap.dal.store.db.DBStoreParameters- Returns:
- filter
- See Also:
-
setBaseFilter
Set initial filter to use.
This filter is passed to BD provider on each request as a base filter.- Specified by:
setBaseFilterin interfaceorg.gvsig.fmap.dal.store.db.DBStoreParameters- See Also:
-
getBaseOrder
Get initial order to use.
This order is used if no custom order is request in query.- Specified by:
getBaseOrderin interfaceorg.gvsig.fmap.dal.store.db.DBStoreParameters- Returns:
- order
- See Also:
-
setBaseOrder
Set initial order to use.
This order is used if no custom order is request in query.- Specified by:
setBaseOrderin interfaceorg.gvsig.fmap.dal.store.db.DBStoreParameters- See Also:
-
getPkFieldsString
Get a comma separated list of the field names that compound the primary key.
Anullor empty string means that library must detect this information.
Note:If this parameters is undefined, the library can't do this detection, some services will don't be available for this store (like selection, editing orFeature.getReference())- Specified by:
getPkFieldsStringin interfaceorg.gvsig.fmap.dal.store.db.DBStoreParameters- Returns:
- See Also:
-
getPkFields
Get an array of the field names that compound the primary key.
Anullor empty string means that library must detect this information.
Note: seegetPkFieldsString()- Specified by:
getPkFieldsin interfaceorg.gvsig.fmap.dal.store.db.DBStoreParameters- Returns:
- See Also:
-
setPkFields
Set a comma separated list of the field names that compound the primary key.
Anullor empty string means that library must detect this information.
Note: seegetPkFieldsString()- Specified by:
setPkFieldsin interfaceorg.gvsig.fmap.dal.store.db.DBStoreParameters- See Also:
-
setPkFields
Set an array of the field names that compound the primary key.
Anullor empty string means that library must detect this information.
Note: seegetPkFieldsString()- Specified by:
setPkFieldsin interfaceorg.gvsig.fmap.dal.store.db.DBStoreParameters- See Also:
-
getDefaultGeometryField
Return the geometry field to use like default geometry (seeFeature.getDefaultGeometry())
This option is supported only in geometry providers.
If this parameters is not set and store has only one field geometry then library uses that field as default- Specified by:
getDefaultGeometryFieldin interfaceorg.gvsig.fmap.dal.store.db.DBStoreParameters- Returns:
- See Also:
-
setDefaultGeometryField
Set the geometry field to use like default geometry.
SeegetDefaultGeometryField()for description.- Specified by:
setDefaultGeometryFieldin interfaceorg.gvsig.fmap.dal.store.db.DBStoreParameters- Parameters:
geomName-- See Also:
-
getWorkingArea
public org.gvsig.fmap.geom.primitive.Envelope getWorkingArea()Get the filter by area ofgetDefaultGeometryField()used in this store.
Supported only for stores with geometric fields- Specified by:
getWorkingAreain interfaceorg.gvsig.fmap.dal.store.db.DBStoreParameters- Returns:
-
setWorkingArea
public void setWorkingArea(org.gvsig.fmap.geom.primitive.Envelope workingArea) Set the filter by area ofgetDefaultGeometryField()used in this store.
Supported only for stores with geometric fields- Specified by:
setWorkingAreain interfaceorg.gvsig.fmap.dal.store.db.DBStoreParameters
-
setCRS
public void setCRS(org.gvsig.crs.projection.lib.Projection srs) Set manually the SRS for thedefault geometryfield of this layer.
if is set tonullor empty string means that the library must detect it automatically.
Supported only for stores with geometric fields.- Specified by:
setCRSin interfaceorg.gvsig.fmap.dal.store.db.DBStoreParameters- See Also:
-
setCRS
- Specified by:
setCRSin interfaceorg.gvsig.fmap.dal.store.db.DBStoreParameters
-
getCRS
public org.gvsig.crs.projection.lib.Projection getCRS()Get the SRS id string set manually for thedefault geometryfield of this layer.
if is set tonullmeans that the library must detect it automatically.
Supported only for stores with geometric fields.- Specified by:
getCRSin interfaceorg.gvsig.fmap.dal.store.db.DBStoreParameters- Returns:
- See Also:
-
getGeometryType
public int getGeometryType()- Specified by:
getGeometryTypein interfaceorg.gvsig.fmap.dal.store.db.DBStoreParameters
-
setGeometryType
public void setGeometryType(int geometryType) - Specified by:
setGeometryTypein interfaceorg.gvsig.fmap.dal.store.db.DBStoreParameters
-
getGeometrySubtype
public int getGeometrySubtype()- Specified by:
getGeometrySubtypein interfaceorg.gvsig.fmap.dal.store.db.DBStoreParameters
-
setGeometrySubtype
public void setGeometrySubtype(int geometrySubtype) - Specified by:
setGeometrySubtypein interfaceorg.gvsig.fmap.dal.store.db.DBStoreParameters
-