org.vizzini.database
Class DatabaseFactory

java.lang.Object
  extended by org.vizzini.database.DatabaseFactory

public class DatabaseFactory
extends Object

Provides a factory to create database implementations.

Since:
v0.3
Version:
v0.3
Author:
Jeffrey M. Thompson

Constructor Summary
DatabaseFactory()
           
 
Method Summary
static IAssociation createAssociation(IDatabase database, JoinData joinData, boolean forward)
          Create a association.
static IDatabase createDatabase(Document document, boolean isFileBased)
          Create a database.
static IDatabase createDatabase(File file)
          Create a database.
static IDatabase createDatabase(File file, boolean isFileBased)
          Create a database.
static IDatabase createDatabase(InputStream inputStream)
          Create a database.
static IDatabase createDatabase(InputStream inputStream, boolean isFileBased)
          Create a database.
static IRecord createRecord(IDatabase database, ITableData tableData)
          Create a record.
static IRecord createRecord(IDatabase database, String tableName)
          Create a record.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabaseFactory

public DatabaseFactory()
Method Detail

createAssociation

public static IAssociation createAssociation(IDatabase database,
                                             JoinData joinData,
                                             boolean forward)
Create a association.

Parameters:
database - The database.
joinData - The join data.
forward - Flag indicating if this is forward along the join.
Since:
v0.3

createDatabase

public static IDatabase createDatabase(File file)
                                throws ParserConfigurationException,
                                       SAXException,
                                       IOException,
                                       ClassNotFoundException,
                                       SQLException
Create a database.

Throws:
ParserConfigurationException
SAXException
IOException
ClassNotFoundException
SQLException
Since:
v0.3

createDatabase

public static IDatabase createDatabase(InputStream inputStream)
                                throws ParserConfigurationException,
                                       SAXException,
                                       IOException,
                                       ClassNotFoundException,
                                       SQLException
Create a database.

Throws:
ParserConfigurationException
SAXException
IOException
ClassNotFoundException
SQLException
Since:
v0.3

createDatabase

public static IDatabase createDatabase(Document document,
                                       boolean isFileBased)
                                throws ClassNotFoundException,
                                       SQLException
Create a database.

Throws:
ClassNotFoundException
SQLException
Since:
v0.3

createDatabase

public static IDatabase createDatabase(File file,
                                       boolean isFileBased)
                                throws ParserConfigurationException,
                                       SAXException,
                                       IOException,
                                       ClassNotFoundException,
                                       SQLException
Create a database.

Throws:
ParserConfigurationException
SAXException
IOException
ClassNotFoundException
SQLException
Since:
v0.3

createDatabase

public static IDatabase createDatabase(InputStream inputStream,
                                       boolean isFileBased)
                                throws ParserConfigurationException,
                                       SAXException,
                                       IOException,
                                       ClassNotFoundException,
                                       SQLException
Create a database.

Throws:
ParserConfigurationException
SAXException
IOException
ClassNotFoundException
SQLException
Since:
v0.3

createRecord

public static IRecord createRecord(IDatabase database,
                                   String tableName)
Create a record.

Parameters:
database - The database.
tableName - The table name.
Since:
v0.3

createRecord

public static IRecord createRecord(IDatabase database,
                                   ITableData tableData)
Create a record.

Parameters:
database - The database.
tableData - The table data.
Since:
v0.3


Copyright 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02