|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectAbstractFIDMapper
MaxIncFIDMapper
public class MaxIncFIDMapper
A FID mapper that uses a single integer column as the primary key and that
does a SELECT MAX(fixColumn) + 1 to generate new ones. This is
a fragile generation strategy, better use a sequence or a serial to get
reliable results.
modules/library/jdbc (gt2-jdbc.jar) (Maven report) (SVN head)| Field Summary |
|---|
| Fields inherited from class AbstractFIDMapper |
|---|
autoIncrement, colDecimalDigits, colNames, colSizes, colTypes, returnFIDColumnsAsAttributes, tableName, tableSchemaName |
| Constructor Summary | |
|---|---|
MaxIncFIDMapper(String tableName,
String FIDColumn,
int FIDColumnType)
Creates a new MaxIncFIDMapper object. |
|
MaxIncFIDMapper(String tableSchemaName,
String tableName,
String FIDColumn,
int FIDColumnType,
boolean returnFIDColumnsAsAttributes)
Creates a new MaxIncFIDMapper object that will return the FID columns as business attributes. |
|
| Method Summary | |
|---|---|
String |
createID(Connection conn,
Feature feature,
Statement statement)
Creates a new ID for a feature. |
boolean |
equals(Object object)
|
String |
getID(Object[] attributes)
Returns the FID given the values of the prymary key attributes |
Object[] |
getPKAttributes(String FID)
Creates the value for the PK attributes given the feature. |
| Methods inherited from class Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MaxIncFIDMapper(String tableName,
String FIDColumn,
int FIDColumnType)
tableName - the table nameFIDColumn - the name of the FID columnFIDColumnType - The SQL type of the column - must be a numeric type
public MaxIncFIDMapper(String tableSchemaName,
String tableName,
String FIDColumn,
int FIDColumnType,
boolean returnFIDColumnsAsAttributes)
tableSchemaName - the schema of this tabletableName - the table nameFIDColumn - the name of the FID columnFIDColumnType - The SQL type of the column - must be a numeric typereturnFIDColumnsAsAttributes - true to return FID columns as
attributes.| 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 ObjectObject.equals(java.lang.Object)
public String createID(Connection conn,
Feature feature,
Statement statement)
throws IOException
FIDMapper
conn - - the database connectionfeature - - the feature that needs the new FIDstatement - - the statement used to insert the feature into the
database
IOExceptionFIDMapper.createID(java.sql.Connection,
Feature, Statement)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||