input
stringlengths
10
828
output
stringlengths
5
107
public void set no days int no days this no days no days
sets the no days attribute of the rent car jb object
public string get hourly rate return hourly rate
gets the hourly rate attribute of the rent car jb object
public string get daily rate return daily rate
gets the daily rate attribute of the rent car jb object
public string get weekly rate return weekly rate
gets the weekly rate attribute of the rent car jb object
public int get no days return no days
gets the no days attribute of the rent car jb object
public void set car type state holder car type state holder sh set daily rate sh get daily rate set hourly rate sh get hourly rate set weekly rate sh get weekly rate set number sh get number setpk sh getpk
sets the car type state holder attribute of the car type bean object
public void setpk string pk this pk pk
sets the primany key value
public void set entity context entity context context throws remote exception ejbexception ctx context
sets the entity context attribute of the car type bean object
public car type state holder get car type state holder car type state holder c typesh new car type state holder pk hourly rate daily rate weekly rate number return c typesh
gets the car type state holder attribute of the car type bean object
public string getpk return pk
gets the primary key value
public void unset entity context throws remote exception ejbexception ctx null
description of the method
public void ejb activate throws remote exception ejbexception
description of the method
public void ejb passivate throws remote exception ejbexception
description of the method
public void ejb remove throws remote exception ejbexception
description of the method
public void ejb store throws remote exception ejbexception
description of the method
public void ejb load throws remote exception ejbexception
description of the method
public string ejb create car type state holder sh throws create exception ejbexception remote exception sqlexception set car type state holder sh return null
description of the method
public void ejb post create car type state holder sh throws create exception ejbexception remote exception sqlexception
description of the method
public string set reservation reservation state holder reservation string res id null system set property java naming factory initial org jnp interfaces naming context factory system set property java naming provider url localhost 1099 try context initial new initial context reservation home res home reservation home portable remote object narrow initial lookup reservation bean reservation home class res id get unique res no re setting the reservation number here reservation set reservation number res id reservation r res home create reservation catch exception e e print stack trace return res id
sets a reservation
public customer state holder get customer state holder person person new person name aname new name this name address aaddress new ukaddress this address this address person set name aname person set address aaddress customer state holder csh new customer state holder person card no version return csh
returns a customer state holder value object containing all customer attributes
public void remove customer string custname system set property java naming factory initial org jnp interfaces naming context factory system set property java naming provider url localhost 1099 try context initialb new initial context customer home cus home customer home portable remote object narrow initialb lookup customer bean customer home class customer remote customer cus home find by primary key custname customer remove catch exception e e print stack trace
removes the customer with the given name
public void set version int new version number version new version number
sets the version number of the customer
public void set reservation number string resnum reservation number resnum
sets the reservation stuff
public void set start date string new start date start date new start date
sets the start date
public string ejb create reservation state holder rsh set reservation state holder rsh system err print hello1 return null
creates a reservation
public reservation state holder get reservation state holder return new reservation state holder reservation number get start date get end date car type customer name
returns the state holder object associated with this reservation
public void set reservation state holder reservation state holder rsh reservation number rsh get reservation number set start date rsh get start date set end date rsh get end date car type rsh get car type customer name rsh get customer name
sets up a state holder containing details of the reservation
static public test suite test suite suite new test suite test package test suite suite add test test valtech research car rental service reservation agent impl reservation agent bean test class return suite
creates a suite of test cases
static public test suite test suite suite new test suite test package test suite suite add test test valtech research car rental business customer impl test customer ejb class return suite
creates a suite of test cases
public void reset action mapping mapping http servlet request request this username null
reset all properties to their default values
public void reset action mapping mapping http servlet request request name null address null card num null
reset all properties to their default values
public void reset action mapping mapping http servlet request request name null car type null start date null end date null res no 0
reset all properties to their default values
public variable definition get by name final string variable name throws data exception int index get index by name variable name if index 0 throw new data exception data exception unknown variable unknown variable variable name return this m variables index
returns the variable definition for the variable with the given name
public double data set get y return this m y
returns the number of dependent variables contained in the integration result
public record record final record r if this m variables equals r get variables throw new runtime exception incompatible records record nr r clone this m records add nr return nr
appends the values contained in the given record to the data set
public double get last x int s this m x size if s 0 return this m x get this m x size 1 else return 0
returns the independent variables last recorded value
public record record final double values if this m variables get count values length throw new runtime exception incorrect value count record r new record this m variables r set values values this m records add r return r
records the given variable values
public int get record count return this m records size
returns the number of records in the set
public record append record r new record this m variables this m records add r return r
appends an empty record to the dataset and returns a reference to it
public void set values final double values int n this m values length if values length n throw new runtime exception incorrect number of values for int i 0 i n i this m values i values i
copies the values contained in the given array into the record
public series define series final string x var final string y var return new series this x var y var
returns a 2 d series for the given x y variable pair
public void set initial vector value by name final string variable name x final string variable name y final string variable name z final vec4 value this m values find variable variable name x value x this m values find variable variable name y value y this m values find variable variable name z value z
shorthand for setting the components of a vector for given variable names
public void set value by name final string variable name final double value this m values find variable variable name value
shorthand for setting the value of a variable by its name
public string to string return string format s this m name
returns the variable name
public double get value by name final string variable name return this m values find variable variable name
shorthand for getting the value of a variable by its name
public mesh clean mesh m throws clone not supported exception mesh c mesh m clone merge lines merge lines c 0 0 zero tolerance for first pass merge lines c 2 double this m h second pass merge lines c 6 double this m h third pass return cull empty lines c
clean up the given mesh and return the result
public void get cartesian orbit vec4 position vec4 velocity double t double u bodies earth get mass constants g orbital mechanics calc ecicartesian from elements position velocity u this m a this m e this m i this m w this m o this m t0 t
calculates position and velocity in cartesian coordinates for the given time t
public mesh to spherical mesh m double r throws clone not supported exception mesh s mesh m clone for int i 0 i m get vertex count i vec4 p s get vertex position by index i double lat math pi 2 0 p y math pi double lon p x 2 0 math pi double y r math sin lat double r r math cos lat double x r math cos lon double z r math sin lon vec4 t this m laf create vector x y z s set vertex position by index i t return s
projects a planar mesh in 0
public double get standard gravitational parameter return this m u
returns the standard gravitational parameter u
public double get drag final double fluid density final double velocity return 0 5 fluid density velocity velocity this m product
implements rayleighs drag formula according to a href http en
protected void apply force local double x vec4 f vec4 t vec4 local force vec4 local point vec4 k a lin alg factory laf local point get factory vec4 normal laf normalize vector local force k a laf calculate cross product local point normal k a scale local force get length t assign k a vec4 world force this m target get body get transform transform vector local force f assign world force
calculates f and t based on the given local force and local application
protected void update current air column height this fcurrent air column height calc air column height this ftemperature this fsurface gravity this fmolecular weight
updates the air column height according to the internal state of the atmosphere
protected face retrieve int index return new face impl this m mesh index
returns a new vertex instance for the vertex at the given index
public face list impl transform mesh mesh face list impl list new face list impl mesh for int i 0 i get count i mesh add triangle this m indizes i 0 this m indizes i 1 this m indizes i 2 this m edges i 0 this m edges i 1 this m edges i 2 this m colors i return list
returns a transformed face list for use in the given mesh
public int register line line line if this m line count this m lines length line di new line this m lines length 2 for int i 0 i this m line count i di i this m lines i this m lines di this m lines this m line count line return this m line count return index not count post increment
adds the given line to the list
public line list impl transform mesh mesh line list impl list new line list impl mesh for int i 0 i get count i line l this m lines i line l2 mesh add line l2 set capacity l get vertex count for int p 0 p l get vertex count p l2 add point l get vertex index by index p return list
returns a transformed line list for use in the given mesh
protected double determinant3 double v this e return v 0 v 5 v 10 v 9 v 6 v 1 v 4 v 10 v 8 v 6 v 2 v 4 v 9 v 8 v 5
calculates the determinant of the 3x3 matrix starting on row 0 and column
protected matrix4 impl sub int i int j int idst 0 int jdst 0 matrix4 impl result new matrix4 impl double v this e double rv result get values for int ti 0 ti 3 ti if ti i idst ti else if ti i idst ti 1 for int tj 0 tj 3 tj if tj j jdst tj else if tj j jdst tj 1 if ti i tj j rv idst 4 jdst v ti 4 tj return result
returns a 3x3 sub matrix starting at the given row and column
protected double sub determinant int i int j matrix4 impl msub3 sub i j return msub3 determinant3
calculates the determinant of the 3x3 sub matrix starting at row i and
public void conjugate this m q 0 1 0 this m q 1 1 0 this m q 2 1 0
conjugates the quaternion
public void invert conjugate
inverts the quaternion which is an alias to its conjugation
public void scale angle final double scale factor double d get rotation angle d 3 scale factor quaternion r quaternion impl from axis and angle new vec4 impl d d 3 assign r
scales the rotation angel of the quaternion by the given scale factor
public void scale final double scalar this m v 0 this m v 0 scalar this m v 1 this m v 1 scalar this m v 2 this m v 2 scalar
updates the vector with the product of itself and the given scalar
public void multiply final vec4 second double bv second get values this m v 0 bv 0 this m v 1 bv 1 this m v 2 bv 2
updates the vector with the product of itself and the given vector
public double get length squared return this m v 0 this m v 0 this m v 1 this m v 1 this m v 2 this m v 2
returns the squared length of the vector
protected double determine tick frequency final double range double o 1 while o range o 10 o 10 if range o 5 o 5 return o
determines the tick order for the given scale range
override protected void startup show new ora gen view this
at startup create and show the main frame of the application
public void start bundle context context throws exception super start context session factory factory new org hibernate cfg configuration configure build session factory session session factory open session this session session system out println session start dao new hibernate entity daoimpl dao set session session product service new product service impl product service set dao dao company service new company service impl company service set dao dao document service new document service impl document service set dao dao major pos point of sale dao load by id point of sale class new long 1
this method is called upon plug in activation
public void clear batch throws sqlexception if batch null batch clear
empties this statement objects current list of sql commands
public void clear warnings throws sqlexception warnings null
clears all the warnings reported on this statement object
public void close throws sqlexception results close results null warnings null connection null is closed true
releases this statement objects database and jdbc resources immediately instead of waiting for
public boolean execute string sql throws sqlexception return execute sql no generated keys
executes the given sql statement which may return multiple results
public result set execute query string sql throws sqlexception execute sql return get result set
executes the given sql statement which returns a single result set object
public result set get result set throws sqlexception return results
retrieves the current result as a result set object
public sqlwarning get warnings throws sqlexception return warnings
retrieves the first warning reported by calls on this statement object
public void set escape processing boolean enable throws sqlexception this should be taken care of by the underneath driver
sets escape processing on or off
public void init client throws ioexception object input stream constructor is blocked until the corresponding object output stream has written and flushed the serialization header this happen when a flush is called after the object output stream is constructed hence the client and the server should not create these two objects in the same order object input stream new object input stream socket get input stream object output stream new object output stream socket get output stream object output stream flush
client application must call this method soon after constructing the jdbcstream interface
public void init server throws ioexception object input stream constructor is blocked until the corresponding object output stream has written and flushed the serialization header this happen when a flush is called after the object output stream is constructed hence the client and the server should not create these two objects in the same order object output stream new object output stream socket get output stream object output stream flush object input stream new object input stream socket get input stream
server application must call this method soon after constructing the jdbcstream interface
private string get resource string url int tmp url last index of int start url last index of if start tmp return url substring start 1 else return
method to extract the resource name from the url
public boolean absolute int row throws sqlexception int raw count tuples length if raw count 0 if current position 1 current position 1 int position current position row raw count if position 0 position raw count position current position position return true else return false
moves the cursor to the given row number in this result set object
public void cancel row updates throws sqlexception not supported
cancels the updates made to the current row in this result set object
public void close throws sqlexception todo need to figure out what to do here
releases this result set objects database and jdbc resources immediately instead of
public int find column string column name throws sqlexception return column map get column name int value
maps the given result set column name to its result set column index
public boolean first throws sqlexception if tuples length 0 current position 1 return true else return false
moves the cursor to the first row in this result set object
public int get concurrency throws sqlexception return statement get result set concurrency
retrieves the concurrency mode of this result set object
public string get cursor name throws sqlexception not supported return null
retrieves the name of the sql cursor used by this result set object
public int get fetch direction throws sqlexception return fetch direction
retrieves the fetch direction for this result set object
public result set meta data get meta data throws sqlexception not supported return null
retrieves the number types and properties of this result set objects columns
public int get row throws sqlexception return current position
retrieves the current row number
public int get type throws sqlexception return statement get result set type
retrieves the type of this result set object
public boolean last throws sqlexception if tuples length 0 current position tuples length return true else return false
moves the cursor to the last row in this result set object
public void move to current row throws sqlexception no op
moves the cursor to the remembered cursor position usually the current row
public void move to insert row throws sqlexception not supported
moves the cursor to the insert row
public boolean next throws sqlexception if current position after last current position after last return false else return true
moves the cursor down one row from its current position
public boolean previous throws sqlexception if current position before first current position before first return false else return true
moves the cursor to the previous row in this result set object
public void refresh row throws sqlexception not supported
refreshes the current row with its most recent value in the database
public boolean relative int rows throws sqlexception if tuples length 0 return false current position rows if current position before first current position before first else if current position after last current position after last return true
moves the cursor a relative number of rows either positive or negative
public void update array int column index array array throws sqlexception not supported
updates the designated column with a java
public void update array string column name array array throws sqlexception update array find column column name array
updates the designated column with a java
public void update big decimal int column index big decimal value throws sqlexception not supported
updates the designated column with a java