input stringlengths 10 828 | output stringlengths 5 107 |
|---|---|
public dbconnection query list get queries replicated object client client throws ioexception if queries null queries id null queries dbconnection query list client get object queries id replication manager get instance start sharing queries client else if queries null queries id null queries create list client object id id client get object id queries queries id id fire property change queries id null id return queries | returns the list of queries |
public object id get connection map id return connection map id | returns the object id of the data style mapping |
public void set connection map id object id connection map id if connection map id equals this connection map id connection map null object old this connection map id this connection map id connection map id fire property change connection map id old connection map id | sets the object id of the shared map |
public shared map get connection map replicated object client client throws ioexception if connection map null connection map id null connection map shared map client get object connection map id replication manager get instance start sharing connection map client else if connection map null connection map id null connection map create map client object id id client get object id connection map connection map id id fire property change connection map id null id return connection map | returns the data set style mapping |
private shared map create map replicated object client client throws ioexception permissions perms delegated permissions create delegated permissions client get object id this client shared map map shared map client get new object shared map class perms replication manager get instance start sharing map client return map | creates a new shared map |
private dbconnection query list create list replicated object client client throws ioexception permissions perms delegated permissions create delegated permissions client get object id this client dbconnection query list list dbconnection query list client get new object dbconnection query list class perms replication manager get instance start sharing list client return list | creates a new connection query list |
public void process results query item item string type item get type int type int 0 if type equals user type int 1 if type equals field type int 2 switch type int case 1 print results item get query item get results break case 2 fields item get results search fields get search fields formatted search fields get formatted search fields try write page content catch ioexception e e print stack trace break | method called from property change listener to process the results of the query |
public string get servlet url object id id embedded object path path replicated object client client string mime type properties source props return editor servlet class get name id id | returns a url without protocol or host for viewing the given |
public void get fields string query int f query index of from 4 int w query index of where string table name query substring f w add query table name field | method to get all fields from table for use as headers |
public vector run table query system out println in run table query connection con manager get connection vector temp tables new vector try st con create statement rs st execute query show tables system out println executed query show tables while rs next temp tables add rs get string 1 catch sqlexception e error occurred true system out println e get message system out println out run table query return temp tables | method to query database for all tables |
public void set connection for editor object id db connection id object id embedded object descriptor db connection get selected item get object id map put emconnection new string map item db connection id to string add query null connection | method to set connection |
public void set table string new name table name new name fields clear var types clear add query table name field add query table name qualifier | method to set the variable table name to the table being passed |
public vector run field query string table name system out println in run field query connection con manager get connection vector temp col new vector try st con create statement rs st execute query show columns from table name system out println executed query show columbs from table name while rs next temp col add rs get string 1 catch sqlexception e error occurred true system out println e get message system out println out run field query return temp col | method to query database for fields |
public vector get selected fields vector temp col new vector int col count fields size int c 0 while c col count if check c null if check c is selected temp col add element check c get text c return temp col | method to get the fields selected in the checkbox array |
public void connection error joption pane show message dialog this no connection check your database information and try again connection error joption pane error message | method to show a connection error |
public string get servlet url object id id embedded object path path replicated object client client string mime type properties source props return dbconnection servlet class get name id id | returns a url without protocol or host for viewing the given |
public void set query string query object old this query this query query fire property change query old query | sets the query |
public vector run qualifier query string table name system out println in run qualifier query connection con manager get connection string var type new string vector var types new vector try st con create statement rs st execute query show columns from table name system out println executed query show columns from table name while rs next var type rs get string 2 var types add var type catch sqlexception e error occurred true system out println e get message system out println out run qualifier query return var types | method to query the database and return the field types |
public string get db connection id return db connection id | returns the object id of the dbconnection object in string form |
public void set db connection id string db connection id object old this db connection id this db connection id db connection id fire property change db connection id old db connection id | sets the object id of the dbconnection object |
public void set results vector results object old this results this results results fire property change results old results | sets the results |
public void set type string type object old this type this type type fire property change type old type | sets the query type |
public boolean get processed return processed | returns the processing status |
public boolean get error occurred return error occurred | returns the error occurred status |
public void set error occurred boolean error occurred object old new boolean this error occurred this error occurred error occurred fire property change error occurred old new boolean error occurred | sets the error occurred status |
public string get time added return time added | returns the time added |
public void set time added date d new date object old time added time added object record date tostring format format d fire property change time added old time added | sets the time added to the current system time |
public void set time added string time added object old this time added this time added time added fire property change time added old time added | sets the time added |
public void remove field fields panel remove field panel field count 1 field count if field count 0 minus button set enabled false double height panel size get height panel size set size 650 height 27 general set size panel size fields panel revalidate | method to remove the last field |
public string get servlet url object id id embedded object path path replicated object client client string mime type properties source props return form servlet class get name id id | returns a url without protocol or host for viewing the given |
public void connect try class for name my sqldriver new instance string db url jdbc mysql my server con driver manager get connection db url account name password catch exception e system err println exception e get message | establishes the connection with the my sql database |
public void connect ms try class for name my sqldriver new instance con driver manager get connection jdbc microsoft sqlserver my server account name password con driver manager get connection jdbc sqlserver my server account name password string db url jdbc jtds sqlserver my server con driver manager get connection db url account name password catch exception e system err println exception e get message | establishes the connection with the msdatabase |
public object id get pass map id return pass map id | returns the object id of the data style mapping |
public void set pass map id object id pass map id if pass map id equals this pass map id pass map null object old this pass map id this pass map id pass map id fire property change pass map id old pass map id | sets the object id of the list of queries |
public shared map get pass map replicated object client client throws ioexception if pass map null pass map id null pass map shared map client get object pass map id replication manager get instance start sharing pass map client else if pass map null pass map id null pass map create map client object id id client get object id pass map pass map id id fire property change pass map id null id return pass map | returns the data set style mapping |
public query list get queries replicated object client client throws ioexception if queries null queries id null queries query list client get object queries id replication manager get instance start sharing queries client else if queries null queries id null queries create list client object id id client get object id queries queries id id fire property change queries id null id return queries | returns the list of queries |
public read only query list get read only queries replicated object client client throws ioexception if read only queries null read only queries id null read only queries read only query list client get object read only queries id replication manager get instance start sharing read only queries client else if read only queries null read only queries id null read only queries create read only list client object id id client get object id read only queries read only queries id id fire property change read only queries id null id return read only queries | returns the list of queries |
public void set read only queries id object id read only queries id if queries id equals this read only queries id read only queries null object old this read only queries id this read only queries id read only queries id fire property change read only queries id old read only queries id | sets the object id of the list of queries |
public object id get query map id return query map id | returns the object id of the data style mapping |
public void set query map id object id query map id if query map id equals this query map id query map null object old this query map id this query map id query map id fire property change query map id old query map id | sets the object id of the list of queries |
public shared map get query map replicated object client client throws ioexception if query map null query map id null query map shared map client get object query map id replication manager get instance start sharing query map client else if query map null query map id null query map create map client object id id client get object id query map query map id id fire property change query map id null id return query map | returns the data set style mapping |
private query list create list replicated object client client throws ioexception dbpermissions dbperms new dbpermissions client get object id this client get user get name dbperms set read mode dbpermissions delegated plus dbperms set write mode dbpermissions delegated plus query list list query list client get new object query list class dbperms replication manager get instance start sharing list client return list | creates a new query list |
private read only query list create read only list replicated object client client throws ioexception dbpermissions dbperms new dbpermissions client get object id this client get user get name dbperms set read mode dbpermissions all dbperms set write mode dbpermissions all read only query list list read only query list client get new object read only query list class dbperms replication manager get instance start sharing list client return list | creates a new read only query list |
public void check get principal p throws security exception if read mode all if read mode delegated super check get p else if read mode delegated plus string id p get name if id equals server admin return else super check get p else string id p get name if user equals id check id can read return throw new security exception id cannot retrieve this object | throws an exception if the given principal is not allowed to |
public void check delete principal p throws security exception if write mode all if write mode delegated super check get p else if write mode delegated plus string id p get name if id equals server admin return else super check get p else string id p get name if user equals id check id can read return throw new security exception id cannot retrieve this object | throws an exception if the given principal is not allowed to |
public void check change principal p change ch throws security exception if write mode all if write mode delegated super check get p else if write mode delegated plus string id p get name if id equals server admin return else super check get p else string id p get name if user equals id check id can read return throw new security exception id cannot retrieve this object | throws an exception if the given principal is not allowed to |
public void set table string new name table name new name fields clear data clear var types clear add query table name field add query table name record add query table name qualifier | method to set the variable table name to the table being passed |
public void delete table string table name table list get selected value to string int check joption pane show confirm dialog this are you sure you wish to delete table table name nall data in the table will be lost delete table joption pane ok cancel option string query new string drop table table name if check joption pane ok option fields clear records clear structure records clear table change true add query query delete table map put emcurrent table new string map item tables element at 0 to string | method to delete selected table |
public void set table string new name table name new name add query table name field add query table name records add query table name properties | method to set the variable table name to the table being passed |
public vector get record vector temp data new vector int row num table get selected row if row num 1 row num 0 highlight row row num object row id db model get value at row num 0 int index 1 for int i 0 i records size i vector temp vector records element at i if temp element at 0 row id index i if index 1 index 0 temp data vector records element at index return temp data | method to get all the data in the currently selected record |
protected jcombo box create box vector objs object finder utility get objects of type set org bridgetools collab bridge apps db dbconnection data jcombo box box new jcombo box objs box set renderer new default component list cell renderer context get component view source return box | method to create and return a combo box containing all dbconnection objects |
protected void show query error joption pane show message dialog this an error occurred during the query make sure your conditions ndo not contain spaces or symbols etc error joption pane error message | method called to print error message when an error occurs during a query |
public void process query results query item item query text set text item get query data item get results query table model update query table table changed query evt query table model fire table changed query evt map remove map listener listener map put qmquery new string map item item get query map add map listener listener records panel set border border factory create titled border results integer to string query table model get row count | method called when query results are returned for a user query |
public void delete table string table name table list get selected value to string int check joption pane show confirm dialog this are you sure you wish to delete table table name delete table joption pane ok cancel option string query new string drop table table name if check joption pane ok option fields clear records clear structure records clear table change true add query query delete table map put emcurrent table new string map item tables element at 0 to string set current table name tables element at 0 to string | method to delete selected table |
public void cancel int type switch type case 1 add query table name records break case 2 add query table name properties break default add query table name records add query table name properties add query table name fields break | method to cancel changes from edit table and edit structure table |
public string get servlet url object id id embedded object path path replicated object client client string mime type properties source props return workshop query servlet class get name id id | returns a url without protocol or host for viewing the given |
public vector get structure columns vector columns new vector columns add new string field columns add new string type columns add new string null columns add new string key columns add new string default columns add new string extra return columns | method to return the column name vector for fields |
public void del record int row num table get selected row if row num 1 joption pane show message dialog this please select a record no record joption pane error message else int check joption pane show confirm dialog this are you sure you wish to delete the selected record delete record joption pane ok cancel option if check joption pane ok option object row id db model get value at row num 0 string query new string delete from table name where id row id to string add query query delete record | method to delete the currently selected record |
public vector get property vector property new vector int row num structure table get selected row if row num 1 row num 0 highlight row2 row num object row id structure model get value at row num 0 int index 1 for int i 0 i structure records size i vector temp vector structure records element at i if temp element at 0 row id index i if index 1 index 0 property vector structure records element at index return property | method to get property of table from database to enable editing of property |
public void new table workshop create new table ui create new workshop create new table ui this create init view | method called when the create new table button is pressed |
public object get simple type object type if type to string starts with int type int if type to string starts with decimal type currency if type to string starts with float type number if type to string starts with varchar 25 type text 25 max if type to string starts with varchar 50 type text 50 max if type to string starts with varchar 250 type text 250 max return type | method to change the field type more readable |
public void get fields string query int f query index of from 4 int w query index of where string table name query substring f w system out println query system out println table name add query table name field | method to get all fields from table for use as headers |
public void remove condition map remove qmtext condition count 1 condition panel remove temp panel condition count 1 condition count map put qmcount new string map item integer to string condition count if condition count 1 minus button set enabled false match set text match the following condition match panel remove any all match panel remove condition | method to remove a condition for query |
public void new table create new table ui create new create new table ui this create init view | method called when the create new table button is pressed |
public void set checks fields panel remove all fields panel repaint int f 0 while f fields size check f new jcheck box fields element at f to string check f set selected true check f add action listener listener fields panel add check f f | method to set field checkboxes to match the current table |
public vector get formatted fields string query return get fields used query | method to call the new function get fields used |
public void set checks2 fields2 panel remove all fields2 panel repaint int f 0 while f fields size check2 f new jcheck box fields element at f to string check2 f set selected true check2 f add action listener listener fields2 panel add check2 f display f new jtext field fields element at f to string fields2 panel add display f display f add key listener listener f | method to set field checkboxes and display as textfields on webview |
public void set checks set fields panel | method to set field checkboxes to match the current table |
protected void show query error joption pane show message dialog this an error occurred during the operation make sure your table name nand or field names do not contain spaces use instead of spaces nor symbols etc error joption pane error message | method called to print error message when an error occurs during a query |
public shared list get data sets replicated object client client boolean create throws ioexception if data sets null data sets id null data sets shared list client get object data sets id replication manager get instance start sharing data sets client else if data sets null data sets id null create data sets create list client object id id client get object id data sets data sets id id fire property change data sets id null id return data sets | returns the list of data sets |
public object id get data sets id return data sets id | returns the object id of the data sets shared list |
public void set fields panel jlabel lab new jlabel 2 lab 0 new jlabel field jlabel center lab 1 new jlabel field header jlabel center fields panel remove all fields panel repaint fields panel add lab 0 fields panel add lab 1 int f 0 while f fields size display check f new jcheck box fields element at f to string display check f set selected true display check f add action listener listener fields panel add display check f col header f new jtext field col header f add key listener listener fields panel add col header f f | method to set field checkboxes link comboboxes and |
public int get data sets size replicated object client client throws ioexception int size 0 shared list list get data sets client false if list null size list get size return size | convenience method that returns the number of data sets in the shared list |
public void add data set replicated object client client shared list item item throws ioexception shared list list get data sets client true list add item item add to data set style mapping | convenience method that adds a data set to the shared list |
public void set data sets id object id data sets id if data sets id equals this data sets id data sets null object old this data sets id this data sets id data sets id fire property change data sets id old data sets id | sets the object id of the list of data sets |
public object id get set style mapping id return set style mapping id | returns the object id of the data style mapping |
public void set set style mapping id object id set style mapping id if set style mapping id equals this set style mapping id set style mapping null object old this set style mapping id this set style mapping id set style mapping id fire property change set style mapping id old set style mapping id | sets the object id of the data set style mapping |
private shared list create list replicated object client client throws ioexception permissions perms delegated permissions create delegated permissions client get object id this client shared list list shared list client get new object shared list class perms replication manager get instance start sharing list client return list | creates a new shared list |
public string to string return get class get name x get x y get y | returns a string that represents the value of this point double |
public boolean equals object obj boolean result false if obj instanceof point double point double tmp point double obj if tmp get x this x tmp get y this y result true return result | determines whether or not two points are equal |
public void set urlmapping id object id url map id if url map id equals this url map id url map null object old this url map id this url map id url map id fire property change urlmapping id old url map id | sets the object id of the url mapping |
public void initialize replicated object client client this client client if listener manager null listener manager new feature listener manager | initializes the object with a replicated object client |
public object id get urlmapping id return url map id | returns the object id of the urlmapping |
public void set data store id object id data store id if data store id equals this data store id data store null object old this data store id this data store id data store id fire property change data store id old data store id | sets the object id of the data store |
public object id get data store id return data store id | returns the object id of the data store |
public shared data store get data store replicated object client client throws ioexception if data store null data store id null data store shared data store client get object data store id replication manager get instance start sharing data store client return data store | returns the data store object or null if one has not been assigned |
public void set feature lists id object id feature lists id if feature lists id equals this feature lists id feature lists null object old this feature lists id this feature lists id feature lists id fire property change feature lists id old feature lists id | sets the object id of the feature lists |
public void set content link url content link if content link this content link object old this content link this content link content link fire property change content link old content link | sets the content link url |
public url get content link return content link | retrieves the content link url |
public object id get feature types id return feature types id | returns the object id of the shared list of feature types |
public void set feature types id object id feature types id if feature types id equals this feature types id feature types null object old this feature types id this feature types id feature types id fire property change feature types id old feature types id | sets the object id of the shared list of feature types |
public object id get feature lists id return feature lists id | returns the object id of the feature lists |
public void initialize replicated object client client throws ioexception this client client if feature type null feature type id null feature type shared feature type client get object feature type id replication manager get instance start sharing feature type client | initializes the object with a replicated object client |
public object id get feature type id return feature type id | returns the object id of the shared feature type |
public feature type get schema string type name throws ioexception return null | data store method comments copied from geo tools data store interface |
public feature collection get parent return null | feature method gets the feature collection this feature is stored in |
public feature source get view query query throws ioexception schema exception return null | data store method comments copied from geo tools data store interface |
public feature source get feature source string type name throws ioexception return null | data store method comments copied from geo tools data store interface |
public feature reader get feature reader query query transaction transaction throws ioexception return null | data store method comments copied from geo tools data store interface |
public string get id string id null string map item smi string map item get new string map item object idkey if smi null id smi to string return id | feature method gets the unique id for this feature |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.