input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
public string get back panel id wizard panel wizard if wizard get current visible panel get panel id equals first return intro else if wizard get current visible panel get panel id equals second return first else if wizard get current visible panel get panel id equals third return first else return null
|
method called by wizard panel when when pressing back button
|
public string get next panel id wizard panel wizard if wizard get current visible panel get panel id equals intro return first else if wizard get current visible panel get panel id equals first if first panel wizard get panel first get radio button zip is selected return second else return third else return null
|
method called by wizard panel when pressing next button
|
public string get image name return setup2 gif
|
this method could be overrided
|
public void after mdicreation mdiframe frame
|
method called after mdi creation
|
public void get gantt gantt frame f new gantt frame mdiframe add f
|
this method creates an internal frame that has inside a gantt control
|
public void load data completed boolean error frame get control currency set currency symbol frame get control currency set decimals 2 frame get control currency set decimal symbol frame get control currency set grouping symbol
|
callback method called when the data loading is completed
|
public response insert record value object new persistent object throws exception return client utils get data insert emp new persistent object
|
method called by the form panel to insert new data
|
public response update record value object old persistent object value object persistent object throws exception return client utils get data update emp new value object old persistent object persistent object
|
method called by the form panel to update existing data
|
public response delete record value object persistent object throws exception array list list new array list list add persistent object return client utils get data delete emps list
|
method called by the form panel to delete existing data
|
public boolean authenticate user map login info throws exception response res client utils get data login login info if res is error option pane show message dialog null res get error message login joption pane error message return res is error
|
method called by mdi frame to authenticate the user
|
public void after mdicreation mdiframe frame mdiframe add status component new clock frame add separator to menu bar get employees2 get depts
|
method called after mdi creation
|
public void row changed int row number if row number 1 return emp vo vo emp vo frame get grid get volist table model get object for row row number frame get wdgrid get other grid params put emp code vo get emp code frame get wdgrid reload data
|
callback method invoked when the user has selected another row
|
public void mode changed int current mode if current mode consts insert frame get wdgrid clear data frame set enable grid buttons false else frame set enable grid buttons true
|
callback method invoked each time the grid mode is changed
|
public boolean before insert grid grid control grid new emp detail frame controller this grid null conn return false
|
callback method invoked on pressing insert button
|
public response delete record value object persistent object throws exception prepared statement stmt null try stmt conn prepare statement delete from emp where emp code emp vo vo emp vo persistent object stmt set string 1 vo get emp code stmt execute grid frame reload data return new voresponse vo catch sqlexception ex ex print stack trace return new error response ex get message finally try stmt close conn commit catch sqlexception ex1
|
method called by the form panel to delete existing data
|
public void load data property grid control grid do something e g grid set property value
|
callback method invoked by the property grid control for loading data property values
|
public response delete record value object persistent object throws exception prepared statement stmt null try stmt conn prepare statement delete from demo6 where text test vo vo test vo persistent object stmt set string 1 vo get string value stmt execute grid frame reload data return new voresponse vo catch sqlexception ex ex print stack trace return new error response ex get message finally try stmt close conn commit catch sqlexception ex1
|
method called by the form panel to delete existing data
|
public void tree will collapse tree expansion event event
|
tree will collapse
|
public void left click default mutable tree node node
|
callback method invoked when the user has clicked the left mouse button
|
public void login successful map login info username login info get username to string to upper case mdiframe mdi new mdiframe this
|
method called by login dialog to notify the sucessful login
|
public response insert record value object new persistent object throws exception try sql map start transaction emp vo vo emp vo new persistent object sql map insert insert emp vo sql map commit transaction grid frame reload data pk vo get emp code return new voresponse vo catch exception ex ex print stack trace return new error response ex get message finally sql map end transaction
|
method called by the form panel to insert new data
|
public response update record value object old persistent object value object persistent object throws exception try sql map start transaction emp vo old vo emp vo old persistent object emp vo new vo emp vo persistent object int row sql map update update emp new emp vos old vo new vo sql map commit transaction if row 0 return new error response updating not performed the record was previously updated grid frame reload data return new voresponse new vo catch exception ex ex print stack trace return new error response ex get message finally sql map end transaction
|
method called by the form panel to update existing data
|
public response delete record value object persistent object throws exception try sql map start transaction emp vo vo emp vo persistent object sql map delete delete emp vo get emp code sql map commit transaction grid frame reload data return new voresponse boolean true catch exception ex ex print stack trace return new error response ex get message finally sql map end transaction
|
method called by the form panel to delete existing data
|
public object clone throws clone not supported exception grid emp vo vo grid emp vo super clone if task vo null vo set task vo task vo task vo clone return vo
|
method used by grid and form objects to internally duplicate a value object
|
public response validate code string code try java util list tasks sql map query for list validate task code array list list new array list list add all tasks return new volist response list false list size catch exception ex ex print stack trace return new error response ex get message
|
method called by lookup controller when validating code
|
public response get tree model jtree tree return new error response non supported
|
method called by the tree panel to fill the tree
|
public response insert record value object new persistent object throws exception try dept vo new persistent object set status y context register new object data object new persistent object context commit changes return new voresponse new persistent object catch exception ex try context rollback changes catch exception ex1 return new error response ex get message
|
method called by the form panel to insert new data
|
public response update record value object old persistent object value object persistent object throws exception try context commit changes return new voresponse persistent object catch exception ex try context rollback changes catch exception ex1 return new error response ex get message
|
method called by the form panel to update existing data
|
public response delete record value object persistent object throws exception try context delete object persistent persistent object context commit changes return new voresponse new boolean true catch exception ex try context rollback changes catch exception ex1 ex print stack trace return new error response ex get message
|
method called by the form panel to delete existing data
|
public response validate code string code try expression qualifier2 expression factory like ignore case exp tasks vo task code property code select query select2 new select query tasks vo class qualifier2 list list task lookup controller this context perform query select2 return new volist response new array list list false list size catch exception ex ex print stack trace return new error response ex get message
|
method called by lookup controller when validating code
|
public response insert record value object new persistent object throws exception try emp vo vo emp vo new persistent object context commit changes return new voresponse new persistent object catch exception ex try context rollback changes catch exception ex1 ex print stack trace return new error response ex get message
|
method called by the form panel to insert new data
|
public response update record value object old persistent object value object persistent object throws exception try context commit changes return new voresponse persistent object catch exception ex try context rollback changes catch exception ex1 ex print stack trace return new error response ex get message
|
method called by the form panel to update existing data
|
public response validate code string code try expression qualifier2 expression factory like ignore case exp dept vo dept code property code select query select2 new select query dept vo class qualifier2 list list dept lookup controller this context perform query select2 return new volist response new array list list false list size catch exception ex ex print stack trace return new error response ex get message
|
method called by lookup controller when validating code
|
public boolean authenticate user map login info throws exception if admin equals ignore case string login info get username admin equals ignore case string login info get password mauro equals ignore case string login info get username mauro equals ignore case string login info get password return true else return false
|
method called by mdi frame to authenticate the user
|
public void drop action changed system out println drop action changed
|
this method is invoked when the user changes the drop action
|
public void drop enter system out println drop enter
|
this method is invoked when you are dragging over the drop site
|
public void drop exit system out println drop exit
|
this method is invoked when you are exit the drop site without dropping
|
public void drop over int row system out println drop over row row
|
this method is invoked when a drag operation is going on
|
public response delete record value object persistent object throws exception prepared statement stmt null try stmt conn prepare statement delete from demo2 where text test vo vo test vo persistent object stmt set string 1 vo get string value stmt execute grid frame reload data return new voresponse vo catch sqlexception ex ex print stack trace return new error response ex get message finally try stmt close conn commit catch sqlexception ex1
|
method called by the form panel to delete existing data
|
public object clone throws clone not supported exception products vo products super clone if vo get units null vo set units units vo get units clone return vo
|
method used by grid and form objects to internally duplicate a value object
|
public response validate code string code array list list new array list if c1 equals code test lookup vo vo new test lookup vo vo set lookup value c1 vo set descr lookup value ci uno list add vo if list size 0 return new volist response list false list size else return new error response code not valid
|
method called by lookup controller when validating code
|
public int get cell type int row num string attribute name grid control grid switch row num case 0 return column type text case 1 return column type int case 2 return column type date case 3 return column type combo case 4 return column type check case 5 return column type lookup return column type text
|
define the cell type for the specified row
|
public input control get additional properties int row num string attribute name grid control grid if row num 3 return ic else if row num 5 return col lookup return null
|
define additional properties for the specified cell
|
public void after mdicreation mdiframe frame mdiframe add status component new clock frame add separator to menu bar get employees2 get depts show tip of the day internal frame show tip frame
|
method called after mdi creation
|
public void load data completed boolean error if error grid frame get grid get volist table model get row count 0 grid frame get grid get current sorted columns size 0 swing utilities invoke later new runnable public void run string attr name string grid frame get grid get current sorted columns get 0 int col index grid frame get grid get table get grid get column index attr name grid frame get grid get table get grid set column selection interval col index col index
|
callback method invoked when the data loading is completed
|
public response insert record value object new persistent object throws exception prepared statement stmt null try stmt conn prepare statement insert into demo25 city state population values test vo vo test vo new persistent object stmt set string 1 vo get city stmt set string 2 vo get state stmt set big decimal 3 vo get population stmt execute pk vo get city return new voresponse vo catch sqlexception ex ex print stack trace return new error response ex get message finally try stmt close conn commit catch sqlexception ex1
|
method called by the form panel to insert new data
|
public response delete record value object persistent object throws exception prepared statement stmt null try stmt conn prepare statement delete from demo25 where city test vo vo test vo persistent object stmt set string 1 vo get city stmt execute return new voresponse vo catch sqlexception ex ex print stack trace return new error response ex get message finally try stmt close conn commit catch sqlexception ex1
|
method called by the form panel to delete existing data
|
public color get background color int row string attributed name object value return new color 220 220 220
|
method used to define the background color for each cell of the grid
|
public void create value object value object value object throws exception test vo vo test vo value object vo set currency value new big decimal 1 vo set int value new big decimal grid get grid get volist table model get row count 1 vo set string value abc
|
callback method invoked when the user has clicked on the insert button
|
public void load data completed boolean error if error detail test vo vo detail test vo frame get main panel get vomodel get value object frame get control list set value vo get pricelists
|
callback method called when the data loading is completed
|
public color get background color int row string attribute name object value if attribute name equals button return new color 200 200 220 return super get background color row attribute name value
|
method used to define the background color for each cell of the grid
|
public color get background color int row string attributed name object value if attributed name equals combo value if value equals abc return new color 191 206 207 else return new color 241 123 137 return super get background color row attributed name value
|
method used to define the background color for each cell of the grid
|
public response delete record value object persistent object throws exception prepared statement stmt null try stmt conn prepare statement delete from demo7 where text test vo vo test vo persistent object stmt set string 1 vo get string value stmt execute grid frame reload data return new voresponse vo catch sqlexception ex ex print stack trace return new error response ex get message finally try stmt close conn commit catch sqlexception ex1
|
method called by the form panel to delete existing data
|
public response insert record value object new persistent object throws exception try hash map map new hash map map put string value code map put file myfile map put file description file description response res query util insert table conn new persistent object demo50 map y n true if res is error conn rollback else pk detail test vo new persistent object get string value conn commit return res catch exception ex ex print stack trace return new error response ex get message
|
method called by the form panel to insert new data
|
public response update record value object old persistent object value object persistent object throws exception try hash set pk attrs new hash set pk attrs add string value hash map map new hash map map put string value code map put file myfile map put file description file description response res query util update table conn pk attrs old persistent object persistent object demo50 map y n true if res is error conn rollback else conn commit return res catch exception ex ex print stack trace return new error response ex get message
|
method called by the form panel to update existing data
|
private void create connection try class for name oracle jdbc driver oracle driver conn driver manager get connection jdbc oracle thin localhost 1521 xe system manager prepared statement stmt null try stmt conn prepare statement drop table demo50 stmt execute stmt close catch exception ex3 try stmt conn prepare statement create table demo50 code varchar2 20 myfile blob default empty blob file description varchar2 255 primary key code stmt execute stmt close catch sqlexception ex1 ex1 print stack trace finally try stmt close catch exception ex2 conn commit catch exception ex ex print stack trace
|
create the database connection using hypersonic db in memory and initialize tables
|
public response delete record value object persistent object throws exception prepared statement pstmt null try pstmt conn prepare statement delete from demo50 where code pstmt execute conn commit return new voresponse boolean true catch exception ex try conn rollback catch exception ex1 ex print stack trace return new error response ex get message finally try pstmt close catch exception ex1
|
method called by the form panel to delete existing data
|
public boolean equals object o if o instanceof combo vo return false combo vo c combo vo o if c get code null code null c get code null code null c get description null code null c get description null description null return false if c get code null c get code equals code c get description null c get description equals description return false return true
|
this method must be overrided to guarantee the objects identity
|
public object get initial quick filter value string attribute name object initial value if date value equals attribute name return new java sql date system current time millis else if combo equals attribute name return initial value null null combo vo initial value get code return initial value
|
callback method invoked by grid before showing quick filter panel
|
public response delete record value object persistent object throws exception prepared statement stmt null try stmt conn prepare statement delete from demo4 where text detail test vo vo detail test vo persistent object stmt set string 1 vo get string value stmt execute this instruction is no more needed the grid has been linked to the form see form link grid method grid frame reload data return new voresponse vo catch sqlexception ex ex print stack trace return new error response ex get message finally try stmt close conn commit catch sqlexception ex1
|
method called by the form panel to delete existing data
|
public boolean authenticate user map login info throws exception return false
|
method called by mdi frame to authenticate the user
|
public void load data completed boolean error frame get main panel reload
|
callback method invoked when the data loading is completed
|
public void create value object value object value object throws exception doc02 customers vo doc02 customers value object vo set data ins new java sql timestamp system current time millis vo set cod utente ins demo47 vo set status e
|
callback method invoked when the user has clicked on the insert button
|
public void row changed int row number if frame get customers grid get mode consts readonly return if row number 1 frame get pricelists grid clear data else doc02 customers vo doc02 customers frame get customers grid get volist table model get object for row frame get customers grid get selected row frame get pricelists grid get other grid params put customer vo frame get pricelists grid reload data
|
callback method invoked when the user has selected another row
|
public void mode changed int current mode if frame null return if current mode consts readonly frame set buttons enabled true else frame get pricelists grid set mode consts readonly frame set buttons enabled false
|
callback method invoked each time the grid mode is changed
|
public void create value object value object value object throws exception doc05 articles vo doc05 articles value object vo set data ins new java sql timestamp system current time millis vo set cod utente ins demo47 vo set status e
|
callback method invoked when the user has clicked on the insert button
|
public response validate code string code try filter where clause filter new filter where clause customer id code grid params grid params new grid params grid params get filtered columns put customer id new filter where clause filter null customers remote customers service customers remote demo client facade mdiframe get client facade get remote customers bean return customers service get customers grid params catch exception ex ex print stack trace return new error response ex get message
|
method called by lookup controller when validating code
|
public void load data completed boolean error frame get grid get other grid params put pk pk frame get grid reload data
|
callback method called when the data loading is completed
|
public response insert record value object new persistent object throws exception try orders remote orders remote service orders remote demo client facade mdiframe get client facade get remote orders bean array list orders new array list orders add new persistent object response res orders remote service insert orders orders if res is error return new voresponse volist response res get rows get 0 else return res catch exception ex ex print stack trace return new error response ex get message
|
method called by the form panel to insert new data
|
public response update record value object old persistent object value object persistent object throws exception try orders remote orders remote service orders remote demo client facade mdiframe get client facade get remote orders bean array list orders new array list orders add persistent object response res orders remote service update orders orders if res is error return new voresponse volist response res get rows get 0 else return res catch exception ex ex print stack trace return new error response ex get message
|
method called by the form panel to update existing data
|
public void create value object value object value object throws exception doc03 pricelists vo doc03 pricelists value object vo set data ins new java sql timestamp system current time millis vo set cod utente ins demo47 vo set status e doc02 customers parent vo doc02 customers frame get pricelists grid get other grid params get customer vo set customer id doc02 parent vo doc03 pricelists pk pk new doc03 pricelists pk pk set customer id doc022 parent vo get customer id vo set pk pk
|
callback method invoked when the user has clicked on the insert button
|
public response delete record value object persistent object throws exception try orders remote orders remote service orders remote demo client facade mdiframe get client facade get remote orders bean array list orders new array list orders add persistent object return orders remote service delete orders orders catch exception ex ex print stack trace return new error response ex get message
|
method called by the form panel to delete existing data
|
public void mode changed int current mode if current mode consts insert frame get grid clear data frame set buttons enabled false else frame set buttons enabled true
|
callback method called when the form mode is changed
|
public response validate code string code try doc01 orders vo doc01 orders form get vomodel get value object filter where clause filter new filter where clause pk pricelist id code grid params grid params new grid params grid params get filtered columns put pk pricelist id new filter where clause filter null pricelists remote pricelists service pricelists remote demo client facade mdiframe get client facade get remote pricelists bean return pricelists service get pricelists vo get customer id grid params catch exception ex ex print stack trace return new error response ex get message
|
method called by lookup controller when validating code
|
public response validate code string code try filter where clause filter new filter where clause item id code grid params grid params new grid params grid params get filtered columns put item id new filter where clause filter null articles remote articles service articles remote demo client facade mdiframe get client facade get remote articles bean return articles service get articles grid params catch exception ex ex print stack trace return new error response ex get message
|
method called by lookup controller when validating code
|
public response insert record value object new persistent object throws exception session session null try dept vo vo dept vo new persistent object vo set status e session sessions get current session session begin transaction session save vo session flush session get transaction commit session sess sessions open session obtain a jdbc connection and instantiate a new session sess save vo sess flush sess connection commit sess close return new voresponse vo catch exception ex session get transaction rollback ex print stack trace return new error response ex get message finally try session close catch exception ex1
|
method called by the form panel to insert new data
|
public response update record value object old persistent object value object persistent object throws exception session session null try session sessions get current session session begin transaction session update persistent object session flush session connection commit session sess sessions open session obtain a jdbc connection and instantiate a new session sess update vo sess flush sess connection commit sess close return new voresponse persistent object catch sqlexception ex session get transaction rollback ex print stack trace return new error response ex get message finally try session close catch exception ex1
|
method called by the form panel to update existing data
|
public response delete record value object persistent object throws exception try dept vo vo dept vo persistent object vo set status d session session sessions get current session session begin transaction session update vo session flush session connection commit session sess sessions open session obtain a jdbc connection and instantiate a new session sess update vo sess flush sess connection commit sess close return new voresponse new boolean true catch sqlexception ex ex print stack trace return new error response ex get message
|
method called by the form panel to delete existing data
|
public response validate code string code try string base sql from tasks in class demo17 task vo where tasks status e and task code code session sess task lookup controller this sessions open session obtain a jdbc connection and instantiate a new session response res hibernate utils get all from query new hash map new array list new array list task vo class base sql new object 0 new type 0 tasks task lookup controller this sessions sess sess close return res catch exception ex ex print stack trace return new error response ex get message
|
method called by lookup controller when validating code
|
public response insert record value object new persistent object throws exception session session null try emp vo vo emp vo new persistent object session sessions get current session session begin transaction session save vo session flush session get transaction commit session sess sessions open session obtain a jdbc connection and instantiate a new session sess save vo sess flush sess connection commit sess close return new voresponse vo catch exception ex session get transaction rollback ex print stack trace return new error response ex get message finally try session close catch exception ex1
|
method called by the form panel to insert new data
|
public response update record value object old persistent object value object persistent object throws exception session session null try session sessions get current session session begin transaction session merge persistent object session flush session connection commit session sess sessions open session obtain a jdbc connection and instantiate a new session sess update vo sess flush sess connection commit sess close return new voresponse persistent object catch sqlexception ex session get transaction rollback ex print stack trace return new error response ex get message finally try session close catch exception ex1
|
method called by the form panel to update existing data
|
public response delete record value object persistent object throws exception try emp vo vo emp vo persistent object session session sessions get current session session begin transaction session delete vo session flush session connection commit session sess sessions open session obtain a jdbc connection and instantiate a new session sess update vo sess flush sess connection commit sess close return new voresponse new boolean true catch sqlexception ex ex print stack trace return new error response ex get message
|
method called by the form panel to delete existing data
|
public response validate code string code try string base sql from demo17 dept vo as dept vo where status e and dept code code session sess dept lookup controller this sessions open session obtain a jdbc connection and instantiate a new session response res hibernate utils get all from query new hash map new array list new array list dept vo class base sql new object 0 new type 0 dept vo dept lookup controller this sessions sess sess close return res catch exception ex ex print stack trace return new error response ex get message
|
method called by lookup controller when validating code
|
public response validate code string code try string base sql from demo17 address vo as address vo where id code session sess address lookup controller this sessions open session obtain a jdbc connection and instantiate a new session response res hibernate utils get all from query new hash map new array list new array list address vo class base sql new object 0 new type 0 address vo address lookup controller this sessions sess sess close return res catch exception ex ex print stack trace return new error response ex get message
|
method called by lookup controller when validating code
|
public object string to value string text throws parse exception if text null text equals return null string t for int i 0 i text length i if character is digit text char at i t text char at i else if text char at i i 3 i 6 throw new parse exception invalid pattern i return new integer t
|
parses code text code returning an arbitrary object
|
public string value to string object value throws parse exception if value null return null string t value to string if t length 9 throw new parse exception invalid pattern t length 1 t t substring 0 3 t substring 3 5 t substring 5 return t
|
returns the string value to display for code value code
|
public response delete record value object persistent object throws exception prepared statement stmt null try stmt conn prepare statement delete from demo34 where text test vo vo test vo persistent object stmt set string 1 vo get string value stmt execute grid frame reload data return new voresponse vo catch sqlexception ex ex print stack trace return new error response ex get message finally try stmt close conn commit catch sqlexception ex1
|
method called by the form panel to delete existing data
|
public void selected cell int row number int column index string attributed name value object persistent object system out println selected cell row number column index
|
callback method invoked when a grid cell is selected
|
public void create value object value object value object throws exception person p person value object address a new address a set country grid get selected country if a get country null a set country usa p set address a
|
callback method invoked when the user has clicked on the insert button
|
public color get background color int row string attribute name object value return new color 199 254 214
|
method used to define the background color for each cell of the grid
|
public void create value object value object value object throws exception order row discount vo d vo order row discount vo value object d vo set order year vo get order year d vo set order number vo get order number d vo set row number vo get row number
|
callback method invoked when the user has clicked on the insert button
|
public color get background color int row string attribute name object value return new color 255 222 200
|
method used to define the background color for each cell of the grid
|
public color get background color int row string attribute name object value return new color 255 249 178
|
method used to define the background color for each cell of the grid
|
public void init servlet context context hashtable xml files new hashtable xml files put en this get class get resource get path resources en xml xml files put it this get class get resource get path resources it xml factory new xmlresources factory xml files true
|
method called by the server controller controller object to initialize the factory
|
public void after init servlet context context create connection context
|
method called by the init method of controller class as last instruction
|
public void stop application client utils get data close application boolean true system exit 0
|
method used to destroy application
|
public void stop application client utils get data close application boolean true destroy try jsobject js jsobject get window this js call close frame new object catch exception ex
|
method used to destroy application
|
public response insert record value object new persistent object throws exception response response client utils get data insert detail new persistent object if response is error pk test vo new persistent object get string value grid frame reload data return response
|
method called by the form panel to insert new data
|
public void login successful map login info domain order state domain new domain orderstate order state domain add domain pair o opened order state domain add domain pair s suspended order state domain add domain pair d delivered order state domain add domain pair abc closed domains clear domains put order state domain get domain id order state domain mdiframe mdi new mdiframe this
|
method called by login dialog to notify the sucessful login
|
public response update record value object old persistent object value object persistent object throws exception response response client utils get data update detail new value object old persistent object persistent object if response is error grid frame reload data return response
|
method called by the form panel to update existing data
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.