net.sf.farrago.ddl
Class DdlImportForeignSchemaStmt

java.lang.Object
  extended by net.sf.farrago.ddl.DdlStmt
      extended by net.sf.farrago.ddl.DdlImportForeignSchemaStmt
All Implemented Interfaces:
FarragoSessionDdlStmt

public class DdlImportForeignSchemaStmt
extends DdlStmt

DdlImportForeignSchemaStmt represents a DDL IMPORT FOREIGN SCHEMA statement.

Version:
$Id: //open/dev/farrago/src/net/sf/farrago/ddl/DdlImportForeignSchemaStmt.java#14 $
Author:
John V. Sichi

Nested Class Summary
private  class DdlImportForeignSchemaStmt.ImportSink
          ImportSink implements FarragoMedMetadataSink by creating catalog descriptors for imported foreign tables and columns.
 
Field Summary
private  boolean exclude
           
private  FemDataServer femServer
           
private  SqlIdentifier foreignSchemaName
           
private  FemLocalSchema localSchema
           
private  String pattern
           
private  List<SqlIdentifier> roster
           
 
Constructor Summary
DdlImportForeignSchemaStmt(FemLocalSchema localSchema, FemDataServer femServer, SqlIdentifier foreignSchemaName, boolean exclude, List<SqlIdentifier> roster, String pattern)
          Creates a new import statement.
 
Method Summary
private  Set<String> convertRoster()
           
 void preValidate(FarragoSessionDdlValidator ddlValidator)
          Called before generic validation.
 void visit(DdlVisitor visitor)
          Invokes a visitor on this statement.
 
Methods inherited from class net.sf.farrago.ddl.DdlStmt
getModelElement, isDropRestricted, postCommit, postExecute, preExecute, requiresCommit, runsAsDml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

localSchema

private final FemLocalSchema localSchema

femServer

private final FemDataServer femServer

foreignSchemaName

private final SqlIdentifier foreignSchemaName

exclude

private final boolean exclude

roster

private final List<SqlIdentifier> roster

pattern

private final String pattern
Constructor Detail

DdlImportForeignSchemaStmt

public DdlImportForeignSchemaStmt(FemLocalSchema localSchema,
                                  FemDataServer femServer,
                                  SqlIdentifier foreignSchemaName,
                                  boolean exclude,
                                  List<SqlIdentifier> roster,
                                  String pattern)
Creates a new import statement. It is illegal for both roster and pattern to be specified (both may be null).

Parameters:
localSchema - target local schema
femServer - source foreign server
foreignSchemaName - name of source foreign schema
exclude - whether to exclude roster/pattern
roster - if non-null, a list of table names (as SqlIdentifiers) to include or exclude
pattern - if non-null, a table name pattern to include or exclude
Method Detail

visit

public void visit(DdlVisitor visitor)
Description copied from class: DdlStmt
Invokes a visitor on this statement.

Specified by:
visit in class DdlStmt
Parameters:
visitor - DdlVisitor to invoke

preValidate

public void preValidate(FarragoSessionDdlValidator ddlValidator)
Description copied from interface: FarragoSessionDdlStmt
Called before generic validation.

Specified by:
preValidate in interface FarragoSessionDdlStmt
Overrides:
preValidate in class DdlStmt
Parameters:
ddlValidator - the object validating this stmt

convertRoster

private Set<String> convertRoster()