Java Doc for dbfFile.java in  » Database-DBMS » TinySQL » com » sqlmagic » tinysql » 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 » Database DBMS » TinySQL » com.sqlmagic.tinysql 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sqlmagic.tinysql.tinySQL
      com.sqlmagic.tinysql.dbfFile

dbfFile
public class dbfFile extends tinySQL (Code)
dBase read/write access

author:
   Brian Jepson
author:
   Marcel Ruff Added write access to dBase and JDK 2 support
author:
   Thomas Morgner Changed ColumnName to 11 bytes and strip name
author:
   after first occurence of 0x00.
author:
   Types are now handled as java.sql.Types, not as character flag


Field Summary
public static  StringdataDir
    
public static  booleandebug
    

Constructor Summary
public  dbfFile()
    
public  dbfFile(String d)
    

Method Summary
 voidAlterTableAddCol(String tableName, Vector v)
     Creates new Columns in tableName, given a vector of column definition (tsColumn) arrays.
It is necessary to copy the whole file to do this task.
 voidAlterTableDropCol(String tableName, Vector v)
    
 voidAlterTableRenameCol(String tableName, String oldColname, String newColname)
    
 voidCreateTable(String tableName, Vector v)
    
 voidDropTable(String fname)
     The DBF File class provides read-only access to DBF files, so this baby should throw an exception.
public  StringGetRecord(RandomAccessFile ff, DBFHeader dbfHeader, int recordNumber)
    
 tinySQLTablegetTable(String tableName)
     Return a tinySQLTable object, given a table name.
static  tsColumnreadColdef(RandomAccessFile ff, String tableName, int iCol, int locn)
    
 voidsetDataDir(String d)
     Creates a table given the name and a vector of column definition (tsColumn) arrays.
static  StringtypeToLiteral(int type)
    
static  inttypeToSQLType(String type)
    
 voidwriteColdef(RandomAccessFile ff, tsColumn coldef)
    

Field Detail
dataDir
public static String dataDir(Code)



debug
public static boolean debug(Code)




Constructor Detail
dbfFile
public dbfFile()(Code)
Constructs a new dbfFile object



dbfFile
public dbfFile(String d)(Code)
Constructs a new dbfFile object
Parameters:
  d - directory with which to override the default data directory




Method Detail
AlterTableAddCol
void AlterTableAddCol(String tableName, Vector v) throws IOException, tinySQLException(Code)
Creates new Columns in tableName, given a vector of column definition (tsColumn) arrays.
It is necessary to copy the whole file to do this task. ALTER TABLE table [ * ] ADD [ COLUMN ] column type
Parameters:
  tableName - the name of the table
Parameters:
  v - a Vector containing arrays of column definitions.
See Also:   tinySQL.AlterTableAddCol



AlterTableDropCol
void AlterTableDropCol(String tableName, Vector v) throws IOException, tinySQLException(Code)
Deletes Columns from tableName, given a vector of column definition (tsColumn) arrays.
ALTER TABLE table DROP [ COLUMN ] column { RESTRICT | CASCADE }
Parameters:
  tableName - the name of the table
Parameters:
  v - a Vector containing arrays of column definitions.
See Also:   tinySQL.AlterTableDropCol



AlterTableRenameCol
void AlterTableRenameCol(String tableName, String oldColname, String newColname) throws tinySQLException(Code)



CreateTable
void CreateTable(String tableName, Vector v) throws IOException, tinySQLException(Code)



DropTable
void DropTable(String fname) throws tinySQLException(Code)
The DBF File class provides read-only access to DBF files, so this baby should throw an exception.
Parameters:
  fname - table name
See Also:   tinySQL.DropTable



GetRecord
public String GetRecord(RandomAccessFile ff, DBFHeader dbfHeader, int recordNumber) throws tinySQLException(Code)
Retrieve a record (=row)
Parameters:
  dbfHeader - dBase meta info
Parameters:
  recordNumber - starts with 1 the String with the complete recordor null if the record is marked as deleted
See Also:   tinySQLTable.GetCol



getTable
tinySQLTable getTable(String tableName) throws tinySQLException(Code)
Return a tinySQLTable object, given a table name.
Parameters:
  tableName -
See Also:   tinySQL.getTable



readColdef
static tsColumn readColdef(RandomAccessFile ff, String tableName, int iCol, int locn) throws tinySQLException(Code)
Reading a column definition from file

Parameters:
  ff - file handle (correctly positioned)
Parameters:
  iCol - index starts with 1
Parameters:
  locn - offset to the current column struct with column info



setDataDir
void setDataDir(String d)(Code)
Creates a table given the name and a vector of column definition (tsColumn) arrays.
Parameters:
  tableName - the name of the table
Parameters:
  v - a Vector containing arrays of column definitions.
See Also:   tinySQL.CreateTable



typeToLiteral
static String typeToLiteral(int type)(Code)
'C' Char (max 254 bytes) 'N' '-.0123456789' (max 19 bytes) 'L' 'YyNnTtFf?' (1 byte) 'M' 10 digit .DBT block number 'D' 8 digit YYYYMMDD Uses java.sql.Types as key



typeToSQLType
static int typeToSQLType(String type)(Code)
'C' Char (max 254 bytes) 'N' '-.0123456789' (max 19 bytes) 'L' 'YyNnTtFf?' (1 byte) 'M' 10 digit .DBT block number 'D' 8 digit YYYYMMDD



writeColdef
void writeColdef(RandomAccessFile ff, tsColumn coldef) throws tinySQLException(Code)
Writing a column definition to file
NOTE: the file pointer (seek()) must be at the correct position
Parameters:
  ff - file handle (correctly positioned)
Parameters:
  coldef - struct with column info



Fields inherited from com.sqlmagic.tinysql.tinySQL
boolean debuggroupBreakkeepRecord(Code)(Java Doc)
boolean exDebugperformDebug(Code)(Java Doc)
Hashtable groupFunctions(Code)(Java Doc)
static tinySQLTable insertTable(Code)(Java Doc)
String newLine(Code)(Java Doc)
tinySQLWhere wc(Code)(Java Doc)

Methods inherited from com.sqlmagic.tinysql.tinySQL
abstract void AlterTableAddCol(String tableName, Vector v) throws IOException, tinySQLException(Code)(Java Doc)
abstract void AlterTableDropCol(String tableName, Vector v) throws IOException, tinySQLException(Code)(Java Doc)
abstract void AlterTableRenameCol(String tableName, String oldColumnName, String newColumnName) throws tinySQLException(Code)(Java Doc)
abstract void CreateTable(String tableName, Vector v) throws IOException, tinySQLException(Code)(Java Doc)
abstract void DropTable(String tableName) throws tinySQLException(Code)(Java Doc)
protected tsResultSet SelectStatement(Hashtable t, Vector c, tinySQLWhere w, String ot, boolean distinct, Object stmt) throws tinySQLException(Code)(Java Doc)
protected void contSelectStatement(tsResultSet jrs) throws tinySQLException(Code)(Java Doc)
abstract tinySQLTable getTable(String tableName) throws tinySQLException(Code)(Java Doc)
protected tsResultSet sql(Object s) throws tinySQLException(Code)(Java Doc)
public tsResultSet sqlexec() throws tinySQLException(Code)(Java Doc)
public tsResultSet sqlexec(tinySQLStatement s) throws tinySQLException(Code)(Java Doc)
public tsResultSet sqlexec(tinySQLPreparedStatement s) throws tinySQLException(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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