2.17.2: 2011-06-17

net.sf.basedb.core.hibernate
Class TableExistsWork

java.lang.Object
  extended by net.sf.basedb.core.hibernate.TableExistsWork
All Implemented Interfaces:
JdbcWork<Boolean>, org.hibernate.jdbc.Work

public class TableExistsWork
extends Object
implements JdbcWork<Boolean>

A work implementation that checks if a given table exists in the database or not.

Version:
2.9
Author:
nicklas
Last modified
$Date: 2008-09-11 22:11:02 +0200 (Thu, 11 Sep 2008) $

Field Summary
private  String catalog
           
private  boolean hasTable
           
private  String schema
           
private  String table
           
 
Constructor Summary
TableExistsWork(String catalog, String schema, String table)
          Create a new work item.
 
Method Summary
 void execute(Connection connection)
          From the Work interface -----------------------
 Boolean getResult()
          Get the result of the work.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

catalog

private final String catalog

schema

private final String schema

table

private final String table

hasTable

private boolean hasTable
Constructor Detail

TableExistsWork

public TableExistsWork(String catalog,
                       String schema,
                       String table)
Create a new work item.

Parameters:
catalog - The catalog the table is located in or null to ignore any catalog information
schema - The schema the table is located in or null to ignore any schema information
table - The table to check
Method Detail

execute

public void execute(Connection connection)
             throws SQLException
From the Work interface -----------------------

Specified by:
execute in interface org.hibernate.jdbc.Work
Throws:
SQLException

getResult

public Boolean getResult()
Description copied from interface: JdbcWork
Get the result of the work.

Specified by:
getResult in interface JdbcWork<Boolean>
Returns:
TRUE if the table exists, FALSE otherwise

2.17.2: 2011-06-17