|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectAbstractFIDMapper
public abstract class AbstractFIDMapper
Abstract implementation providing common methods that usually are coded the same way in all fid mappers.
modules/library/jdbc (gt2-jdbc.jar) (Maven report) (SVN head)| Field Summary | |
|---|---|
protected boolean[] |
autoIncrement
|
protected int[] |
colDecimalDigits
|
protected String[] |
colNames
|
protected int[] |
colSizes
|
protected int[] |
colTypes
|
protected boolean |
returnFIDColumnsAsAttributes
Set if table FID columns are to be returned as business attributes. |
protected String |
tableName
|
protected String |
tableSchemaName
|
| Constructor Summary | |
|---|---|
AbstractFIDMapper()
Default constructor for AbstractFIDMapper |
|
AbstractFIDMapper(String tableSchemaName,
String tableName)
Set common values for all FID mappers. |
|
| Method Summary | |
|---|---|
int |
getColumnCount()
Returns the number of columns in the primary keys handled by this mapper |
protected int |
getColumnDecimalDigits()
|
int |
getColumnDecimalDigits(int colIndex)
Provides the number of decimal digits for this column. |
protected String |
getColumnName()
|
String |
getColumnName(int colIndex)
Returns the name of the specified column in the primary key |
protected int |
getColumnSize()
|
int |
getColumnSize(int colIndex)
Returns the size of a primary key column as it would be provided by the database metadata. |
protected int |
getColumnType()
|
int |
getColumnType(int colIndex)
Returns the column type by using a constant available in the java.sql.Types interface |
String |
getTableName()
|
String |
getTableSchemaName()
|
boolean |
hasAutoIncrementColumns()
Returns true if at least one column is of auto-increment type |
void |
initSupportStructures()
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. |
protected boolean |
isAutoIncrement()
|
boolean |
isAutoIncrement(int colIndex)
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 |
isVolatile()
Convenience since most FID mappers should be persistent, override on the specific ones that aren't. |
boolean |
returnFIDColumnsAsAttributes()
If true the primary key columns will be returned as attributes. |
protected void |
setInfo(String colName,
int colType,
int colSize,
int colDecimalDigits,
boolean autoIncrement)
|
String |
toString()
Create a nice string representation of a FID Mapper |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface FIDMapper |
|---|
createID, getID, getPKAttributes |
| Field Detail |
|---|
protected boolean[] autoIncrement
protected int[] colDecimalDigits
protected String[] colNames
protected int[] colSizes
protected int[] colTypes
protected String tableName
protected String tableSchemaName
protected boolean returnFIDColumnsAsAttributes
| Constructor Detail |
|---|
public AbstractFIDMapper()
public AbstractFIDMapper(String tableSchemaName,
String tableName)
tableSchemaName - tableName - | Method Detail |
|---|
public int getColumnCount()
FIDMapper
getColumnCount in interface FIDMapperFIDMapper.getColumnCount()protected int getColumnDecimalDigits()
FIDMapper.getColumnCount()public int getColumnDecimalDigits(int colIndex)
FIDMapper
getColumnDecimalDigits in interface FIDMapperFIDMapper.getColumnDecimalDigits(int)protected String getColumnName()
public String getColumnName(int colIndex)
FIDMapper
getColumnName in interface FIDMapperFIDMapper.getColumnName(int)protected int getColumnSize()
public int getColumnSize(int colIndex)
FIDMapper
getColumnSize in interface FIDMapperFIDMapper.getColumnSize(int)protected int getColumnType()
public int getColumnType(int colIndex)
FIDMapper
getColumnType in interface FIDMapperFIDMapper.getColumnType(int)public boolean hasAutoIncrementColumns()
FIDMapper
hasAutoIncrementColumns in interface FIDMapperFIDMapper.hasAutoIncrementColumns()public void initSupportStructures()
FIDMapper
initSupportStructures in interface FIDMapperFIDMapper.initSupportStructures()protected boolean isAutoIncrement()
public boolean isAutoIncrement(int colIndex)
FIDMapper
isAutoIncrement in interface FIDMapperFIDMapper.isAutoIncrement(int)public boolean isVolatile()
isVolatile in interface FIDMapperFIDMapper.isVolatile()public boolean returnFIDColumnsAsAttributes()
FIDMapper
returnFIDColumnsAsAttributes in interface FIDMapperFIDMapper.returnFIDColumnsAsAttributes()
protected void setInfo(String colName,
int colType,
int colSize,
int colDecimalDigits,
boolean autoIncrement)
public String toString()
toString in class Objectpublic String getTableName()
public String getTableSchemaName()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||