org.seasar.tuigwaa.database
インタフェース BasicDatabaseService

既知の実装クラスの一覧:
BasicDatabaseServiceImpl

public interface BasicDatabaseService

作成者:
someda

メソッドの概要
 void addExternalDatabase(String databaseName, String driver, String user, String password, String url)
           
 void backup(String dbName, String schema, String[] tableNames, String targetdir)
          Backup table data into CSV file resided in given target directory.
 Map createEntityMap(String domainName)
           
 void delete(String dbName, String schema, String table)
           
 void deleteExternalDatabase(String databaseName)
           
 boolean existSchema(String schema)
           
 boolean existTable(String domainName, String tableName)
           
 DatabaseInfo getBaseDatabaseInfo()
           
 Connection getConnection(String domainName)
           
 DatabaseInfo getDatabaseInfo(String domainName)
           
 String getDriver(String domainName)
           
 List getExternalDatabaseInfoList()
           
 String[] getExternalDatabaseNames()
           
 String getSchemaName(String domainName)
           
 List getTableNames(String schema)
           
 boolean hasDomain(String databaseName)
           
 void insert(String dbName, String schema, String table, DatafileLoader loader, String[] columns, String[] types)
           
 void insertOnDelete(String dbName, String schema, String table, DatafileLoader loader, String[] columns, String[] types)
           
 void loadExternalDatabase()
           
 void removeExternalDatabaseMapping(String domainName)
           
 void restore(String dbName, String schema, String[] tableNames, String srcdir)
          Restore table data from CSV file resided in source directory.
 void setExternalDatabaseMapping(String domainName, String databaseName, String schemaName)
           
 boolean useBaseDatabase(String domainName)
           
 

メソッドの詳細

loadExternalDatabase

public void loadExternalDatabase()

addExternalDatabase

public void addExternalDatabase(String databaseName,
                                String driver,
                                String user,
                                String password,
                                String url)

deleteExternalDatabase

public void deleteExternalDatabase(String databaseName)

setExternalDatabaseMapping

public void setExternalDatabaseMapping(String domainName,
                                       String databaseName,
                                       String schemaName)
                                throws TgwServiceException
例外:
TgwServiceException

removeExternalDatabaseMapping

public void removeExternalDatabaseMapping(String domainName)

getDriver

public String getDriver(String domainName)

hasDomain

public boolean hasDomain(String databaseName)

getConnection

public Connection getConnection(String domainName)
                         throws SQLException
例外:
SQLException

getBaseDatabaseInfo

public DatabaseInfo getBaseDatabaseInfo()

getDatabaseInfo

public DatabaseInfo getDatabaseInfo(String domainName)
                             throws SQLException
例外:
SQLException

existTable

public boolean existTable(String domainName,
                          String tableName)

existSchema

public boolean existSchema(String schema)

getExternalDatabaseInfoList

public List getExternalDatabaseInfoList()

getExternalDatabaseNames

public String[] getExternalDatabaseNames()

getTableNames

public List getTableNames(String schema)

backup

public void backup(String dbName,
                   String schema,
                   String[] tableNames,
                   String targetdir)
            throws TgwServiceException
Backup table data into CSV file resided in given target directory. if tableNames not null, only the contents of given tableNames are saved, otherwise, full backup will be taken. This method skip byte[] column data. The periodical backup using the utility of the database itself is strongly recommended.

例外:
TgwServiceException

restore

public void restore(String dbName,
                    String schema,
                    String[] tableNames,
                    String srcdir)
             throws TgwServiceException
Restore table data from CSV file resided in source directory.

例外:
TgwServiceException

insertOnDelete

public void insertOnDelete(String dbName,
                           String schema,
                           String table,
                           DatafileLoader loader,
                           String[] columns,
                           String[] types)
                    throws TgwServiceException
例外:
TgwServiceException

insert

public void insert(String dbName,
                   String schema,
                   String table,
                   DatafileLoader loader,
                   String[] columns,
                   String[] types)
            throws TgwServiceException
例外:
TgwServiceException

delete

public void delete(String dbName,
                   String schema,
                   String table)
            throws TgwServiceException
例外:
TgwServiceException

getSchemaName

public String getSchemaName(String domainName)

createEntityMap

public Map createEntityMap(String domainName)
                    throws SQLException
例外:
SQLException

useBaseDatabase

public boolean useBaseDatabase(String domainName)


Copyright © 2005-2006 The Seasar Foundation and the others.. All Rights Reserved.