Java Doc for FIDMapper.java in  » GIS » GeoTools-2.4.1 » org » geotools » data » jdbc » fidmapper » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » GIS » GeoTools 2.4.1 » org.geotools.data.jdbc.fidmapper 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.geotools.data.jdbc.fidmapper.FIDMapper

All known Subclasses:   org.geotools.data.postgis.fidmapper.PostGISAutoIncrementFIDMapper,  org.geotools.data.jdbc.fidmapper.AbstractFIDMapper,
FIDMapper
public interface FIDMapper extends Serializable(Code)

The FIDMapper interface manages the mapping of feature id to the identifiers provided in a database.

Basically a FIDMapper must:

  • generate the FID (a String) given the set of values that compose the primary key in the database
  • turn the FID into the primary key values, or generate them should the FID be null
  • provide notice wheter the identifier values should be included as attributes in the feature or not (this is necessary when reverse engineering the feature type from the database metadata)
  • describe the primary key columns, if any (this is necessary when creating the table that describes the feature type in a table)

Concrete instances of this class should provide support for the most common primary key mapping and generation strategis, such as pk with business meaning, serials, sequences, and so on

Classes that implement this interface should ovveride equals to provide a state based comparison.


author:
   Dani Daniele Franzoni
author:
   aaime Andrea Aime




Method Summary
public  StringcreateID(Connection conn, Feature feature, Statement statement)
     Creates a new ID for a feature.
public  intgetColumnCount()
    
public  intgetColumnDecimalDigits(int colIndex)
     Provides the number of decimal digits for this column.
public  StringgetColumnName(int colIndex)
    
public  intgetColumnSize(int colIndex)
     Returns the size of a primary key column as it would be provided by the database metadata.
public  intgetColumnType(int colIndex)
    
public  StringgetID(Object[] attributes)
    
public  Object[]getPKAttributes(String FID)
     Creates the value for the PK attributes given the feature.
public  booleanhasAutoIncrementColumns()
    
public  voidinitSupportStructures()
     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.
public  booleanisAutoIncrement(int colIndex)
    
public  booleanisVolatile()
     Returns true it the FID generated by this mapper are volatile, that is, if asking twice for the same Feature will not provide the same FID.
public  booleanreturnFIDColumnsAsAttributes()
     If true the primary key columns will be returned as attributes.



Method Detail
createID
public String createID(Connection conn, Feature feature, Statement statement) throws IOException(Code)
Creates a new ID for a feature.
This is done either by querying the database (for auto-increment like types, for example sequences) or by inspecting the Feature (for example, for primary keys with business meaning that whose attributes are included in the Feature ones).
Parameters:
  conn - - the database connection
Parameters:
  feature - - the feature that needs the new FID
Parameters:
  statement - - the statement used to insert the feature into thedatabase
throws:
  IOException -



getColumnCount
public int getColumnCount()(Code)
Returns the number of columns in the primary keys handled by this mapper



getColumnDecimalDigits
public int getColumnDecimalDigits(int colIndex)(Code)
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
Parameters:
  colIndex -



getColumnName
public String getColumnName(int colIndex)(Code)
Returns the name of the specified column in the primary key
Parameters:
  colIndex -



getColumnSize
public int getColumnSize(int colIndex)(Code)
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).
Parameters:
  colIndex -



getColumnType
public int getColumnType(int colIndex)(Code)
Returns the column type by using a constant available in the java.sql.Types interface
Parameters:
  colIndex -



getID
public String getID(Object[] attributes)(Code)
Returns the FID given the values of the prymary key attributes
Parameters:
  attributes - DOCUMENT ME!



getPKAttributes
public Object[] getPKAttributes(String FID) throws IOException(Code)
Creates the value for the PK attributes given the feature. If the FID is null, will throw an IOException if not possible. If null is returned, no primary key value needs to be specified, which is what we want for auto-increment fields.
Parameters:
  FID - The feature ID is going to be parsed
throws:
  IOException -



hasAutoIncrementColumns
public boolean hasAutoIncrementColumns()(Code)
Returns true if at least one column is of auto-increment type



initSupportStructures
public void initSupportStructures()(Code)
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.



isAutoIncrement
public boolean isAutoIncrement(int colIndex)(Code)
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
Parameters:
  colIndex -



isVolatile
public boolean isVolatile()(Code)
Returns true it the FID generated by this mapper are volatile, that is, if asking twice for the same Feature will not provide the same FID.

This is usually true for mappers that try to generate a FID for tables without primary keys.

When this method returns true, it's up to the datastore to decide what to do, but a sane policy may be to prevent Feature writing




returnFIDColumnsAsAttributes
public boolean returnFIDColumnsAsAttributes()(Code)
If true the primary key columns will be returned as attributes. This is fundamental for primary key with businnes meaning.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.