com.mizar.persistence.jdbc.convert
Class JdbcDbaseWriter

java.lang.Object
  extended by com.mizar.persistence.jdbc.convert.JdbcDbaseWriter

public class JdbcDbaseWriter
extends java.lang.Object


Field Summary
static int DBF_MAX_CHAR_WIDTH
           
static int DBF_MAX_COLUMN_NAME
           
static char DBF_TYPE_CHAR
           
static char DBF_TYPE_DATE
           
static char DBF_TYPE_LOGICAL
           
static char DBF_TYPE_NUMERIC
           
static char DBFDescriptionLength
           
 
Constructor Summary
JdbcDbaseWriter()
           
JdbcDbaseWriter(java.sql.ResultSet resultSet)
           
JdbcDbaseWriter(java.sql.ResultSet resultSet, java.lang.String baseFileName)
           
 
Method Summary
 void close()
           
 int createDbaseFile()
           
 java.lang.String getBaseFileName()
           
 org.geotools.data.shapefile.dbf.DbaseFileWriter getDbaseFileWriter()
           
 java.sql.ResultSet getResultSet()
           
 boolean isOldMode()
           
 void setBaseFileName(java.lang.String baseFileName)
           
 void setDbaseFileWriter(org.geotools.data.shapefile.dbf.DbaseFileWriter dbaseFileWriter)
           
 void setOldMode(boolean oldMode)
           
 void setResultSet(java.sql.ResultSet resultSet)
           
 void writeHeader()
          This method leaves resultsSet rewound.
 void writeHeader(int numberOfRows)
           
 boolean writeRow()
           
 void writeRows()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DBFDescriptionLength

public static final char DBFDescriptionLength
See Also:
Constant Field Values

DBF_TYPE_CHAR

public static final char DBF_TYPE_CHAR
See Also:
Constant Field Values

DBF_TYPE_NUMERIC

public static final char DBF_TYPE_NUMERIC
See Also:
Constant Field Values

DBF_TYPE_DATE

public static final char DBF_TYPE_DATE
See Also:
Constant Field Values

DBF_TYPE_LOGICAL

public static final char DBF_TYPE_LOGICAL
See Also:
Constant Field Values

DBF_MAX_CHAR_WIDTH

public static final int DBF_MAX_CHAR_WIDTH
See Also:
Constant Field Values

DBF_MAX_COLUMN_NAME

public static final int DBF_MAX_COLUMN_NAME
See Also:
Constant Field Values
Constructor Detail

JdbcDbaseWriter

public JdbcDbaseWriter()

JdbcDbaseWriter

public JdbcDbaseWriter(java.sql.ResultSet resultSet)

JdbcDbaseWriter

public JdbcDbaseWriter(java.sql.ResultSet resultSet,
                       java.lang.String baseFileName)
Method Detail

createDbaseFile

public int createDbaseFile()
                    throws java.sql.SQLException,
                           java.io.IOException,
                           org.geotools.data.shapefile.dbf.DbaseFileException
Throws:
java.sql.SQLException
java.io.IOException
org.geotools.data.shapefile.dbf.DbaseFileException

writeHeader

public void writeHeader()
                 throws java.sql.SQLException,
                        java.io.IOException
This method leaves resultsSet rewound.

Throws:
java.sql.SQLException
java.io.IOException

writeHeader

public void writeHeader(int numberOfRows)
                 throws java.sql.SQLException,
                        java.io.IOException
Parameters:
numberOfRows - the number of rows that will be written to the DBF file.
Throws:
java.sql.SQLException
java.io.IOException

writeRows

public void writeRows()
               throws java.sql.SQLException,
                      java.io.IOException,
                      org.geotools.data.shapefile.dbf.DbaseFileException
Throws:
java.sql.SQLException
java.io.IOException
org.geotools.data.shapefile.dbf.DbaseFileException

writeRow

public boolean writeRow()
                 throws java.sql.SQLException,
                        java.io.IOException,
                        org.geotools.data.shapefile.dbf.DbaseFileException
Throws:
java.sql.SQLException
java.io.IOException
org.geotools.data.shapefile.dbf.DbaseFileException

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

setResultSet

public void setResultSet(java.sql.ResultSet resultSet)

getResultSet

public java.sql.ResultSet getResultSet()

setBaseFileName

public void setBaseFileName(java.lang.String baseFileName)

getBaseFileName

public java.lang.String getBaseFileName()

setDbaseFileWriter

public void setDbaseFileWriter(org.geotools.data.shapefile.dbf.DbaseFileWriter dbaseFileWriter)

getDbaseFileWriter

public org.geotools.data.shapefile.dbf.DbaseFileWriter getDbaseFileWriter()

setOldMode

public void setOldMode(boolean oldMode)

isOldMode

public boolean isOldMode()