input stringlengths 10 828 | output stringlengths 5 107 |
|---|---|
public void run throws ioexception message writer writer writer scon start message t coding manual writer write attribute a project id project id writer end element writer close element reply scon receive message set result string reply get attribute a path | write the message with attributes and set the result |
public void run throws ioexception message writer writer scon start message t is assigned listing qc writer write attribute a user name user name writer write attribute a status status writer end element writer close element reply scon receive message set result reply | write the message with parameters and set the result |
public boolean is searchable int column throws sqlexception throw new unsupported operation exception | indicates whether the designated column can be used in a where clause |
public void run throws ioexception message writer writer scon start message t create modify errors writer write attribute a batch id batch id writer end element writer close element reply scon receive message set result reply | write the message with attributes and set the result |
public int get update age for update throws sqlexception if update age 0 note the age for update before doing the changes this also serializes table updated statement st2 con create statement result set rs st2 execute query select age from svrage where dummy key 0 for update rs next update age 1 rs get int 1 rs close note not managed st2 execute update update svrage set age update age where dummy key 0 st2 close return update age | return the age of managed table updates done by this task |
public boolean is currency int column throws sqlexception throw new unsupported operation exception | indicates whether the designated column is a cash value |
public task execute query string sql name string parameters this sql name parameters false | construct a client task to execute a named query on the server |
public task execute query string sql name this sql name string null false | construct a client task to execute a named query on the server |
public int is nullable int column throws sqlexception throw new unsupported operation exception | indicates the nullability of values in the designated column |
public task execute query string sql name string parameter this sql name new string parameter false | construct a client task to execute a named query on the server |
public task execute query string sql name string parameter1 string parameter2 this sql name new string parameter1 parameter2 false | construct a client task to execute a named query on the server |
public boolean is signed int column throws sqlexception throw new unsupported operation exception | indicates whether values in the designated column are signed numbers |
public task execute query string sql name string parameter1 string parameter2 string parameter3 this sql name new string parameter1 parameter2 parameter3 false | construct a client task to execute a named query on the server |
public int get column display size int column throws sqlexception throw new unsupported operation exception | indicates the designated columns normal maximum width in characters |
public task execute query string sql name string parameter boolean with meta data this sql name new string parameter with meta data | construct a client task to execute a named query on the server |
public void run throws ioexception message writer writer scon start message t listing queue writer write attribute a volume id volume id writer write attribute a users id user id writer end element writer close element reply scon receive message | write the message with parameters and set the result |
public string get column label int column throws sqlexception return get column name column | gets the designated columns suggested title for use in printouts and |
public string get column name int column throws sqlexception if headings null throw new unsupported operation exception else return headings column 1 | get the designated columns name |
public void run throws ioexception result set query result null query result sql execute query scon this sql name parameters with meta data set result query result | execute the query and set the result |
public string get schema name int column throws sqlexception throw new unsupported operation exception | get the designated columns tables schema |
public message writer start message string element output stream raw out stream throws ioexception message writer writer new message writer raw out stream common properties message dtd writer start element element return writer | start to write the message from here |
public int get precision int column throws sqlexception throw new unsupported operation exception | get the designated columns number of decimal digits |
public int get scale int column throws sqlexception throw new unsupported operation exception | gets the designated columns number of digits to right of the decimal point |
public string get table name int column throws sqlexception throw new unsupported operation exception | gets the designated columns table name |
public element receive message throws ioexception raw in stream new multi input stream url get input stream input stream raw in stream new stream message reader reader new message reader input stream common properties get message dtdfile path element message node reader read get document element node action message node get first child while action null if action get node type node element node return element action action action get next sibling log quit no action in message message node return null | create a new message reader read the returned message |
public string get catalog name int column throws sqlexception throw new unsupported operation exception | gets the designated columns tables catalog name |
public message writer start message string element throws ioexception url connection new client server communication try url url connection get connection for image servlet catch malformed urlexception ex ex print stack trace catch class not found exception ex ex print stack trace throw new ioexception unable to get server connection catch ioexception ex ex print stack trace raw out stream new multi output stream url get output stream message writer message writer new message writer raw out stream new stream common properties message dtd message writer start element element return message writer | start a new message |
public string get max version return max version | get maximum client version from servers accept message |
public int get column type int column throws sqlexception throw new unsupported operation exception | retrieves the designated columns sql type |
public message writer start message string url string string element throws ioexception try url get image server url url string catch malformed urlexception ex ex print stack trace raw out stream new multi output stream url get output stream message writer message writer new message writer raw out stream new stream common properties message dtd message writer start element element return message writer | start writing the message |
public string get column type name int column throws sqlexception throw new unsupported operation exception | retrieves the designated columns database specific type name |
public element read message throws ioexception message reader reader new message reader logged input stream make instance new gzipinput stream rawin new stream rawin new stream common properties get message dtdfile path document doc reader read node result doc get document element get first child system out println result result get node value while result null result get node type node element node result result get next sibling assert result null return element result | read a message for this task |
public boolean is read only int column throws sqlexception throw new unsupported operation exception | indicates whether the designated column is definitely not writable |
public boolean is definitely writable int column throws sqlexception throw new unsupported operation exception | indicates whether a write on the designated column will definitely succeed |
public void shutdown throws ioexception if url null send message t goodbye | close the connection |
public string get column class name int column throws sqlexception throw new unsupported operation exception | p returns the fully qualified name of the java class whose instances |
public void add parameter string name string value add parameter name value value | remember parameters to be used in the sql query |
public data input stream get data stream data input stream result null try result new data input stream new buffered input stream new gzipinput stream rawin new stream catch ioexception e log quit e return result | obtain a data input stream for non xml input data |
public void add parameter string name string display int value add parameter name display integer to string value | remember parameters to be used in the sql query |
public void run try log print task generate report run final result set query result do query if query result null log quit task generate report sql name query result is null else if query result instanceof result set display the report in a non modal dialog log print task generate report run start report thread table report report thread new table report query result title param names param display swing utilities invoke later report thread else log quit task generate report sql name invalid return type query result catch throwable e log quit e | execute the query and start code table report code as a runnable |
protected result set do query throws ioexception class not found exception return sql execute query with meta data scon this sql name parameters | run a query on the server to obtain report data |
public void run try log print task generate report table report run table viewer dialog dialog new table viewer jframe global main window false dialog set report heading title param names param display dialog set model new result set table model query result dialog set visible true catch throwable t log quit t | show the table viewer dialog to the user using the stored parameters |
public void run throws ioexception log print task delete mailsent run message writer writer scon start message t delete mailsent encode a map of key mailsent id value message map encode writer id map writer end element writer close element reply scon receive message string ok reply get node name log print t delete mailsent reply ok set result object ok if t ok equals ok t fail equals ok log quit delete mailsent unexpected message type ok | write the message with attributes and set the result |
public void run throws ioexception message writer writer scon start message t close volume writer write attribute a volume id volume id writer write attribute a status status writer write attribute a project id project id writer end element writer close element reply scon receive message set result reply | write the message with attributes and set the result |
public boolean enqueue return enqueue global main window | enqueue this task for execution by the client thread |
public output stream get output stream output stream result null try result new buffered output stream new gzipoutput stream rawout new stream catch ioexception e log quit e return result | obtain an output stream for non xml input data |
public void add standard attributes message writer writer throws ioexception log print add standard attributes v volume id b batch id if volume id batch id 0 synchronized this if volume id 0 writer write attribute a volume id volume id if batch id 0 writer write attribute a batch id batch id | add the volume id and batch id in use by the current viewer |
public void run throws ioexception write method message writer writer start message t create listing batch writer write attribute a volume id 12 writer write attribute a users id 40 writer end element writer close element reply scon receive message set result reply | write the message with attributes and set the result |
public void run throws ioexception message writer writer scon start message t create coding batches writer write attribute a batch id batch id writer write attribute a count document count writer end element writer close log print task create coding batches run batch id document count element reply scon receive message string ok reply get node name log print t create coding batches reply ok set result object reply if t ok equals ok t fail equals ok log quit create coding batches unexpected message type ok | write the message with attributes and set the result |
public task batch queue int batch id int volume id int users id int teams id boolean clear queues this batch id batch id this volume id volume id this users id users id this teams id teams id this clear queues clear queues | create an instance of this class and remember the given parameters |
public void run throws ioexception message writer writer writer scon start message t request output format writer write attribute a volume id volume id writer end element writer close element reply scon receive message final result set rs sql result from xml reply set result rs | write the message with attributes and set the result |
public void run throws ioexception message writer writer writer scon start message t open qa volume writer write attribute a volume id integer to string volume id writer end element writer close element reply scon receive message set result reply | write the message with attributes and set the result |
public message writer get message writer try if writer null writer new message writer new gzipoutput stream rawout new stream common properties message dtd return writer catch ioexception e log quit e return null | get the message writer for this task |
public object get value int index system out println value index value index return value index | return the object at the given index |
public void register if is registered is registered true for int i 0 i models length i models i register | register this node if required |
protected void set auto register boolean flag auto register flag | set to automatically register this node on creation |
public boolean is locked int batch id throws sqlexception boolean result false result set rs st execute query select 0 from session where batch id batch id if rs next result true rs close return result | test if a given batch is locked |
public void add managed node model new model models managed node model dynamic arrays append models new model model sizes dynamic arrays append model sizes 0 new model add table model listener table listener if is registered new model register initialize for model models length 1 | append a new model to this node |
protected default tree model get tree model if tree model null return tree model managed node parent managed node this get parent return parent null null parent get tree model | get the tree model which contains this node null if none |
public void lock batch int batch id throws sqlexception this execute update update session s batch b set s volume id b volume id s batch id b batch id lock time system current time millis where s session id session id and b batch id batch id | lock a given batch |
public void set user object object obj super set user object obj if obj instanceof table row table row row obj table row obj row id row obj id else row id 0 | override default mutable tree model |
public int get row id return row id | get the row id for this node |
public void lock volume int volume id throws sqlexception this execute update update session set volume id volume id lock time system current time millis where session id session id lock volume id volume id | lock a given volume |
public void set as model root default tree model tree model object old root tree model get root if old root instanceof managed node managed node old root managed node managed node old root old root managed node tree model null this tree model tree model log print set as model root this tree model set root this this register | make this node the root of the given tree model |
public void enable after failure final string message swing utilities invoke later new runnable public void run synchronized dia login this login data null ok button set enabled true feedback area set text message | reenable login after failure detected by main thread |
public int get row id int row return model get row id indirect row | get the id of this row |
public int get lock volume id return lock volume id | get the volume of currently locked batch or 0 if no current lock |
public table row get row at int index return model get row at indirect index | return the row at the given index |
public string can split documents table row row data table row get user object log print project batching can split documents row data get value 1 return 0 equals string row data get value 1 no yes | return the value of project |
public void set table model table model model sqlmanaged table model this get model set table model model | set the table model so the columns are defined |
protected void initialize if model null model get row count 0 indirect null return the array to be filled indirect new int model get row count int j 0 for int i 0 i model get row count i if accept model get row at i indirect j i j indirect dynamic arrays truncate indirect j | add rows from the initial underlying model to this model |
public int get lock batch id return lock batch id | get the batch currently locked or 0 if no current lock |
public void shutdown throws ioexception shutdown false | shutdown connection to server |
public int get row type int row index return row type row index | return the type of a row |
public int get row count return row type length | returns the number of rows in the model |
private void update mailreceived status mailreceived managed model mmmodel sqlmanaged table model model sqlmanaged table model mmmodel get model map id map new hash map for int i 0 i model get row count i if string model get value at i 0 equals new id map put integer to string model get row id i unread if id map size 0 final client task task new task send mailreceived data id map task enqueue | for each new status in the model update the server with a |
public void shutdown boolean restart log print shutdown restart if url null system out println inside if try if restart send message t goodbye a restart yes start message t goodbye a restart yes else send message t goodbye catch throwable th log print failed in shutdown ignored th | shutdown connection to server |
public void update status int id string status log print mmm update status id status map id map new hash map id map put integer to string id status final client task task new task send mailreceived data id map task enqueue | update one status on the server |
public void set table model table model model sqlmanaged table model get model set table model model | set the table model so the columns are defined |
public int get selected id object object super get selected item int i super get index of object if i 1 i ids size return integer parse int string ids get i return 0 | returns the id of the selected item |
public int get id at int row return integer parse int string ids get row | returns the id of the given index |
public string get first value return first value | return the specified first value or null if there is none |
public int get row count return indirect null 0 indirect length | get the number of rows |
public int get size return model get row count first offset | return the number of rows in the model |
public object get element at int index return first value null index 0 first value model get value at index first offset 0 | return the object at position index |
public void set value at object value int row index int column index throw new unsupported operation exception | class not supported |
public void set admin boolean flag admin flag | record if the current task is for an administrator |
public void table changed table model event e table model event e2 new table model event this e get first row e get last row e get column e get type fire table changed e2 | by default forward all events to all the listeners |
public boolean get permission coding return permission coding | obtain permission coding |
public class get column class int column index class result column flags column index percent 0 column flags column index dollar 0 float class column flags column index integer 0 integer class string class return result | get the class of the data at the given position |
public int get column count try if headings null return headings length else return metadata get column count catch sqlexception e log quit e return 0 never get here | return the number of headings in the model or the number |
public int get row count try results last return results get row catch sqlexception e log quit e return 0 never get here | return the number of rows in the result set |
public object get value at int row int column try results absolute row 1 return results get string column 1 catch sqlexception e log quit e return null never get here | obtain the value at the given row and column |
public void create temporary table string sql throws sqlexception log print create temporary table sql set bin log enabled false if temp table has been created log print dropping temporary table before create st execute update drop temporary table if exists temp temp table has been created true st execute update sql | create a temporary table |
public string get column name int column try if headings null return headings column else return metadata get column name column 1 catch sqlexception e log quit e return null never get here | return the name of the given column from headings if it |
public void set model table model model this model managed table model model initialize super set model model | override set model in table map |
public boolean get permission codingqc return permission codingqc | obtain permission codingqc |
public void register model register | register the underlying managed table model with the server |
public int get id at int index implementation copied from managed list model if get first value null if index 0 first element there is no id return 0 else skip the first element index return managed table model get model get row id index | get the id corresponding to the given index |
public int get column max count return model get column max count | return the number of values in a row |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.