|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.data.jdbc.fidmapper.AbstractFIDMapper
org.geotools.data.jdbc.fidmapper.TypedFIDMapper
public class TypedFIDMapper
This fidmapper just takes another fid mapper and builds fids based on the wrapped FIDMapper by prefixing them with the feature type name, that is, the resulting fid follow the <featureTypeName>.<basic_fid> pattern.
Field Summary |
---|
Fields inherited from class org.geotools.data.jdbc.fidmapper.AbstractFIDMapper |
---|
autoIncrement, colDecimalDigits, colNames, colSizes, colTypes, returnFIDColumnsAsAttributes, tableName, tableSchemaName |
Constructor Summary | |
---|---|
TypedFIDMapper(FIDMapper wrapped,
java.lang.String featureTypeName)
Deprecated. Creates a new TypedFIDMapper object. |
Method Summary | |
---|---|
java.lang.String |
createID(java.sql.Connection conn,
org.opengis.feature.simple.SimpleFeature feature,
java.sql.Statement statement)
Deprecated. Creates a new ID for a feature. |
boolean |
equals(java.lang.Object object)
Deprecated. |
int |
getColumnCount()
Deprecated. Returns the number of columns in the primary keys handled by this mapper |
int |
getColumnDecimalDigits(int colIndex)
Deprecated. Provides the number of decimal digits for this column. |
java.lang.String |
getColumnName(int colIndex)
Deprecated. Returns the name of the specified column in the primary key |
int |
getColumnSize(int colIndex)
Deprecated. Returns the size of a primary key column as it would be provided by the database metadata. |
int |
getColumnType(int colIndex)
Deprecated. Returns the column type by using a constant available in the java.sql.Types interface |
java.lang.String |
getID(java.lang.Object[] attributes)
Deprecated. Returns the FID given the values of the prymary key attributes |
java.lang.Object[] |
getPKAttributes(java.lang.String FID)
Deprecated. Creates the value for the PK attributes given the feature. |
java.lang.String |
getTableName()
Deprecated. |
java.lang.String |
getTableSchemaName()
Deprecated. |
FIDMapper |
getWrappedMapper()
Deprecated. Returns the base mapper wrapped by this TypedFIDMapper |
void |
initSupportStructures()
Deprecated. This method will be called by JDBCDataStore when creating new tables to give the FID mapper an opportunity to initialize needed data structures, such as support tables, sequences, and so on. |
boolean |
isAutoIncrement(int colIndex)
Deprecated. Returns true if the column is of serial type, that is, its value is automatically generated by the database if the user does not provide one |
boolean |
isValid(java.lang.String fid)
Deprecated. Provides a simple means of assessing if a feature id is structurally valid with respect to the fids this FIDMapper creates. |
boolean |
isVolatile()
Deprecated. Convenience since most FID mappers should be persistent, override on the specific ones that aren't. |
boolean |
returnFIDColumnsAsAttributes()
Deprecated. If true the primary key columns will be returned as attributes. |
java.lang.String |
toString()
Deprecated. Create a nice string representation of a FID Mapper |
Methods inherited from class org.geotools.data.jdbc.fidmapper.AbstractFIDMapper |
---|
getColumnDecimalDigits, getColumnName, getColumnSize, getColumnType, hasAutoIncrementColumns, isAutoIncrement, setInfo |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TypedFIDMapper(FIDMapper wrapped, java.lang.String featureTypeName)
wrapped
- featureTypeName
-
java.lang.IllegalArgumentException
- DOCUMENT ME!Method Detail |
---|
public java.lang.String getID(java.lang.Object[] attributes)
FIDMapper
attributes
- DOCUMENT ME!FIDMapper.getID(java.lang.Object[])
public java.lang.Object[] getPKAttributes(java.lang.String FID) throws java.io.IOException
FIDMapper
FID
- The feature ID is going to be parsed
java.io.IOException
FIDMapper.getPKAttributes(java.lang.String)
public boolean returnFIDColumnsAsAttributes()
FIDMapper
returnFIDColumnsAsAttributes
in interface FIDMapper
returnFIDColumnsAsAttributes
in class AbstractFIDMapper
FIDMapper.returnFIDColumnsAsAttributes()
public int getColumnCount()
FIDMapper
getColumnCount
in interface FIDMapper
getColumnCount
in class AbstractFIDMapper
FIDMapper.getColumnCount()
public java.lang.String getColumnName(int colIndex)
FIDMapper
getColumnName
in interface FIDMapper
getColumnName
in class AbstractFIDMapper
FIDMapper.getColumnName(int)
public int getColumnType(int colIndex)
FIDMapper
getColumnType
in interface FIDMapper
getColumnType
in class AbstractFIDMapper
FIDMapper.getColumnType(int)
public int getColumnSize(int colIndex)
FIDMapper
getColumnSize
in interface FIDMapper
getColumnSize
in class AbstractFIDMapper
FIDMapper.getColumnSize(int)
public int getColumnDecimalDigits(int colIndex)
FIDMapper
getColumnDecimalDigits
in interface FIDMapper
getColumnDecimalDigits
in class AbstractFIDMapper
FIDMapper.getColumnDecimalDigits(int)
public boolean isAutoIncrement(int colIndex)
FIDMapper
isAutoIncrement
in interface FIDMapper
isAutoIncrement
in class AbstractFIDMapper
FIDMapper.isAutoIncrement(int)
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
Object.equals(java.lang.Object)
public java.lang.String createID(java.sql.Connection conn, org.opengis.feature.simple.SimpleFeature feature, java.sql.Statement statement) throws java.io.IOException
FIDMapper
conn
- - the database connectionfeature
- - the feature that needs the new FIDstatement
- - the statement used to insert the feature into the
database
java.io.IOException
org.geotools.data.jdbc.fidmapper.FIDMapper#createID(java.sql.Connection,
org.geotools.feature.Feature, Statement)
public void initSupportStructures()
FIDMapper
initSupportStructures
in interface FIDMapper
initSupportStructures
in class AbstractFIDMapper
FIDMapper.initSupportStructures()
public FIDMapper getWrappedMapper()
public java.lang.String toString()
AbstractFIDMapper
toString
in class AbstractFIDMapper
public java.lang.String getTableName()
getTableName
in class AbstractFIDMapper
public java.lang.String getTableSchemaName()
getTableSchemaName
in class AbstractFIDMapper
public boolean isVolatile()
AbstractFIDMapper
isVolatile
in interface FIDMapper
isVolatile
in class AbstractFIDMapper
FIDMapper.isVolatile()
public boolean isValid(java.lang.String fid)
FIDMapper
The primary purpose of this method is to help in filtering out fids from filters that are not appropriate for a given FeatureType but that may otherwise being treated as valid if they get down to the actual SQL query.
The validity check may be as strict or as loose as the concrete FIDMapper wishes, since there may be cases where whether a fid in a filter is valid or not is not that important, or where it may result in deleting a Feature that was not expected to be deleted.
An example of such a need for validation may be a feature id composed like <featureTypeName>.<number>
, where the actual table PK is just the <number>
part. If
a request over the FeatureType "ft1" is made with a fid filter like ft2.1
, this
method can ensure the number 1
is not send out in the SQL query at all.
fid
- a feature id to check for structural validity
true
if the structure fid
indicates it is a valid feature id for the
FeatureType this FIDMapper works for, false
otherwise.FIDMapper.isValid(String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |