input
stringlengths
10
828
output
stringlengths
5
107
public void set requesting user int uid m user id uid
set the user id of requester
public int get requesting user return m user id
uid of requesting user
public void set field distinct string short name string field name boolean flag throws dbexception dbobject one obj dbobject my dbobjects get short name if one obj null string my name this class set field distinct string string boolean throw new dbexception my name no such object as short name one obj set field distinct field name flag
specify a field to be retieved uniquely froma component dbobject
public string get history table class name return this get class get name history
the assumption here is that the history table dbobject is called
public void set value string value this value string util not null value get value
sets the real value of the valid value
public void set description string description this description string util not null description get description
sets the real description of the valid value
public string canonize string schema class string prefix return canonize schema class locale get default prefix
this is method will attempt to convert the
public string canonize string schema class locale locale string prefix system out println isovalid value canonize schema class locale prefix string key prefix null prefix description description string result null try result messages get string schema class locale key new object 0 system out println key key result result if result null description result catch illegal argument exception iae silently ignore exception message no such key com jcorporate eforum search last day in bundle at com jcorporate eforum log warn no such key key found in schema bundle at schema class result null return result
this is method will attempt to convert the
public string canonize request context request string schema class string prefix system out println isovalid value canonize request context request schema class prefix string key prefix null prefix description description string result null try result messages get string schema class request get locale key new object 0 system out println key key result result if result null description result catch illegal argument exception iae silently ignore exception message no such key com jcorporate eforum search last day in bundle at com jcorporate eforum log warn no such key key found in schema bundle at schema class result null return result
this is method will attempt to convert the
public void set requesting uid int new uid uid new uid
new version of set user to to speak
public int get requesting uid return uid
new version of set user returns the integer uid of the
public string get user name throws dbexception user u new user u set uid uid u set data context this get data context if u find return u get login name return no such user get user name
return the name of the user currently accessing this object
public int get system uid return secured dbobject system account
retrieve the uid of the system account
protected void check delete detail perm dbobject obj throws dbexception obj check allowed d
extracted for subclasses checking
protected string denotes range string field value return range verifier denotes range field value denotes range string
does a given field value denote a range
public void copy attributes dbobject return obj throws dbexception super copy attributes return obj if return obj instanceof secured dbobject secured dbobject return obj set requesting uid get requesting uid
this method should make sure that the return obj
public dbobject assemble object string short name throws dbexception dbobject result null dbobject model get dbobject short name result model new instance for iterator iterator model get meta data get all fields map values iterator iterator has next dbfield one field dbfield iterator next try result set field one field get name this get field short name one field get name catch dbexception e we don t care if get field throws it will do so if there is nothing retrieved for this field return result
assumes retrieval from db has occurred
public boolean can requester read throws dbexception boolean result false int user id this get requesting uid if user id system account return true user user new user user set uid user id user set data context this get data context if user find throw new dbexception cannot find requesting user with id get requesting uid if user is admin return true try this is allowed search result true catch exception e result false return result
determine if get requesting uid has rights to read this kind of object
public boolean can requester add throws dbexception boolean result false int user id this get requesting uid if user id system account return true user user new user user set uid user id user set data context this get data context if user find throw new dbexception cannot find requesting user with id get requesting uid if user get login name equals user admin user return true try this is allowed add result true catch exception e result false return result
determine if get requesting uid has rights to add this kind of object
public boolean can requester delete throws dbexception boolean result false int user id this get requesting uid if user id system account return true user user new user user set uid user id user set data context this get data context if user find throw new dbexception cannot find requesting user with id get requesting uid if user get login name equals user admin user return true try this is allowed delete result true catch exception e result false return result
determine if get requesting uid has rights to delete this kind of object
public boolean can requester update throws dbexception boolean result false int user id this get requesting uid if user id system account return true user user new user user set uid user id user set data context this get data context if user find throw new dbexception cannot find requesting user with id get requesting uid if user get login name equals user admin user return true try this is allowed update result true catch exception e result false return result
determine if get requesting uid has rights to update this kind of object
synchronized public void add member string new member member set add new member
adds a new member if it doesnt already exist
synchronized public void add controller string new controller controller set add new controller
add a controller to this schema definition
public void reset string db concurrent reader hash map my dbmap concurrent reader hash map context map get db if my dbmap null the next number object is unique item corresponding to db object table and we are part of a solitaire object so this sync is effectively a class object static sync corresponding to the object table synchronized my dbmap my dbmap clear
reset the counts for the paritcular db each subsequent operation will
public boolean allows null return allow null allows null
does this field allow nulls
public string get filter method return filter method get filter method
return the filter method currently used for this field
public string get length return string value of field size get length
return the length of the field in characters
public int get length int return field size get length int
return the length of this field as an integer
public string get lookup object return lookup object get lookup object
return the value for the lookup object for this field
public string get lookup definition return lookup definition
future versions of expresso will rely more on objects that are shown as
public string get lookup field return this lookup field
when you get a lookup object to perform a complete mapping between the
public string get name return field name get name
return the name of the field
public int get precision return precision get precision
return the precision of this field as an integer
public string get type string return expresso field type string get type string
return the database type of the field as specified with a
public boolean is key return is key is key
is this field a key field
public boolean is multi valued return is multi valued is multi valued
is this field multi valued
public boolean is read only return is read only is auto incremented is read only
return the fields read only
public boolean is boolean type return this is boolean
is the field a boolean
public boolean is character long object type return this is character long object
is this field fall into the classification of a long character
public int count test cases return 1 count test cases
counts the number of test cases executed by run test result result
public boolean is long object type return this is long object
does this field fall into a class of blob object data types
public boolean is quoted text type return is text
is the field a quoted text field
public boolean is numeric type return is numeric
is the field a numeric field
public boolean is date type return is date
is the field a date or time field
public boolean is date only type return is date only
is the field a date or time field
public boolean is time type return is time
is the field a date or time field
public boolean is date time type return is date time
is the field a date or time field
public boolean is secret return is secret is secret
return the fields secret status
public boolean is hashed return hashed is hashed
return the fields hashed status
public boolean is encrypted return encrypted is encrypted
return the fields hashed status
public boolean is virtual return is virtual is virtual
is this field a virtual field e
public int get cache size special case for the dbobj limit object if my class name equals dbobj limit class get name return 0 if my cache size 2 if log is debug enabled log debug cache size not set for my class name setting set cache size if log is debug enabled log debug cache size for my class name is my cache size return my cache size get cache size
gets the set size of the cache for this dbobject
public void set key boolean new key is key new key set key boolean
set this field as a key field or not
public void test date add final string test string value final string test key 1 try test1 one test new test1 one test set data context test system initializer get test context one test set field test key test key one test set field date test test string value one test add one test clear one test set field test key test key one test retrieve string field data one test get field date test assert true field data equals test string value catch throwable t t print stack trace fail caught exception testing clob support t get message
this function tests adding blank dates since some databases dont tolerate
public boolean is auto incremented return is auto inc is auto incremented
is this field an auto incremented field
public void set mask pattern new mask mask new mask
set a regular expression mask for this field that specifies its
public data field meta data get field meta data string field name string util assert not blank field name field name may not be blank dbfield one field dbfield get meta data get field metadata field name if one field null throw new illegal argument exception my class name no such field as field name in object my class name return one field get dbfield string
returns the metadata for the specified field
public pattern get mask return mask
get the compiled regular expression for this field
public object get attribute string attrib name if attributes null return null return attributes get attrib name
returns an attribute keyed by name
public iterator get attributes iterator if attributes null return null return new hash map attributes key set iterator
returns a copy of all attributes associated with this field
public class get filter class return m filter class
getter for filter class
public string get definition name try return jdbcobject meta data this get meta data get target table catch data exception ex return null
retrieve the key to the definition name for the given dbobject
public string get country return my country
used to get the sub language country code
protected schema get schema string schema class schema one schema synchronized schemas one schema schema schemas get schema class if one schema null return one schema else one schema schema factory get instance get schema schema class if one schema null throw new illegal argument exception can t instantiate schema class schema class synchronized schemas schemas put schema class one schema return one schema
instantiate return the schema class given in the current parameter
protected string get string from bundle locale our locale string string code string result null try resource bundle rb get bundle our locale result rb get string string code catch exception e try default bundle if we fail in app bundle if default bundle path equals bundle path result get string from default schema bundle our locale string code if result null throw new runtime exception cannot find translated string return result
return a string for a specific locale
protected string get string from default schema bundle locale our locale string string code resource bundle rb null synchronized bundle cache if our locale null rb get bundle from path our locale default bundle path else rb get bundle from path blank locale default bundle path return rb get string string code
return a string for a specific locale using the default expresso schema
public void test simple message try string returned messages get string com jcorporate expresso core expresso schema test message if returned equals this is a test fail didn t get this is a test got string util not null returned instead catch exception ce log error ce fail messages exception occurred see log test simple message
get a simple test message from the messages object
public void test complex message try catch exception ce log error ce fail messages exception occurred for complex message see log test complex message
test messages with substitutions
public boolean is reserved word string test word if case sensitive words contains test word return true else if case insensitive words contains test word to lower case return true else return false
returns whether a field or table name can be used with a database
public boolean is expresso reserved word string test word return case sensitive words contains test word
returns whether or not a word that shouldnt be used in web page
public input stream get input stream throws ioexception if data null throw new ioexception no data return new byte array input stream data
returns the input stream associated with the data source
public void remove attribute string field name string attrib name dbfield one field dbfield all fields get field name if one field null return one field remove attribute attrib name
removes an attribute from the field
protected password authentication get password authentication return new password authentication get user get password get password authentication
implement the required get password authentication method
public string get code return event code get code
get the event code passed to this event the exact meaning
public cacheable get object return event object get object
get the object reference to the object that generated the event
public string get originator return event originator get originator
return the name of the class originating this event
public void set code string new event code event code new event code set code string
set the event code for this event meaning depends on the originating
protected string get field data string field name if field data null return null data field df data field field data get field name if df null return null object o df get value if o null return null return o to string
internal mechanism for getting the raw field data
public void set object cacheable new object event object new object set object cacheable
set the originating object reference for this event
public void set originator string new event originator event originator new event originator set originator string
set the class name of the event originator
public sqlfast string buffer add list separator if begin begin false else sb append return this
add separator to the list if required
public sqlfast string buffer append double v sb append v return this
add a double to the stringbuffer
public sqlfast string buffer append int v sb append v return this
add an integer value to string
public sqlfast string buffer append string v sb append v return this
add a string to stringbuffer
public sqlfast string buffer append sqlitem string i add list separator sb append i return this
add an item to the list
synchronized public hashtable get all fields return new hashtable all fields get all fields
return the all fields hashtable which contains all of the dbfield objects
public sqlfast string buffer append sqlnested value double v add list separator sb append v return this
add a sql value to the current list
public sqlfast string buffer append sqlnested value int v add list separator sb append v return this
add a sql value to the current list
public sqlfast string buffer append sqlnested value string v add list separator return append sqlvalue v
add a sql value to the current list
public sqlfast string buffer append sqlvalue double v sb append v return this
add a sql value to the current string no list separator
public sqlfast string buffer append sqlvalue int v sb append v return this
add a sql value to the current string no list separator
public sqlfast string buffer append sqlvalue string v int i 0 if v null while i v index of i 0 v v substring 0 i v substring i i 2 sb append sb append v if v null sb append return this
add a sql value to the current string no list separator
public sqlfast string buffer append sqlpad value string str sb append str return this
add a sql value to the current string no list separator
public sqlfast string buffer start list begin true return this
starts a sql list initialize the separator inserter
public vector get stderr synchronized stderr return vector stderr clone get stderr
retrieve a vector of all lines printed to std error
public vector get stdout synchronized stdout return vector stdout clone get stdout
retrieve a vector of all lines printed to std out
public void set time out long new sleep interval int new max sleeps sleep interval new sleep interval max sleeps new max sleeps set time out long int
set a timeout for the command
public hash map get all fields map return new hash map all fields
return the all fields hashtable which contains all of the dbfield objects
public iterator get all fields iterator return all fields values iterator
way to get an interator into the all fields objects
public iterator get key field list iterator return key list iterator
retrieve an interator of key fields