input
stringlengths
10
828
output
stringlengths
5
107
public void add type class bean class method key getter method method key setter method class home class class object class boolean leave trail boolean server cacheable boolean client cacheable throws invocation target exception illegal access exception no such method exception instantiation exception add type bean class key getter method key setter method home class object class leave trail this instanceof server container server cacheable this instanceof client container client cacheable adding legacy false
adds a recognised bean type to this cache
public void show section string section name if hidden sections null string tokenizer tokenizer new string tokenizer map null to empty get property hidden sections hidden sections new hash set while tokenizer has more tokens hidden sections add tokenizer next token hidden sections remove section name else hidden sections remove section name
unhides the named section
public void println char s boolean escape synchronized lock print s escape super println at start of line true
print an array of characters and then terminate
public void println string s synchronized lock print s super println at start of line true
print a string and then terminate the line
public void view edit field string field name if view only fields null string tokenizer tokenizer new string tokenizer map null to empty get property view only fields view only fields new hash set while tokenizer has more tokens view only fields add tokenizer next token view only fields remove field name else view only fields remove field name
allows the named field
private void validate session session entity bean session login entity bean login throws security exception if login null throw new security exception not logged in
checks that a user is logged in correctly before allowing a session
public void println string s boolean escape synchronized lock print s escape super println at start of line true
print a string and then terminate the line
protected void passivate beans and obscure sensitive information collection responses iterator responses iterator responses iterator while responses iterator has next response response response responses iterator next if response instanceof multi bean response iterator beans iterator multi bean response response get results iterator while beans iterator has next server container passivate entity bean entity bean beans iterator next else if response null server container passivate entity bean response get result
passivates beans in the supplied collection of commands and
public void view only field string field name if view only fields null string tokenizer tokenizer new string tokenizer map null to empty get property view only fields view only fields new hash set while tokenizer has more tokens view only fields add tokenizer next token view only fields add field name else view only fields add field name
disallows edits for the named field
public void println object o synchronized lock print o super println at start of line true
print an object and then terminate the line
public void println object o boolean escape synchronized lock print o escape super println at start of line true
print an object and then terminate the line
public void add historic command type string abstract bean class qualified name throws invocation target exception illegal access exception no such method exception instantiation exception if this instanceof server container add type later abstract bean class qualified name long sequence no false false false deferred historic command list add abstract bean class qualified name
adds a historic command bean type to this container if required
public string get server dump filename return get message
suggests the name of the file to write the thread dumps to
public void close synchronized this if connections null close connections connections null synchronized reaper reaper notify
throws away all pooled connections and marks this
private string list collection strings string delimiter return strings list strings delimiter
internal convenience method to make a delimited list
public string get field error message string field name return get property introspector decapitalize field name error message
gets the error message
public string get abstract name return get abstract name for entity bean class bean class
internal utility method to get the abstract name for this bean type
protected string list qualified fields for entity beans collection prototype beans return list build qualified field list for entity beans prototype beans
internal utility method to make a comma delimited list of fields for several
public void set field error message string field name string message set property introspector decapitalize field name error message message
sets the error message
private collection build qualified field list for entity beans collection prototype beans collection field list new vector iterator beans iterator prototype beans iterator while beans iterator has next class bean class iterator methods iterator collection bean class method table get bean class beans iterator next get class iterator build qualified field list field list methods iterator get table name for entity bean class bean class return field list
internal utility method to make a list of fields for several entity beans
public string get package name return get package name for entity bean class bean class
internal utility method to get the parent package name for this bean type
public boolean reset field error message string field name if field name null iterator iterator key set iterator boolean removed false while iterator has next string name string iterator next if name ends with error message removed remove name null return removed else return remove introspector decapitalize field name error message null
resets the error message
protected void advance current cursor throws sqlexception if on row stack push new boolean false underlying object next on on else if on2 row stack push new boolean true underlying object2 next on2 on2
internal method to step forward the result set cursor
public boolean is searchable field string field name if non searchable fields null string tokenizer tokenizer new string tokenizer map null to empty get property non searchable fields non searchable fields new hash set while tokenizer has more tokens non searchable fields add tokenizer next token return non searchable fields contains field name else return non searchable fields contains field name
returns true if the named field
public void non search field string field name if non searchable fields null string tokenizer tokenizer new string tokenizer map null to empty get property non searchable fields non searchable fields new hash set while tokenizer has more tokens non searchable fields add tokenizer next token non searchable fields add field name else non searchable fields add field name
prevents the named field
public void search field string field name if non searchable fields null string tokenizer tokenizer new string tokenizer map null to empty get property non searchable fields non searchable fields new hash set while tokenizer has more tokens non searchable fields add tokenizer next token non searchable fields remove field name else non searchable fields remove field name
allows the named field
protected string list update fields and values for entity bean entity bean bean map insertion list throws ejbexception return list build field and value list for entity bean bean insertion list false
internal utility method to make a comma delimited list of field assignments
public void rearrange grid string field name int first bit int last bit int start column int columns set property introspector decapitalize field name grid first bit first bit set property introspector decapitalize field name grid last bit last bit set property introspector decapitalize field name grid start column start column set property introspector decapitalize field name grid columns columns
alters the dynamic properties
public int get first bit for grid string field name string s get property introspector decapitalize field name grid first bit if s null return 0 else return integer parse int s
for the specified grid control
protected boolean retreat current cursor throws sqlexception if row stack empty if boolean row stack pop boolean value underlying object previous absolute if debugging database send message identifier unread from lhs else underlying object2 previous absolute2 if debugging database send message identifier unread from rhs return true else on false on2 false in2 false off result set true if debugging database send message identifier at start of result set return false
internal method to step back the underlying result set cursor
protected response cache response command command response response synchronized throw on null response cache entity bean bean command get entity bean response cache put command new soft reference response if bean null message cached response for command verb present tense get abstract name for entity bean bean s response cache bean class list add bean get class else message cached response for command verb present tense return response
internal utility method which records the data we send to users
public int get last bit for grid string field name string s get property introspector decapitalize field name grid last bit if s null return 0 else return integer parse int s
for the specified grid control
protected string get primary key constraint entity bean bean map insertion list throws ejbexception try return get primary key constraint bean get key getter for entity bean bean invoke bean null insertion list catch invocation target exception bean failure throw new ejbexception exception thrown by primary key getter for get abstract name for entity bean bean bean failure catch illegal access exception bean failure throw new ejbexception primary key getter for get abstract name for entity bean bean of inappropriate access bean failure
internal utility method to make a primary key constraint for an entity bean
public int get start column for grid string field name string s get property introspector decapitalize field name grid start column if s null return 0 else return integer parse int s
for the specified grid control
public int get columns in grid string field name string s get property introspector decapitalize field name grid columns if s null return 1 else return integer parse int s
for the specified grid control
public local home get home return local home throw on null home interface table get bean class get abstract name for entity bean class bean class
get the home interface implementation instance for this bean type
protected string get compound constraint collection constrained fields map insertion list throws ejbexception message first part searching on fields return string empty message list build compound constraint new vector insertion list constrained fields iterator and
internal utility method to make a list of the field equality tests
public class get object class return class throw on null object class table get bean class get abstract name for entity bean class bean class
get the component interface implementation for this bean type
protected entity bean get cached entity bean entity bean bean object primary key throws ejbexception entity bean cached bean super get cached entity bean bean primary key try cached bean ejb activate catch remote exception remote failure return cached bean
internal method to attempt to find a cached instance of a
public string to string return get package name get abstract name
returns a string representation of this bean type
protected string list orphaned fields collection orphaned fields map orphaned fields map return list build orphaned field list orphaned fields orphaned fields map
internal utility method to make a comma delimited list of orphaned fields
protected entity bean cache entity bean entity bean bean boolean recurse throws ejbexception if recurse return cache entity bean bean else return bean
internal method to keep a reference to the thin entity bean
public type record get type string table name class bean class class throw on null table name to bean class mapping get table name table name return new type record bean class
extract the type record for a table in the database schema
private collection build orphaned field list collection orphaned fields map orphaned fields map collection field list new vector iterator orphaned fields iterator orphaned fields iterator while orphaned fields iterator has next string orphaned field name string orphaned fields iterator next field list add orphaned fields map get orphaned field name as orphaned field name return field list
internal utility method to make a list of orphaned fields based on the
public void update row throws sqlexception super update row
updates the current row of the difference result set
public void delete row throws sqlexception super delete row
deletes the current row of the difference result set
public void refresh row throws sqlexception super refresh row
refreshes the current row of the difference result set
public type record get type ignore case string table name class bean class class table name to bean class mapping get throw on null table name lcto table name mapping get table name to lower case table name return new type record bean class
extract the type record for a table in the database schema
protected integer get indistinct count list distinct values map indistinct rows count table return integer indistinct rows count table contains key distinct values indistinct rows count table get distinct values new integer 0
returns the number of indistinct copies of a registered distinctive key
public entity bean passivate entity bean entity bean bean boolean recurse throws ejbexception try if bean null bean ejb passivate if recurse passivate entity bean relatives bean in early versions of caching a cached copy of each bean was kept for each response this is not the correct behaviour in the case of some commands e g remove and may not desirable in the case of others catch remote exception remote failure return bean
the immediate action of this method is to passivate a bean
private string equality operator object value boolean in conditional if in conditional return equality operator value else return
internal utility method to return the right sql equality operator for
public collection get all types collection all types new vector iterator bean class iterator table name to bean class mapping key set iterator while bean class iterator has next all types add get type string bean class iterator next return all types
obtain a list of all type records for known entity bean types
private string equality operator object value if value null value equals null return is if value instanceof string string value index of 1 return like if value instanceof nullable string value to string index of 1 return like else return
internal utility method to return the right sql equality operator for
public connection get connection throws sqlexception if url null throw new unsupported operation exception cannot access database directly from client else return driver manager get connection mr connection driver url prefix url user and password
gets a fresh connection to this database
public void release connection connection connection throws sqlexception if connection null connection close
releases an existing connection to this database
public boolean contains database wildcards string string content return contains database wildcards string content
returns true if the given string contains the multiple or single
public string convert to default database wildcards string string content return convert database wildcards string content
returns the given string with all occurences of the multiple or
public string convert from default database wildcards string string content return convert database wildcards string content
returns the given string with all occurences of the and
protected collection build method list class c method methods return build method list c methods null null null
internal method to build a list of getter and setter
protected boolean requires database connection command command synchronized throw on null response cache return command instanceof find command response cache contains key command command instanceof create command command instanceof select command response cache contains key command command instanceof join command command instanceof load command response cache contains key command command instanceof store command command instanceof remove command
internal utility function to determine if a particular command is likely to
public void set messenger messenger messenger boolean debugging this messenger messenger this debugging debugging
sets up a messenger to which commentary on operations is to be sent
protected string translate name string internal name boolean add underscores if add underscores return strings wordify internal name else return internal name
adds underscores into an internal name in order to turn it into
protected object send message string prefix string suffix object message return messenger debug message prefix suffix message
makes a commentary statement
protected object send message first part object message return messenger debug message first part message
makes the beginning a commentary statement
protected object send message part object message return messenger debug message part message
makes an internal part of a commentary statement
protected collection translate names collection names boolean add underscores if add underscores iterator internal names iterator names iterator set database names new linked hash set names size while internal names iterator has next string internal name string internal names iterator next internal names iterator remove database names add strings wordify internal name names add all database names return names
adds underscores into internal names in order to turn them
protected object send message last part object message return messenger debug message last part message
makes the ending of a commentary statement
private boolean validate try connection get meta data catch exception e return false return true
attempts to make use of the connection to
public void lock if lock super hash code lock lock
prevents this connection from being
protected string get table name for entity bean entity bean bean class bean class bean get class return get table name for entity bean class bean class
internal utility method to convert a bean token to a table name
protected collection build full method list method methods collection method list new tree set new method comparator for int i 0 i methods length i method list add methods i return method list
internal method to build a complete list of methods in a class
protected string get table name for entity bean class class bean class return translate name strings after last bean class get name substring 4 underscore list contains bean class
internal utility method to convert a bean class to a table name
public void load types throws class not found exception invocation target exception illegal access exception instantiation exception iterator bean class name iterator deferred key type name table key set iterator while bean class name iterator has next string bean class name string bean class name iterator next load type for name bean class name
forces the loading of bean types whose loading was deferred
protected void record modified entity bean bean synchronized session table try modified queue add new identifier get table name for entity bean bean comparable get key getter for entity bean bean invoke bean null modified queue length catch invocation target exception bean failure catch illegal access exception bean failure catch null pointer exception bean failure
this internal method is used to record that a bean has
protected purge response purge modified queue synchronized session table identifier first while modified queue length 0 modified queue length maximum modified queue length identifier modified queue get 0 older than client cached bean lifetime modified queue remove 0 head modified sequence no modified queue length return new purge response head modified sequence no modified queue
this method removes items from the head of the modified
public local home get home for entity bean entity bean bean return local home load type on null bean home interface table get bean get class true
get the home interface implementation corresponding to beans
protected void foreshadow int count iterator historic command home list iterator historic command pool table key set iterator while historic command home list iterator has next historic command pool command pool historic command pool historic command pool table get historic command home list iterator next command pool foreshadow count
forshadows the future claim on this thread of a specified
public local home get home for bean object ejblocal object bean object return local home home interface table get throw on null bean class table get bean object get class
get the home interface implementation corresponding to beans
protected void discharge iterator historic command home list iterator historic command pool table key set iterator while historic command home list iterator has next historic command pool command pool historic command pool historic command pool table get historic command home list iterator next command pool discharge
discharges any outstanding claims on this thread of
public void close throws sqlexception underlying object close underlying object2 close
simultaneously closes both underlying result set objects
public void init string name daemon container container if status status none status status initialized this name name this container container status status initialized else throw new illegal state exception cannot reinitialize daemon once started or destroyed
initialize the server daemon
protected entity bean populate entity bean with record entity bean bean result set set boolean recurse throws ejbexception iterator methods iterator collection bean class method table get bean get class iterator return entity bean populate component with record bean set new mutable integer 1 methods iterator recurse
internal utility method to fill up an entity bean with field values
protected string get last update user from record entity bean bean result set set throws ejbexception iterator methods iterator collection bean class method table get bean get class iterator return get last update user from record bean set new mutable integer 1 methods iterator
internal utility method to retrieve the value of the last update username
public void execute retrieve method calls for bean object bean wrapper bean object throws ejbexception
internal utility method to invoke methods starting
public void update row throws sqlexception result set chosen result set in2 underlying object2 underlying object map chosen indistinct rows count table in2 indistinct rows count table2 indistinct rows count table list chosen values get values chosen result set ordered field names in order in2 empty2 empty remove distinct field values chosen values chosen indistinct rows count table if in2 underlying object update row else underlying object2 update row add distinct field values chosen values chosen indistinct rows count table
updates the current row of the union result set
private class get key type for bean class class bean class return method key getter table get bean class get return type
internal utility method to extract the primary key field type
public void delete row throws sqlexception result set chosen result set in2 underlying object2 underlying object map chosen indistinct rows count table in2 indistinct rows count table2 indistinct rows count table list chosen values get values chosen result set ordered field names in order in2 empty2 empty remove distinct field values chosen values chosen indistinct rows count table if in2 underlying object delete row else underlying object2 delete row
deletes the current row of the union result set
public collection execute retrieve method calls for bean objects collection bean objects throws ejbexception return bean objects
internal utility method to invoke methods starting
private class get field type for entity bean entity bean bean string field name throws no such method exception return bean get class get method get field name null get return type
internal utility method to extract the the field type of a
public method get key getter for entity bean entity bean bean return method throw on null key getter table get bean get class get abstract name for entity bean bean
internal method to get a thin beans primary key getter method
public void refresh row throws sqlexception result set chosen result set in2 underlying object2 underlying object map chosen indistinct rows count table in2 indistinct rows count table2 indistinct rows count table list chosen values get values chosen result set ordered field names in order in2 empty2 empty remove distinct field values chosen values chosen indistinct rows count table if in2 underlying object refresh row else underlying object2 refresh row add distinct field values chosen values chosen indistinct rows count table
refreshes the current row of the union result set
protected method get key setter for entity bean entity bean bean return method throw on null key setter table get bean get class get abstract name for entity bean bean
internal method to get a thin beans primary key setter method
protected entity bean get pooled entity bean entity bean bean throws ejbexception return get pooled entity bean bean false
internal method to request a pooled thin entity bean of the specified type
public string login string username return string message attempted login from username
called by the command servlet to indicate that a login is being validated
public string login failure string why message why return why
called by the command servlet to indicate that a login was rejected
public void end request string detail thread current thread thread current thread object log buffer synchronized thread logging table log buffer thread log table remove current thread thread logging table remove current thread thread request date table remove current thread thread request detail table remove current thread if log buffer null message part log buffer to string
called by the command servlet to indicate that a request has been processed
protected entity bean get cached entity bean entity bean bean object primary key throws ejbexception class bean class bean get class synchronized throw on null bean cache reference cached bean reference reference map throw on null bean cache get bean class get abstract name for entity bean class bean class get primary key entity bean cached bean cached bean reference null entity bean cached bean reference get null if cached bean null throw new ejbexception bean is not in local cache return cached bean
internal method to attempt to find a cached instance of a
public void shutdown super shutdown response cache null response cache bean class list new hash set synchronized reaper2 reaper2 notify close log
called by the command servlet when it is shutting down
protected boolean is cached entity bean entity bean bean object primary key throws ejbexception if primary key null return false else class bean class bean get class synchronized throw on null bean cache reference cached bean reference reference map throw on null bean cache get bean class get abstract name for entity bean class bean class get primary key return cached bean reference null cached bean reference get null false
internal method to check if there is a cached instance of a
protected void record modified entity bean bean
this internal method is used to record that a bean has