input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
public boolean is gender valid boolean is valid false if gender null string format is valid string gender gender list true is valid true return is valid
|
validates the gender property
|
public void set dot string value dot clicked true
|
sets the decimal separator entered by the user
|
private void validate element element e namespace ns array list msgs if ns equals e get namespace if e get name equals child validate child e ns msgs if e has children list kids e get children iterator i kids iterator while i has next validate element element i next ns msgs
|
dispatches to the appropriate validation method for the
|
public void set driver class name string driver class name this driver class name driver class name
|
sets the jdbc driver class name for the pool
|
private void validate child element e namespace ns array list msgs element parent find parent e ns parent if parent null string id e get attribute value id jsp namespace validation message vm new validation message id e get qualified name must only be used with parent msgs add vm
|
validates that a child element is only used within the body of
|
public string get user name return user name null user name
|
returns the user name property value
|
public void set oper string value new oper to oper value value trim oper clicked true
|
sets the operation or entered by the user
|
private element find parent element e namespace ns string name if e get name equals name ns equals e get namespace return e element parent e get parent if parent null return find parent parent ns name return null
|
returns the closest parent element of the specified element that
|
public void set clear string value clear clicked true
|
sets the cleared flag indicating that the
|
public void set initial connections int initial connections this initial connections initial connections
|
sets the number of connections to create when the pool is
|
public connection get connection throws sqlexception if pool null create connection pool return new connection wrapper pool get connection this
|
gets a connection from the pool and returns it wrapped in
|
public void set current number string value current number value
|
sets the current number meaning the number as it
|
public void return connection connection conn pool return connection conn
|
returns a connection to the pool
|
public void init filter config config throws servlet exception this config config login page config get init parameter login page if login page null throw new servlet exception login page init parameter missing
|
reads the login page filter init parameter and saves the
|
public string get current number calc new numbers return current number new digit
|
returns the current number resulting from applying the
|
public boolean is user name valid boolean is valid false if user name null is valid true return is valid
|
validates the gender property
|
public void set current operation string value current operation to oper value value
|
sets the current operation meaning the operation that
|
public int get login timeout throws sqlexception throw new sqlexception not supported
|
always throws an sqlexception
|
public string get current operation return to oper name current operation
|
returns the current operation
|
public print writer get log writer throws sqlexception throw new sqlexception not supported
|
always throws an sqlexception
|
private boolean is authenticated http servlet request request boolean is authenticated false http session session request get session if session get attribute valid user null is authenticated true return is authenticated
|
returns true if the session contains the authentication token
|
private string get forward uri http servlet request request string buffer uri new string buffer login page uri append error msg please log in first orig url append urlencoder encode get context relative uri request return uri to string
|
returns the context relative path to the login page with the
|
public void set previous number string value previous number value
|
sets the previous number meaning the number accumulated
|
public void set login timeout int seconds throws sqlexception throw new sqlexception not supported
|
always throws an sqlexception
|
public boolean is valid return is birth date valid is email addr valid is food valid is lucky number valid is gender valid is user name valid
|
returns true if all property values have valid values
|
private string get context relative uri http servlet request request int ctx path length request get context path length string request uri request get request uri string buffer uri new string buffer request uri substring ctx path length string query request get query string if query null uri append append query return uri to string
|
returns a context relative path for the request including
|
private void create connection pool throws sqlexception try pool new connection pool driver class name url user password initial connections catch sqlexception e throw e catch exception e sqlexception sqle new sqlexception error creating pool e get class get name e get message throw sqle
|
create a connection pool based on the configuration properties
|
public string get previous number return previous number
|
returns the previous number
|
public void init throws servlet exception servlet config config get servlet config error page config get init parameter error page if error page null throw new unavailable exception error page not defined get servlet context log error page error page
|
reads the error page init parameter and saves the value in an
|
public void set reset boolean value reset value
|
sets the reset flag to clear the current number on
|
private boolean is food type selected string food type if food null return false boolean selected false for int i 0 i food length i if food i equals food type selected true break return selected
|
returns true if the food property includes the specified food
|
public boolean get reset return reset
|
returns the reset flag
|
private string to oper name int value string name switch value case add oper name break case sub oper name break case div oper name break case mult oper name return name
|
converts an operation int value to the corresponding
|
private int to oper value string name int value no oper if equals name value add oper else if equals name value sub oper else if equals name value div oper else if equals name value mult oper return value
|
converts an operation string value to the corresponding
|
public savepoint set savepoint string name throws sqlexception if is closed throw new sqlexception pooled connection is closed return real conn set savepoint name
|
calls the corresponding method on the wrapped connection
|
public void undo for int i commands length 1 i 0 i commands i undo
|
note these commands have to be done backwards to ensure proper undo functionality
|
public void initialize length constraint min constraint min max constraint max
|
configure the constraint validator based on the elements
|
public boolean is valid object value if value null return true if value instanceof string throw new illegal argument exception expected string type string string string value return tools is length between min max string
|
validate a specified value
|
private void read cheeses properties props new properties try props load cheesr application class get resource as stream cheeses properties catch ioexception e e print stack trace for object obj props key set string key obj to string only process a cheese once identified by its name if key ends with name continue key key substring 0 key index of retrieve each property value string name props get property key name string description props get property key description double price double value of props get property key price cheeses add new cheese name description price
|
reads the list of cheeses from a properties file
|
private void create components cheese cheese add new label name cheese get name add new label description cheese get description
|
creates and adds the components to the page
|
public void set cheesr request cycle boolean cheesr request cycle this cheesr request cycle cheesr request cycle
|
sets the flag that determines whether to create a cheesr
|
public boolean is cheesr request cycle return cheesr request cycle
|
gets the flag that determines whether to create a cheesr
|
public void execute file file throws sqlexception ioexception execute new file reader file
|
execute sql statements read from the given tt java
|
public void execute string sql throws sqlexception ioexception execute new string reader sql
|
execute sql statements parsed from the given tt string tt
|
public void execute url source throws sqlexception ioexception execute source open stream
|
execute sql statements read from the given tt java
|
protected void create schema string resource throws exception input stream schema get class get resource as stream resource assert assert not null resource not found resource schema connection connection sf open session connection new sql executor connection execute schema connection commit connection close
|
loads a database schema into the integration test database from the ddl
|
public object get value return new integer this value
|
gets the value as a integer instance
|
public void set value object value set value number value int value
|
sets the value from any number instance
|
public void add int operand this value operand
|
adds a value
|
public void add number operand this value operand int value
|
adds a value
|
public void subtract int operand this value operand
|
subtracts a value
|
public void subtract number operand this value operand int value
|
subtracts a value
|
public float float value return value
|
returns the value of this mutable int as a float
|
public double double value return value
|
returns the value of this mutable int as a double
|
public integer to integer return new integer int value
|
gets this mutable as an instance of integer
|
public boolean equals object obj if obj instanceof mutable int return value mutable int obj int value return false
|
compares this object to the specified object
|
public int compare to object obj mutable int other mutable int obj int another val other value return value another val 1 value another val 0 1
|
compares this mutable to another in ascending order
|
public void validate if string utils has text this file name throw new illegal argument exception file name is missing if string utils has text this mime type throw new illegal argument exception mime type is missing if this content null this content length 0 throw new illegal argument exception content is missing
|
checks that this attachment is valid
|
public int to int return this id
|
gets the id value
|
public void add recipient email address address address set email message this this recipients add address
|
adds the recipient
|
public void add attachment email message attachment attachment attachment set email message this this attachments add attachment
|
adds an attachment
|
public void validate if string utils has text this subject throw new illegal argument exception subject is missing if string utils has text this body throw new illegal argument exception body is missing this from validate if this reply to null this reply to validate for email address recipient this recipients recipient validate for email message attachment attachment this attachments attachment validate
|
checks that the message is valid
|
public void validate if string utils has text this email address throw new illegal argument exception email address is missing
|
checks that this instance is valid
|
protected void init simple throws exception do nothing
|
subclasses may override this method to perform additional initialization
|
public void activate throws illegal state exception naming exception if naming manager has initial context factory builder naming manager set initial context factory builder this activated this
|
register the context builder by registering it with the jndi naming manager
|
public void clear this bound objects clear
|
clear all bindings in this context builder
|
public void bind string name object obj this bound objects put name obj
|
bind the given object under the given name for all naming contexts
|
public initial context factory create initial context factory hashtable environment return new initial context factory public context get initial context hashtable environment return new simple naming context bound objects environment
|
simple initial context factory builder implementation
|
public void set scheduler factory class class scheduler factory class if scheduler factory class null scheduler factory class is assignable from scheduler factory class throw new illegal argument exception scheduler factory class must implement org quartz scheduler factory this scheduler factory class scheduler factory class
|
set the quartz scheduler factory implementation to use
|
public void set scheduler name string scheduler name this scheduler name scheduler name
|
set the name of the scheduler to fetch from the scheduler factory
|
public void set quartz properties properties quartz properties this quartz properties quartz properties
|
set quartz properties like org
|
public void set task executor task executor task executor this task executor task executor
|
set the spring task executor to use as quartz backend
|
private void write memory pool mxbean memory pool mxbean bean print writer writer writer append pre tt writer append name writer append bean get name writer append n writer append type writer append bean get type name writer append n writer append usage writer append bean get usage to string writer append n writer append pre tt
|
writes the memory pool mxbean information
|
public void set scheduler context as map map scheduler context as map this scheduler context map scheduler context as map
|
register objects in the scheduler context via a given map
|
public void set application context scheduler context key string application context scheduler context key this application context scheduler context key application context scheduler context key
|
set the key of an application context reference to expose in the
|
public void set job factory job factory job factory this job factory job factory
|
set the quartz job factory to use for this scheduler
|
public void set overwrite existing jobs boolean overwrite existing jobs this overwrite existing jobs overwrite existing jobs
|
set whether any jobs defined on this scheduler factory bean should overwrite
|
public void set job scheduling data location string job scheduling data location this job scheduling data locations new string job scheduling data location
|
set the location of a quartz job definition xml file that follows the
|
public void set job scheduling data locations string job scheduling data locations this job scheduling data locations job scheduling data locations
|
set the locations of quartz job definition xml files that follow the
|
public void set calendars map calendars this calendars calendars
|
register a list of quartz calendar objects with the scheduler
|
public void set triggers trigger triggers this triggers arrays as list triggers
|
register a list of trigger objects with the scheduler that
|
public void set scheduler listeners scheduler listener scheduler listeners this scheduler listeners scheduler listeners
|
specify quartz scheduler listeners to be registered with the scheduler
|
public void set global job listeners job listener global job listeners this global job listeners global job listeners
|
specify global quartz job listeners to be registered with the scheduler
|
public void set job listeners job listener job listeners this job listeners job listeners
|
specify named quartz job listeners to be registered with the scheduler
|
public void set global trigger listeners trigger listener global trigger listeners this global trigger listeners global trigger listeners
|
specify global quartz trigger listeners to be registered with the scheduler
|
public void set trigger listeners trigger listener trigger listeners this trigger listeners trigger listeners
|
specify named quartz trigger listeners to be registered with the scheduler
|
public void set auto startup boolean auto startup this auto startup auto startup
|
set whether to automatically start the scheduler after initialization
|
public void set startup delay int startup delay this startup delay startup delay
|
set the number of seconds to wait after initialization before
|
public void set wait for jobs to complete on shutdown boolean wait for jobs to complete on shutdown this wait for jobs to complete on shutdown wait for jobs to complete on shutdown
|
set whether to wait for running jobs to complete on shutdown
|
private void populate scheduler context throws scheduler exception put specified objects into scheduler context if this scheduler context map null this scheduler get context put all this scheduler context map register application context in scheduler context if this application context scheduler context key null if this application context null throw new illegal state exception scheduler factory bean needs to be set up in an application context to be able to handle an application context scheduler context key this scheduler get context put this application context scheduler context key this application context
|
expose the specified context attributes and or the current
|
private boolean add job to scheduler job detail job detail throws scheduler exception if this overwrite existing jobs this scheduler get job detail job detail get name job detail get group null this scheduler add job job detail true return true else return false
|
add the given job to the scheduler if it doesnt already exist
|
public void destroy throws scheduler exception logger info shutting down quartz scheduler this scheduler shutdown this wait for jobs to complete on shutdown
|
shut down the quartz scheduler on bean factory shutdown
|
public void set max retry count int max retry count this max retry count max retry count
|
specifies how many time to retry defaults to three
|
protected void on set up throws exception super on set up db unit helper new db unit helper get class ds schema name string initial data set get initial data set if initial data set null clean insert initial data set
|
initializes the database
|
protected string get initial data set return null
|
subclasses can override to specify a dbunit dataset to initialize the
|
protected object get bean string name class type return web application context utils get required web application context sc get servlet context get bean name type
|
gets the bean from the web application context
|
protected void assert class mapping class type string table name this type type class mapping get configuration get class mapping type get name if table name equals class mapping get table get name throw new class mapping exception type table name class mapping get table get name
|
verify that the class is mapped to the specified table
|
public void quit m should quit true
|
quit the connection that is close it down and return
|
public void accept visitor v v visit constant unicode this
|
called by objects that are traversing the nodes of the tree implicitely
|
public void on module load final text field text field1 new text field name1 label1 30 final text field text field2 new text field name2 label2 60 final form test form new form form label align top form button align left test form add field text field1 test form add field text field2 test form end test form render dom get element by id slot1
|
this is the entry point method
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.