org.eclipse.net4j.spi.db
Class DBSchema
java.lang.Object
org.eclipse.net4j.internal.db.ddl.DBSchemaElement
org.eclipse.net4j.spi.db.DBSchema
- All Implemented Interfaces:
- IDBSchema, IDBSchemaElement
- public class DBSchema
- extends org.eclipse.net4j.internal.db.ddl.DBSchemaElement
- implements IDBSchema
A useful base class for implementing custom DB schemas
.
Methods inherited from class org.eclipse.net4j.internal.db.ddl.DBSchemaElement |
getProperties, toString |
DBSchema
public DBSchema(String name)
getFullName
public String getFullName()
- Specified by:
getFullName
in interface IDBSchemaElement
getSchema
public IDBSchema getSchema()
- Specified by:
getSchema
in interface IDBSchemaElement
getName
public String getName()
- Specified by:
getName
in interface IDBSchemaElement
addTable
public IDBTable addTable(String name)
throws DBException
- Specified by:
addTable
in interface IDBSchema
- Throws:
DBException
- Since:
- 2.0
removeTable
public IDBTable removeTable(String name)
- Specified by:
removeTable
in interface IDBSchema
- Since:
- 4.0
getTable
public IDBTable getTable(String name)
- Specified by:
getTable
in interface IDBSchema
- Since:
- 2.0
getTables
public IDBTable[] getTables()
- Specified by:
getTables
in interface IDBSchema
- Since:
- 2.0
isLocked
public boolean isLocked()
lock
public boolean lock()
create
public Set<IDBTable> create(IDBAdapter dbAdapter,
Connection connection)
throws DBException
- Specified by:
create
in interface IDBSchema
- Throws:
DBException
create
public Set<IDBTable> create(IDBAdapter dbAdapter,
DataSource dataSource)
throws DBException
- Specified by:
create
in interface IDBSchema
- Throws:
DBException
create
public Set<IDBTable> create(IDBAdapter dbAdapter,
IDBConnectionProvider connectionProvider)
throws DBException
- Specified by:
create
in interface IDBSchema
- Throws:
DBException
drop
public void drop(IDBAdapter dbAdapter,
Connection connection)
throws DBException
- Specified by:
drop
in interface IDBSchema
- Throws:
DBException
drop
public void drop(IDBAdapter dbAdapter,
DataSource dataSource)
throws DBException
- Specified by:
drop
in interface IDBSchema
- Throws:
DBException
drop
public void drop(IDBAdapter dbAdapter,
IDBConnectionProvider connectionProvider)
throws DBException
- Specified by:
drop
in interface IDBSchema
- Throws:
DBException
export
public void export(Connection connection,
PrintStream out)
throws DBException
- Specified by:
export
in interface IDBSchema
- Throws:
DBException
export
public void export(DataSource dataSource,
PrintStream out)
throws DBException
- Specified by:
export
in interface IDBSchema
- Throws:
DBException
export
public void export(IDBConnectionProvider connectionProvider,
PrintStream out)
throws DBException
- Specified by:
export
in interface IDBSchema
- Throws:
DBException
assertUnlocked
public void assertUnlocked()
throws DBException
- Throws:
DBException
Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.