|
||||||||||
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.MultiColumnFIDMapper
public class MultiColumnFIDMapper
A simple implementation of FIDMapper for multi column primary keys
Field Summary |
---|
Fields inherited from class org.geotools.data.jdbc.fidmapper.AbstractFIDMapper |
---|
autoIncrement, colDecimalDigits, colNames, colSizes, colTypes, returnFIDColumnsAsAttributes, tableName, tableSchemaName |
Constructor Summary | |
---|---|
MultiColumnFIDMapper(java.lang.String[] colNames,
int[] colTypes,
int[] colSizes,
int[] colDecimalDigits,
boolean[] autoIncrement)
Deprecated. Builds a new instance of the MultiColumnFIDMapper |
|
MultiColumnFIDMapper(java.lang.String tableSchemaName,
java.lang.String tableName,
java.lang.String[] colNames,
int[] colTypes,
int[] colSizes,
int[] colDecimalDigits,
boolean[] autoIncrement)
Deprecated. Builds a new instance of the MultiColumnFIDMapper |
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. |
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. |
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. |
Methods inherited from class org.geotools.data.jdbc.fidmapper.AbstractFIDMapper |
---|
getColumnCount, getColumnDecimalDigits, getColumnDecimalDigits, getColumnName, getColumnName, getColumnSize, getColumnSize, getColumnType, getColumnType, getTableName, getTableSchemaName, hasAutoIncrementColumns, initSupportStructures, isAutoIncrement, isAutoIncrement, isVolatile, returnFIDColumnsAsAttributes, setInfo, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MultiColumnFIDMapper(java.lang.String tableSchemaName, java.lang.String tableName, java.lang.String[] colNames, int[] colTypes, int[] colSizes, int[] colDecimalDigits, boolean[] autoIncrement)
tableSchemaName
- tableName
- colNames
- - column namescolTypes
- - column types, see Types
colSizes
- - column sizescolDecimalDigits
- - column decimalsautoIncrement
- - flags for auto-increment tests
java.lang.IllegalArgumentException
public MultiColumnFIDMapper(java.lang.String[] colNames, int[] colTypes, int[] colSizes, int[] colDecimalDigits, boolean[] autoIncrement)
colNames
- - column namescolTypes
- - column types, see Types
colSizes
- - column sizescolDecimalDigits
- - column decimalsautoIncrement
- - flags for auto-increment tests
java.lang.IllegalArgumentException
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 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 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 splitting fid by the same separator than
getPKAttributes(String)
results in the same number of strings than the
number of columns this FIDMapper uses to compose a fidFIDMapper.isValid(String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |