org.geotools.data.jdbc.fidmapper
Class AbstractFIDMapper

java.lang.Object
  extended by org.geotools.data.jdbc.fidmapper.AbstractFIDMapper
All Implemented Interfaces:
java.io.Serializable, FIDMapper
Direct Known Subclasses:
AutoIncrementFIDMapper, BasicFIDMapper, MaxIncFIDMapper, MultiColumnFIDMapper, NullFIDMapper, OIDFidMapper, TypedFIDMapper, UUIDFIDMapper

Deprecated. scheduled for removal in 2.7, use classes in org.geotools.jdbc

public abstract class AbstractFIDMapper
extends java.lang.Object
implements FIDMapper

Abstract implementation providing common methods that usually are coded the same way in all fid mappers.

Author:
wolf
See Also:
Serialized Form

Field Summary
protected  boolean[] autoIncrement
          Deprecated.  
protected  int[] colDecimalDigits
          Deprecated.  
protected  java.lang.String[] colNames
          Deprecated.  
protected  int[] colSizes
          Deprecated.  
protected  int[] colTypes
          Deprecated.  
protected  boolean returnFIDColumnsAsAttributes
          Deprecated. Set if table FID columns are to be returned as business attributes.
protected  java.lang.String tableName
          Deprecated.  
protected  java.lang.String tableSchemaName
          Deprecated.  
 
Constructor Summary
AbstractFIDMapper()
          Deprecated. Default constructor for AbstractFIDMapper
AbstractFIDMapper(java.lang.String tableSchemaName, java.lang.String tableName)
          Deprecated. Set common values for all FID mappers.
 
Method Summary
 int getColumnCount()
          Deprecated. Returns the number of columns in the primary keys handled by this mapper
protected  int getColumnDecimalDigits()
          Deprecated.  
 int getColumnDecimalDigits(int colIndex)
          Deprecated. Provides the number of decimal digits for this column.
protected  java.lang.String getColumnName()
          Deprecated.  
 java.lang.String getColumnName(int colIndex)
          Deprecated. Returns the name of the specified column in the primary key
protected  int getColumnSize()
          Deprecated.  
 int getColumnSize(int colIndex)
          Deprecated. Returns the size of a primary key column as it would be provided by the database metadata.
protected  int getColumnType()
          Deprecated.  
 int getColumnType(int colIndex)
          Deprecated. Returns the column type by using a constant available in the java.sql.Types interface
 java.lang.String getTableName()
          Deprecated.  
 java.lang.String getTableSchemaName()
          Deprecated.  
 boolean hasAutoIncrementColumns()
          Deprecated. Returns true if at least one column is of auto-increment type
 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.
protected  boolean isAutoIncrement()
          Deprecated.  
 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 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.
protected  void setInfo(java.lang.String colName, int colType, int colSize, int colDecimalDigits, boolean autoIncrement)
          Deprecated.  
 java.lang.String toString()
          Deprecated. Create a nice string representation of a FID Mapper
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.geotools.data.jdbc.fidmapper.FIDMapper
createID, getID, getPKAttributes, isValid
 

Field Detail

autoIncrement

protected boolean[] autoIncrement
Deprecated. 

colDecimalDigits

protected int[] colDecimalDigits
Deprecated. 

colNames

protected java.lang.String[] colNames
Deprecated. 

colSizes

protected int[] colSizes
Deprecated. 

colTypes

protected int[] colTypes
Deprecated. 

tableName

protected java.lang.String tableName
Deprecated. 

tableSchemaName

protected java.lang.String tableSchemaName
Deprecated. 

returnFIDColumnsAsAttributes

protected boolean returnFIDColumnsAsAttributes
Deprecated. 
Set if table FID columns are to be returned as business attributes.

Constructor Detail

AbstractFIDMapper

public AbstractFIDMapper()
Deprecated. 
Default constructor for AbstractFIDMapper


AbstractFIDMapper

public AbstractFIDMapper(java.lang.String tableSchemaName,
                         java.lang.String tableName)
Deprecated. 
Set common values for all FID mappers.

Parameters:
tableSchemaName -
tableName -
Method Detail

getColumnCount

public int getColumnCount()
Deprecated. 
Description copied from interface: FIDMapper
Returns the number of columns in the primary keys handled by this mapper

Specified by:
getColumnCount in interface FIDMapper
See Also:
FIDMapper.getColumnCount()

getColumnDecimalDigits

protected int getColumnDecimalDigits()
Deprecated. 
See Also:
FIDMapper.getColumnCount()

getColumnDecimalDigits

public int getColumnDecimalDigits(int colIndex)
Deprecated. 
Description copied from interface: FIDMapper
Provides the number of decimal digits for this column. This is relevant in particular when the column is a scaled integer such as a NUMBER column

Specified by:
getColumnDecimalDigits in interface FIDMapper
See Also:
FIDMapper.getColumnDecimalDigits(int)

getColumnName

protected java.lang.String getColumnName()
Deprecated. 

getColumnName

public java.lang.String getColumnName(int colIndex)
Deprecated. 
Description copied from interface: FIDMapper
Returns the name of the specified column in the primary key

Specified by:
getColumnName in interface FIDMapper
See Also:
FIDMapper.getColumnName(int)

getColumnSize

protected int getColumnSize()
Deprecated. 

getColumnSize

public int getColumnSize(int colIndex)
Deprecated. 
Description copied from interface: FIDMapper
Returns the size of a primary key column as it would be provided by the database metadata. Some fields requires a size specification, such as VARCHAR or NUMBER, whilst other don't have or don't need it (for example, an INTEGER or a TEXT field).

Specified by:
getColumnSize in interface FIDMapper
See Also:
FIDMapper.getColumnSize(int)

getColumnType

protected int getColumnType()
Deprecated. 

getColumnType

public int getColumnType(int colIndex)
Deprecated. 
Description copied from interface: FIDMapper
Returns the column type by using a constant available in the java.sql.Types interface

Specified by:
getColumnType in interface FIDMapper
See Also:
FIDMapper.getColumnType(int)

hasAutoIncrementColumns

public boolean hasAutoIncrementColumns()
Deprecated. 
Description copied from interface: FIDMapper
Returns true if at least one column is of auto-increment type

Specified by:
hasAutoIncrementColumns in interface FIDMapper
See Also:
FIDMapper.hasAutoIncrementColumns()

initSupportStructures

public void initSupportStructures()
Deprecated. 
Description copied from interface: FIDMapper
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.

Specified by:
initSupportStructures in interface FIDMapper
See Also:
FIDMapper.initSupportStructures()

isAutoIncrement

protected boolean isAutoIncrement()
Deprecated. 

isAutoIncrement

public boolean isAutoIncrement(int colIndex)
Deprecated. 
Description copied from interface: FIDMapper
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

Specified by:
isAutoIncrement in interface FIDMapper
See Also:
FIDMapper.isAutoIncrement(int)

isVolatile

public boolean isVolatile()
Deprecated. 
Convenience since most FID mappers should be persistent, override on the specific ones that aren't.

Specified by:
isVolatile in interface FIDMapper
See Also:
FIDMapper.isVolatile()

returnFIDColumnsAsAttributes

public boolean returnFIDColumnsAsAttributes()
Deprecated. 
Description copied from interface: FIDMapper
If true the primary key columns will be returned as attributes. This is fundamental for primary key with businnes meaning.

Specified by:
returnFIDColumnsAsAttributes in interface FIDMapper
See Also:
FIDMapper.returnFIDColumnsAsAttributes()

setInfo

protected void setInfo(java.lang.String colName,
                       int colType,
                       int colSize,
                       int colDecimalDigits,
                       boolean autoIncrement)
Deprecated. 

toString

public java.lang.String toString()
Deprecated. 
Create a nice string representation of a FID Mapper

Overrides:
toString in class java.lang.Object
Returns:
the String representation

getTableName

public java.lang.String getTableName()
Deprecated. 

getTableSchemaName

public java.lang.String getTableSchemaName()
Deprecated. 


Copyright © 1996-2010 Geotools. All Rights Reserved.