org.eobjects.metamodel
Class AbstractUpdateCallback

java.lang.Object
  extended by org.eobjects.metamodel.AbstractUpdateCallback
All Implemented Interfaces:
TableCreatable, RowDeletable, TableDroppable, RowInsertable, RowUpdateable, UpdateCallback

public abstract class AbstractUpdateCallback
extends Object
implements UpdateCallback

Abstract implementation of the UpdateCallback interface. Implements only the data store agnostic methods.

Author:
Kasper Sørensen

Constructor Summary
AbstractUpdateCallback(DataContext dataContext)
           
 
Method Summary
 TableCreationBuilder createTable(String schemaName, String tableName)
          Initiates the building of a table creation operation.
 RowDeletionBuilder deleteFrom(String tableName)
          Initiates a row deletion builder.
 RowDeletionBuilder deleteFrom(String schemaName, String tableName)
          Initiates a row deletion builder.
 TableDropBuilder dropTable(Schema schema, String tableName)
           
 TableDropBuilder dropTable(String tableName)
           
 TableDropBuilder dropTable(String schemaName, String tableName)
           
 DataContext getDataContext()
          Gets the DataContext on which the update script is being executed.
 RowInsertionBuilder insertInto(String tableName)
          Initiates the building of a row insertion operation.
 RowInsertionBuilder insertInto(String schemaName, String tableName)
          Initiates the building of a row insertion operation.
 boolean isCreateTableSupported()
          Determines whether table creation is supported
 boolean isInsertSupported()
          Determines whether row insertion is supported
 boolean isUpdateSupported()
          Determines whether row update is supported
 RowUpdationBuilder update(String tableName)
          Initiates a row updation builder.
 RowUpdationBuilder update(String schemaName, String tableName)
          Initiates a row updation builder.
 RowUpdationBuilder update(Table table)
          Initiates a row updation builder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eobjects.metamodel.create.TableCreatable
createTable
 
Methods inherited from interface org.eobjects.metamodel.drop.TableDroppable
dropTable, isDropTableSupported
 
Methods inherited from interface org.eobjects.metamodel.insert.RowInsertable
insertInto
 
Methods inherited from interface org.eobjects.metamodel.delete.RowDeletable
deleteFrom, isDeleteSupported
 

Constructor Detail

AbstractUpdateCallback

public AbstractUpdateCallback(DataContext dataContext)
Method Detail

createTable

public TableCreationBuilder createTable(String schemaName,
                                        String tableName)
                                 throws IllegalArgumentException,
                                        IllegalStateException
Description copied from interface: TableCreatable
Initiates the building of a table creation operation.

Specified by:
createTable in interface TableCreatable
Parameters:
schemaName - the name of the schema to create the table in
tableName - the name of the new table
Returns:
a builder object on which the details of the table can be specified and committed.
Throws:
IllegalArgumentException - if the table argument is null or invalid.
IllegalStateException - if the connection to the DataContext is read-only or another access restriction is preventing the operation.

dropTable

public TableDropBuilder dropTable(String schemaName,
                                  String tableName)
                           throws IllegalArgumentException,
                                  IllegalStateException,
                                  UnsupportedOperationException
Specified by:
dropTable in interface TableDroppable
Throws:
IllegalArgumentException
IllegalStateException
UnsupportedOperationException

dropTable

public TableDropBuilder dropTable(Schema schema,
                                  String tableName)
                           throws IllegalArgumentException,
                                  IllegalStateException,
                                  UnsupportedOperationException
Specified by:
dropTable in interface TableDroppable
Throws:
IllegalArgumentException
IllegalStateException
UnsupportedOperationException

insertInto

public final RowInsertionBuilder insertInto(String tableName)
                                     throws IllegalArgumentException,
                                            IllegalStateException
Description copied from interface: RowInsertable
Initiates the building of a row insertion operation.

Specified by:
insertInto in interface RowInsertable
Parameters:
tableName - the name of the table to insert a row into
Returns:
a builder object on which values can be added and the statement can be committed.
Throws:
IllegalArgumentException - if the tableName argument is null or invalid.
IllegalStateException - if the connection to the DataContext is read-only or another access restriction is preventing the operation.

insertInto

public RowInsertionBuilder insertInto(String schemaName,
                                      String tableName)
                               throws IllegalArgumentException,
                                      IllegalStateException,
                                      UnsupportedOperationException
Description copied from interface: RowInsertable
Initiates the building of a row insertion operation.

Specified by:
insertInto in interface RowInsertable
Parameters:
schemaName - the name of the schema
tableName - the name of the table to insert a row into
Returns:
a builder object on which values can be added and the statement can be committed.
Throws:
IllegalArgumentException - if the tableName argument is null or invalid.
IllegalStateException - if the connection to the DataContext is read-only or another access restriction is preventing the operation.
UnsupportedOperationException - in case RowInsertable.isInsertSupported() is false

deleteFrom

public final RowDeletionBuilder deleteFrom(String tableName)
Description copied from interface: RowDeletable
Initiates a row deletion builder.

Specified by:
deleteFrom in interface RowDeletable
Returns:

deleteFrom

public RowDeletionBuilder deleteFrom(String schemaName,
                                     String tableName)
                              throws IllegalArgumentException,
                                     IllegalStateException,
                                     UnsupportedOperationException
Description copied from interface: RowDeletable
Initiates a row deletion builder.

Specified by:
deleteFrom in interface RowDeletable
Returns:
Throws:
IllegalArgumentException
IllegalStateException
UnsupportedOperationException

dropTable

public final TableDropBuilder dropTable(String tableName)
Specified by:
dropTable in interface TableDroppable

update

public final RowUpdationBuilder update(String tableName)
Description copied from interface: RowUpdateable
Initiates a row updation builder.

Specified by:
update in interface RowUpdateable
Returns:

getDataContext

public DataContext getDataContext()
Description copied from interface: UpdateCallback
Gets the DataContext on which the update script is being executed.

Specified by:
getDataContext in interface UpdateCallback
Returns:
the DataContext on which the update script is being executed.

isCreateTableSupported

public boolean isCreateTableSupported()
Description copied from interface: TableCreatable
Determines whether table creation is supported

Specified by:
isCreateTableSupported in interface TableCreatable
Returns:
true if table creation is supported

isInsertSupported

public boolean isInsertSupported()
Description copied from interface: RowInsertable
Determines whether row insertion is supported

Specified by:
isInsertSupported in interface RowInsertable
Returns:
true if row insertion is supported

isUpdateSupported

public boolean isUpdateSupported()
Description copied from interface: RowUpdateable
Determines whether row update is supported

Specified by:
isUpdateSupported in interface RowUpdateable
Returns:
true if row update is supported

update

public RowUpdationBuilder update(String schemaName,
                                 String tableName)
                          throws IllegalArgumentException,
                                 IllegalStateException,
                                 UnsupportedOperationException
Description copied from interface: RowUpdateable
Initiates a row updation builder.

Specified by:
update in interface RowUpdateable
Returns:
Throws:
IllegalArgumentException
IllegalStateException
UnsupportedOperationException

update

public RowUpdationBuilder update(Table table)
                          throws IllegalArgumentException,
                                 IllegalStateException,
                                 UnsupportedOperationException
Description copied from interface: RowUpdateable
Initiates a row updation builder.

Specified by:
update in interface RowUpdateable
Returns:
Throws:
IllegalArgumentException
IllegalStateException
UnsupportedOperationException


Copyright © 2007-2013. All Rights Reserved.