|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectAbstractFIDMapper
BasicFIDMapper
public class BasicFIDMapper
Basic FIDMapper implementation that maps the FID of a Feature to a VARCHAR column
modules/library/jdbc (gt-jdbc.jar)
Field Summary |
---|
Fields inherited from class AbstractFIDMapper |
---|
autoIncrement, colDecimalDigits, colNames, colSizes, colTypes, returnFIDColumnsAsAttributes, tableName, tableSchemaName |
Constructor Summary | |
---|---|
BasicFIDMapper(String fieldName,
int fieldSize)
Deprecated. Create a new BasicFIDMapper |
|
BasicFIDMapper(String fieldName,
int fieldSize,
boolean returnFIDColumnsAsAttributes)
Deprecated. Create a new BasicFIDMapper |
|
BasicFIDMapper(String tableSchemaName,
String tableName,
String fieldName,
int fieldSize,
boolean returnFIDColumnsAsAttributes)
Deprecated. Create a new BasicFIDMapper |
Method Summary | |
---|---|
String |
createID(Connection conn,
SimpleFeature feature,
Statement statement)
Deprecated. This kind of FIDMapper does not generate keys, they must be alreadyT present in the primary key. |
boolean |
equals(Object object)
Deprecated. |
String |
getID(Object[] attributes)
Deprecated. Returns the FID given the values of the prymary key attributes |
Object[] |
getPKAttributes(String FID)
Deprecated. Creates the value for the PK attributes given the feature. |
boolean |
isValid(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 Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BasicFIDMapper(String fieldName, int fieldSize)
fieldName
- fieldSize
- public BasicFIDMapper(String tableSchemaName, String tableName, String fieldName, int fieldSize, boolean returnFIDColumnsAsAttributes)
tableSchemaName
- tableName
- fieldName
- fieldSize
- returnFIDColumnsAsAttributes
- public BasicFIDMapper(String fieldName, int fieldSize, boolean returnFIDColumnsAsAttributes)
fieldName
- fieldSize
- returnFIDColumnsAsAttributes
- Method Detail |
---|
public String getID(Object[] attributes)
FIDMapper
attributes
- DOCUMENT ME!FIDMapper.getID(java.lang.Object[])
public Object[] getPKAttributes(String FID)
FIDMapper
FID
- The feature ID is going to be parsedFIDMapper.getPKAttributes(java.lang.String)
public boolean equals(Object object)
equals
in class Object
Object.equals(java.lang.Object)
public String createID(Connection conn, SimpleFeature feature, Statement statement) throws IOException
conn
- - the database connectionfeature
- - the feature that needs the new FIDstatement
- - the statement used to insert the feature into the
database
IOException
org.geotools.data.fidmapper.FIDMapper#createID(Connection, Feature,
Statement)
public boolean isValid(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
, this mapper is used for the most trivial things and often the fids does
not match the "fid-createID(Connection, SimpleFeature, Statement)
methodFIDMapper.isValid(String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |