ch.sahits.codegen.sql.model
Class InsertScriptWizardModel

java.lang.Object
  extended by ch.sahits.codegen.sql.model.ModelDataProvider
      extended by ch.sahits.codegen.sql.model.InsertScriptWizardModel
All Implemented Interfaces:
ISelectedTableDefinition

public final class InsertScriptWizardModel
extends ModelDataProvider
implements ISelectedTableDefinition

Model data for InsertScriptWizardPage

Author:
Andi Hotz

Constructor Summary
InsertScriptWizardModel()
          Default constructor initializing the lists as empty lists
 
Method Summary
 java.util.List<java.lang.String> availableFields()
          Retrieve the available Fields
 java.lang.String getClassName()
           
 java.sql.Connection getConnection()
          Create and retrieve the connection for the selected database
This works with JDBC
 IConnectionProfile getDtpConnection()
          Retrieve the connection profile
 java.lang.String getFileName()
          Retrieve the file name
 java.lang.String getOwner()
          Retrieve the owner
 java.lang.String getStoreLocation()
          Retrieve the store location
 java.lang.String getTableName()
          Retrieve the table name
 java.lang.String getWhereClause()
          Retrieve the where clause
 boolean hasWhereClause()
          Check if a non empty where clause exists
 void removeDTPSelection()
          If the dtpSelection is removed the owner becomes invalid
 void removeOwner()
          If the owner is remove the table definitions are invalid
 void removeTable()
          If the table is not selected several other fields may not have a value
 java.util.List<java.lang.String> selectedFields()
          Retrieve all selected table fields
 void setClassName(java.lang.String className)
           
 void setDtpConnection(IConnectionProfile dtpConnection)
          Set the connection profile of the DTP selection
 void setFileName(java.lang.String fileName)
          Set the file name
 void setOwner(java.lang.String owner)
          Set the owner
 void setStoreLocation(java.lang.String storeLocation)
          Set the store location of the file
 void setTableName(java.lang.String tableName)
          Set the table name
 void setWhereClause(java.lang.String whereClause)
          Set the where clause
 java.util.List<java.lang.String> unselectedFields()
          Retrieve all not selected table fields
 
Methods inherited from class ch.sahits.codegen.sql.model.ModelDataProvider
getConnectionProfile, getDatabaseForProfile, getFieldNames, getOwner, getProfileByDatabase, getRegisteredConnectionProfiles, getTable, getTables
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InsertScriptWizardModel

public InsertScriptWizardModel()
Default constructor initializing the lists as empty lists

Method Detail

getClassName

public java.lang.String getClassName()
Returns:
the className

setClassName

public void setClassName(java.lang.String className)
Parameters:
className - the className to set

availableFields

public java.util.List<java.lang.String> availableFields()
Retrieve the available Fields

Returns:
List of all fields available for table

unselectedFields

public java.util.List<java.lang.String> unselectedFields()
Retrieve all not selected table fields

Returns:
List of all not selected table fields

selectedFields

public java.util.List<java.lang.String> selectedFields()
Retrieve all selected table fields

Specified by:
selectedFields in interface ISelectedTableDefinition
Returns:
List of all selected table fields

getStoreLocation

public java.lang.String getStoreLocation()
Retrieve the store location

Returns:
storeLocation

setStoreLocation

public void setStoreLocation(java.lang.String storeLocation)
Set the store location of the file

Parameters:
storeLocation -

getDtpConnection

public IConnectionProfile getDtpConnection()
Retrieve the connection profile

Returns:
dtpConnection

setDtpConnection

public void setDtpConnection(IConnectionProfile dtpConnection)
Set the connection profile of the DTP selection

Parameters:
dtpConnection -

getOwner

public java.lang.String getOwner()
Retrieve the owner

Specified by:
getOwner in interface ISelectedTableDefinition
Returns:
owner

setOwner

public void setOwner(java.lang.String owner)
Set the owner

Parameters:
owner -

getTableName

public java.lang.String getTableName()
Retrieve the table name

Specified by:
getTableName in interface ISelectedTableDefinition
Returns:
tableName

setTableName

public void setTableName(java.lang.String tableName)
Set the table name

Parameters:
tableName -

getWhereClause

public java.lang.String getWhereClause()
Retrieve the where clause

Returns:
whereClause

setWhereClause

public void setWhereClause(java.lang.String whereClause)
Set the where clause

Parameters:
whereClause -

getFileName

public java.lang.String getFileName()
Retrieve the file name

Returns:
fileName

setFileName

public void setFileName(java.lang.String fileName)
Set the file name

Parameters:
fileName -

removeTable

public void removeTable()
If the table is not selected several other fields may not have a value


removeOwner

public void removeOwner()
If the owner is remove the table definitions are invalid


removeDTPSelection

public void removeDTPSelection()
If the dtpSelection is removed the owner becomes invalid


getConnection

public java.sql.Connection getConnection()
Create and retrieve the connection for the selected database
This works with JDBC

Returns:
Connection

hasWhereClause

public boolean hasWhereClause()
Check if a non empty where clause exists

Returns:
true if a where clause is registered