input stringlengths 10 828 | output stringlengths 5 107 |
|---|---|
public void add table string schema string table throws invalid transfer criteria exception table tab source data get table schema table if tab null throw new invalid transfer criteria exception app get rbstring db2db transfer transfer manager table does not exist app get log debug transferring table table transfer metadata add table tab for iterator i transfer table listeners iterator i has next empty transfer table listener i next table added for transfer table | transfer this table |
public void remove table string table throws invalid transfer criteria exception app get log debug not transferring table table transfer metadata remove table table for iterator i transfer table listeners iterator i has next empty transfer table listener i next table removed from transfer table | remove this table do not transfer |
public void stop discovering mappings stop discovery flag true | halt the discovery process |
private void load stuff alternative jdbc types try buffered input stream in new buffered input stream get class get resource as stream app get resources get string db2db transfer transfer alternative jdbc types alternative jdbctypes load in in close catch file not found exception e app get log error this get class e catch ioexception e app get log error this get class e | load any resources needed from disk e |
public iterator tables if transfer metadata null return collections empty list iterator else return transfer metadata table iterator | what tables are currently going to be transferred |
public void build index sql | build the list of create primary key sql statements |
public void start throws transfer exception src mapping mapping manager get mapping source source and destination mappings dest mapping mapping manager get mapping target try source conn jdbcconnection manager get source target conn jdbcconnection manager get target catch sqlexception e try if source conn null jdbcconnection manager release source source conn catch sqlexception sqle try if source conn null jdbcconnection manager release target target conn catch sqlexception sqle throw new transfer exception e | transfer operation is about to start |
public string get table sql string table name return get sqlbuilder get table sql table name | for the specified table get the create table sql statement |
public map get table sql return table sql | get the sql statements that when executed will create tables |
public void finish try if source conn null jdbcconnection manager release source source conn catch sqlexception e try if target conn null jdbcconnection manager release target target conn catch sqlexception e | transfer operation is finished |
public void use map string table name string column name string map string get sqlbuilder use map table name column name map string | force the use of a paricular map |
public string get table sql string table name string result if table sql null table sql contains key table name result string table sql get table name app get log debug this get class returning the sql for table table name result return result | get the create table sql for the specified table |
public void force use of mapping string table name string column name int jdbc type get sqlbuilder force use of mapping table name column name jdbc type | force the use of a particular mapping for a particular column |
public map get primary key sql return primary key sql | get the sql statements that when executed will create keys |
public string get column definition string table string column system out println table table system out println column column system out println mapping get sqlbuilder get column sql table column return get sqlbuilder get column sql table column | get the column definition sql for the specified column |
public list get foreign key sql return foreign key sql | get the sql statements that when executed will create foreign keys |
public string get column sql string table string column string result null map map map column sql get table if map null sqlddlcolumn definition def sqlddlcolumn definition map get column if def null result def get sql else result could not determine return result | get the sql fragment for the column with the specified name |
public void transfer foreign keys transfer sqlbuilder build foreign key sql list foreign key sql transfer sqlbuilder get foreign key sql for iterator iter foreign key sql iterator iter has next empty string sql iter next to string db2 dbapplication instance get log debug this get class executing create foreign key sql sql try statement stmt target conn create statement stmt execute sql stmt close catch sqlexception e db2 dbapplication instance get log error this get class e | transfer the foreign keys for each table |
public void transfer indexes | transfer the indexes associated with the tables |
public int get table count int result 0 if transfer metadata null result transfer metadata get table count return result | get the number of tables that are to be transferred |
public list get created tables return created table names | get a list of tables that were successfully created |
public int get primary key count int result 0 if transfer metadata null result transfer metadata get primary key count return result | get the number of primary keys that are to be transferred |
public boolean add column string schema string table string column table transfer table transfer metadata get table table if transfer table null return false table source table source data get table table if source table null return false transfer table add column source table get column column return false | transfer this column |
public boolean remove column string schema string table string column return false | remove this column do not transfer |
public string build select sql table table database metadata string buffer result new string buffer string table name metadata escape table get name result append select boolean first column true for iterator column names table get column names iterator column names has next empty if first column if not the first column result append first column false result append table name result append result append metadata escape column names next to string result append from result append table name string s result to string return s | build a select sql statement to select all data from the specified |
public string discover arguments string jdbc type string base type if mapping manager is valid jdbctype jdbc type throw new illegal argument exception cannot discover the arguments for a nonstandard jdbc type string mapping discover arguments internal base type if mapping null this mapping put jdbc type mapping return mapping | discovers the number of arguments accepted by a database specific type |
private string discover arguments internal string base type string mapping null iterator connections mapping manager get user connections for mapping this iterator connection conn null user connection user connection while connections has next user connection user connection connections next try conn jdbcconnection manager get user connection if conn null string s discover arguments internal base type conn create statement if s null mapping s break catch sqlexception e db2 dbapplication instance get log error this e finally try jdbcconnection manager release user connection conn catch sqlexception e return mapping | discovers the number of arguments accepted by a database specific type |
public container layout container c this container c this current grid y 1 this layout return this container | layout this container |
public map get other props map result null if properties null result new hash map properties size for iterator i properties key set iterator i has next object o i next result put o properties get o else result collections empty map return result | get the jdbc driver connection properties that this user connection is currently using |
public void remove int index this remove container get component index | remove the component specified by index from the container |
public void remove component comp container remove comp layout | remove the specified component from this container |
private void reset grid bag constraints grid bag constraints gridx 0 grid bag constraints gridy 0 grid bag constraints weightx 1 0 grid bag constraints weighty 0 0 grid bag constraints fill grid bag constraints horizontal do not expand vertically only horizontally | initialise the constraints object to defaults for this class |
public void set database name string name this database name name has changed true | this should be the database name as returned by code java |
private mouse listener create mouse adapter mouse listener ml new mouse adapter public void mouse pressed mouse event e if swing utilities is right mouse button e enable or disable menu items revalidate clipboard jmenu this show e get component e get x e get y return ml | create a code mouse listener code that shows the context menu |
public void set database version string version this database version version has changed true | this should be the database version as returned by java |
public void set driver string name this driver name has changed true | set the jdbc driver to be used for this user connection |
public object show dialog show return return value | make the dialog visible |
public void close dialog set visible false dispose | close and dispose of the dialog |
public void add component comp comp add component listener this | listen for events that signify that the specified |
public void component resized component event e desktop resize | invoked when the components size changes |
public void component moved component event e desktop resize | invoked when the components position changes |
public void component shown component event e ignore | invoked when the component has been made visible |
public void component hidden component event e ignore | invoked when the component has been made invisible |
public void set load from classpath boolean bool this load from classpath bool has changed true | should the jdbc driver used with this userconnection be loaded from the classpath |
public void add to desktop jinternal frame frame call code super comp code to delegate this behaviour add a code java awt event component listener code an instance of code jscroll pane mediator code to each code jinternal frame code to listen for component resized and component moved events which will cause this component to resize its desktop super add component frame add component internal frame | add the supplied code jinternal frame code to this desktop pane |
private void set up dimension dm point pt string title string message string array set title title construct ui message text area set text message string details for int i 0 i array length i i 2 details array i array i 1 newline errors text area set text details pack set size width calculate height if pt null dm null int x math round float pt get x dm get width width 2 int y math round float pt get y dm get height dm get height 1 168 set location x y show | all constructors delegate to this method |
public void set history size int size if size 1 this size size array list empty copy array new array list files length files hang on to the current file objects files file empty to array new file size | change the size of the file history |
public jpopup menu display history jpopup menu menu return menu | display the history by appending it to the specified code jpopup menu code |
public jmenu display history jmenu menu return menu | display the history by appending it to the specified code jmenu code |
public void remove from desktop jinternal frame frame super remove component frame remove menu item frame resize | remove the supplied code jinternal frame code from this desktop pane |
public void add history file file | add the specified code file code to the history |
public action build action class action class action result null try result action action class new instance result configure action result catch instantiation exception e catch illegal access exception e return result | instantiate and configure the code action code implementation with the |
private void add component internal jinternal frame frame mediator add component frame add menu item frame frame move to front try frame set selected true catch property veto exception e e print stack trace switch current sort case jscroll desktop pane sort cascading this tile cascade break case jscroll desktop pane sort tile horizontal this tile horizontal break case jscroll desktop pane sort tile vertical this tile vertical break case jscroll desktop pane sort none drop down to default default try frame set maximum true catch property veto exception e e print stack trace frame set visible true | helper to add a code jinternal frame code to the desktop |
private void add menu item jinternal frame frame if j menu null frame add internal frame listener this focus window jradio button menu item menu item new focus window jradio button menu item frame menu item set selected true menu items put frame menu item group add menu item j menu add menu item j menu revalidate j menu repaint | helper to setup a menu item for the code jinternal frame code |
private void remove menu item jinternal frame frame if j menu null focus window jradio button menu item menu item focus window jradio button menu item menu items remove frame if menu item null group remove menu item j menu remove menu item j menu revalidate j menu repaint | helper to remove the menu item for the code jinternal frame code |
public void begin process phased process handler msg init null | begins the process |
private object first iterator list list iterator recreate iterator return iterator has next boolean true boolean false | moves the iterators pointer to before the first element |
private object last while iterator has next try to move to the end iterator next if iterator has previous try to move back one iterator previous return iterator has next boolean true boolean false | moves the iterators pointer to before the last element |
public void cancel process phased process handler msg cancel null | cancels the current phased process |
public void finish process phased process handler msg finish null | finish the current phased process |
private void save current mapping if jdbc type null default list model model default list model database type list get model string mapping utilities get list from array model to array mapping delimiter data type mapping set jdbc type mapping | save the current mapping i |
public void debug class source object message logger l get logger for class source if l null l is debug enabled l debug message | the debug method designates fine grained informational events that are most useful |
protected void process finished current phase 1 | this method is called when the entire process is complete either |
public void allow next boolean allow | this method can be overridden by implementations of this class to allow dissallow |
private logger get logger for class class clazz logger log logger loggers get clazz if log null first time for this class log logger get logger clazz loggers put clazz log return log | get a logger for this particular class |
public void allow previous boolean allow | this method can be overridden by implementations of this class to allow dissallow |
private logger get logger if root logger null root logger logger get root logger try method m logger get method get root logger null root logger logger m invoke null null catch exception e e print stack trace return root logger | get the root logger |
public void debug class source object message throwable throwable logger l get logger for class source if l null l is debug enabled l debug message throwable | the debug method designates fine grained informational events that are most useful |
public void debug class source throwable throwable logger l get logger for class source if l null l is debug enabled l debug throwable | the debug method designates fine grained informational events that are most useful |
public void debug object message logger l get logger if l null l is debug enabled l debug message | the debug method designates fine grained informational events that are most useful |
public void debug object message throwable throwable logger l get logger if l null l is debug enabled l debug message throwable | the debug method designates fine grained informational events that are most useful |
public void debug throwable throwable logger l get logger if l null l is debug enabled l debug throwable | the debug method designates fine grained informational events that are most useful |
public void error class source object message logger l get logger for class source if l null l error message | the error level designates error events that might still allow the application to |
public void internal frame closed internal frame event e remove menu item e get internal frame | remove the menu item that corresponds to the selected internal frame |
public void error class source object message throwable throwable logger l get logger for class source if l null l error message throwable | the error level designates error events that might still allow the application to |
public void internal frame activated internal frame event e object menu item menu items get e get internal frame if menu item null jmenu item menu item set selected true | select the menu item that corresponds to the selected internal frame |
public void error class source throwable throwable logger l get logger for class source if l null l error throwable | the error level designates error events that might still allow the application to |
public void error object message logger l get logger if l null l error message | the error level designates error events that might still allow the application to |
public void error object message throwable throwable logger l get logger if l null l error message throwable | the error level designates error events that might still allow the application to |
public void error throwable throwable logger l get logger if l null l error throwable | the error level designates error events that might still allow the application to |
public void fatal class source object message logger l get logger for class source if l null l fatal message | the fatal level designates very severe error events that will presumably lead the |
public void fatal class source object message throwable throwable logger l get logger for class source if l null l fatal message throwable | the fatal level designates very severe error events that will presumably lead the |
public void fatal class source throwable throwable logger l get logger for class source if l null l fatal throwable | the fatal level designates very severe error events that will presumably lead the |
public void fatal object message logger l get logger if l null l fatal message | the fatal level designates very severe error events that will presumably lead the |
public void fatal object message throwable throwable logger l get logger if l null l fatal message throwable | the fatal level designates very severe error events that will presumably lead the |
public void fatal throwable throwable logger l get logger if l null l fatal throwable | the fatal level designates very severe error events that will presumably lead the |
public void info class source object message logger l get logger for class source if l null l is info enabled l info message | the info level designates informational messages that highlight the progress of the |
public void info class source object message throwable throwable logger l get logger for class source if l null l is info enabled l info message throwable | the info level designates informational messages that highlight the progress of the |
public void info class source throwable throwable logger l get logger for class source if l null l is info enabled l info throwable | the info level designates informational messages that highlight the progress of the |
public void info object message logger l get logger if l null l is info enabled l info message | the info level designates informational messages that highlight the progress of the |
public void info object message throwable throwable logger l get logger if l null l is info enabled l info message throwable | the info level designates informational messages that highlight the progress of the |
public void info throwable throwable logger l get logger if l null l is info enabled l info throwable | the info level designates informational messages that highlight the progress of the |
public void warn class source object message logger l get logger for class source if l null l warn message | the warn level designates potentially harmful situations |
public void warn class source object message throwable throwable logger l get logger for class source if l null l warn message throwable | the warn level designates potentially harmful situations |
public void warn class source throwable throwable logger l get logger for class source if l null l warn throwable | the warn level designates potentially harmful situations |
public void warn object message logger l get logger if l null l warn message | the warn level designates potentially harmful situations |
public void warn object message throwable throwable logger l get logger if l null l warn message throwable | the warn level designates potentially harmful situations |
public void warn throwable throwable logger l get logger if l null l warn throwable | the warn level designates potentially harmful situations |
public void clean throws sqlexception conn close | close the connection |
public void init throws class not found exception instantiation exception illegal access exception sqlexception class for name com mysql jdbc driver new instance connection conn driver manager get connection jdbc mysql localhost gundlint gundl gundldata stmt conn create statement log connected to my sql | initialise driver and connection |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.