Java Doc for Database.java in  » Database-Client » Jackcess » com » healthmarketscience » jackcess » 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 Client » Jackcess » com.healthmarketscience.jackcess 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.healthmarketscience.jackcess.Database

Database
public class Database implements Iterable<Table>,Closeable,Flushable(Code)
An Access database.
author:
   Tim McCune


Field Summary
final public static  booleanDEFAULT_AUTO_SYNC
     default value for the auto-sync value ( true ).

Constructor Summary
protected  Database(FileChannel channel, boolean autoSync)
     Create a new database by reading it in from a FileChannel.
Parameters:
  channel - File channel of the database.

Method Summary
public  voidclose()
    
public  voidcopyTable(String name, ResultSet source)
    
public  voidcopyTable(String name, ResultSet source, ImportFilter filter)
    
public static  Databasecreate(File mdbFile)
     Create a new Database
Parameters:
  mdbFile - Location to write the new database to.
public static  Databasecreate(File mdbFile, boolean autoSync)
     Create a new Database
Parameters:
  mdbFile - Location to write the new database to.
public  voidcreateTable(String name, List<Column> columns)
    
public  voidflush()
     Flushes any current changes to the database file to disk.
public  TablegetAccessControlEntries()
    
public  JetFormatgetFormat()
    
public  PageChannelgetPageChannel()
    
public  List<Relationship>getRelationships(Table table1, Table table2)
     Finds all the relationships in the database between the given tables.
public  TablegetSystemCatalog()
    
public  TablegetTable(String name)
    
public  Set<String>getTableNames()
    
public  voidimportFile(String name, File f, String delim)
    
public  voidimportFile(String name, File f, String delim, ImportFilter filter)
    
public  voidimportReader(String name, BufferedReader in, String delim)
    
public  voidimportReader(String name, BufferedReader in, String delim, ImportFilter filter)
    
public static  booleanisReservedWord(String s)
    
public  Iterator<Table>iterator()
    
public static  Databaseopen(File mdbFile)
     Open an existing Database.
public static  Databaseopen(File mdbFile, boolean readOnly)
     Open an existing Database.
public static  Databaseopen(File mdbFile, boolean readOnly, boolean autoSync)
     Open an existing Database.
public  StringtoString()
    

Field Detail
DEFAULT_AUTO_SYNC
final public static boolean DEFAULT_AUTO_SYNC(Code)
default value for the auto-sync value ( true ). this is slower, but leaves more chance of a useable database in the face of failures.




Constructor Detail
Database
protected Database(FileChannel channel, boolean autoSync) throws IOException(Code)
Create a new database by reading it in from a FileChannel.
Parameters:
  channel - File channel of the database. This needs to be aFileChannel instead of a ReadableByteChannel because we need torandomly jump around to various points in the file.




Method Detail
close
public void close() throws IOException(Code)
Close the database file



copyTable
public void copyTable(String name, ResultSet source) throws SQLException, IOException(Code)
Copy an existing JDBC ResultSet into a new table in this database
Parameters:
  name - Name of the new table to create
Parameters:
  source - ResultSet to copy from



copyTable
public void copyTable(String name, ResultSet source, ImportFilter filter) throws SQLException, IOException(Code)
Copy an existing JDBC ResultSet into a new table in this database
Parameters:
  name - Name of the new table to create
Parameters:
  source - ResultSet to copy from
Parameters:
  filter - valid import filter



create
public static Database create(File mdbFile) throws IOException(Code)
Create a new Database
Parameters:
  mdbFile - Location to write the new database to. If this filealready exists, it will be overwritten.



create
public static Database create(File mdbFile, boolean autoSync) throws IOException(Code)
Create a new Database
Parameters:
  mdbFile - Location to write the new database to. If this filealready exists, it will be overwritten.
Parameters:
  autoSync - whether or not to enable auto-syncing on write. if true , writes will be immediately flushed to disk.This leaves the database in a (fairly) consistent stateon each write, but can be very inefficient for manyupdates. if false , flushing to disk happens atthe jvm's leisure, which can be much faster, but mayleave the database in an inconsistent state if failuresare encountered during writing.



createTable
public void createTable(String name, List<Column> columns) throws IOException(Code)
Create a new table in this database
Parameters:
  name - Name of the table to create
Parameters:
  columns - List of Columns in the table



flush
public void flush() throws IOException(Code)
Flushes any current changes to the database file to disk.



getAccessControlEntries
public Table getAccessControlEntries()(Code)
The system Access Control Entries table



getFormat
public JetFormat getFormat()(Code)



getPageChannel
public PageChannel getPageChannel()(Code)



getRelationships
public List<Relationship> getRelationships(Table table1, Table table2) throws IOException(Code)
Finds all the relationships in the database between the given tables.



getSystemCatalog
public Table getSystemCatalog()(Code)
The system catalog table



getTable
public Table getTable(String name) throws IOException(Code)

Parameters:
  name - Table name The table, or null if it doesn't exist



getTableNames
public Set<String> getTableNames()(Code)
The names of all of the user tables (String)



importFile
public void importFile(String name, File f, String delim) throws IOException(Code)
Copy a delimited text file into a new table in this database
Parameters:
  name - Name of the new table to create
Parameters:
  f - Source file to import
Parameters:
  delim - Regular expression representing the delimiter string.



importFile
public void importFile(String name, File f, String delim, ImportFilter filter) throws IOException(Code)
Copy a delimited text file into a new table in this database
Parameters:
  name - Name of the new table to create
Parameters:
  f - Source file to import
Parameters:
  delim - Regular expression representing the delimiter string.
Parameters:
  filter - valid import filter



importReader
public void importReader(String name, BufferedReader in, String delim) throws IOException(Code)
Copy a delimited text file into a new table in this database
Parameters:
  name - Name of the new table to create
Parameters:
  in - Source reader to import
Parameters:
  delim - Regular expression representing the delimiter string.



importReader
public void importReader(String name, BufferedReader in, String delim, ImportFilter filter) throws IOException(Code)
Copy a delimited text file into a new table in this database
Parameters:
  name - Name of the new table to create
Parameters:
  in - Source reader to import
Parameters:
  delim - Regular expression representing the delimiter string.
Parameters:
  filter - valid import filter



isReservedWord
public static boolean isReservedWord(String s)(Code)
true if the given string is a reserved word, false otherwise



iterator
public Iterator<Table> iterator()(Code)
an unmodifiable Iterator of the user Tables in this Database.
throws:
  IllegalStateException - if an IOException is thrown by one of theoperations, the actual exception will be contained within
throws:
  ConcurrentModificationException - if a table is added to thedatabase while an Iterator is in use.



open
public static Database open(File mdbFile) throws IOException(Code)
Open an existing Database. If the existing file is not writeable, the file will be opened read-only. Auto-syncing is enabled for the returned Database.
Parameters:
  mdbFile - File containing the database



open
public static Database open(File mdbFile, boolean readOnly) throws IOException(Code)
Open an existing Database. If the existing file is not writeable or the readOnly flag is true, the file will be opened read-only. Auto-syncing is enabled for the returned Database.
Parameters:
  mdbFile - File containing the database
Parameters:
  readOnly - iff true, force opening file in read-onlymode



open
public static Database open(File mdbFile, boolean readOnly, boolean autoSync) throws IOException(Code)
Open an existing Database. If the existing file is not writeable or the readOnly flag is true, the file will be opened read-only.
Parameters:
  mdbFile - File containing the database
Parameters:
  readOnly - iff true, force opening file in read-onlymode
Parameters:
  autoSync - whether or not to enable auto-syncing on write. if true , writes will be immediately flushed to disk.This leaves the database in a (fairly) consistent stateon each write, but can be very inefficient for manyupdates. if false , flushing to disk happens atthe jvm's leisure, which can be much faster, but mayleave the database in an inconsistent state if failuresare encountered during writing.



toString
public String toString()(Code)



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.