input
stringlengths
10
828
output
stringlengths
5
107
protected database entry add hook e value throw new unsupported operation exception
subclass hook invoked when an item is added via
protected void set hook e value throw new unsupported operation exception
subclass hook invoked when an item is changed via
public boolean contains abstract method for method holder mh this methods if mh get method get modifiers modifier abstract 0 return true return false
determine if any abstract methods were found
public database entry get current key if this active throw new illegal state exception not active return this key
return the current key
public string get name return this prim type get name
get the short name for this primitive type e
public string get long name return this wrap type get simple name
get the long name for this primitive type e
public char get letter return this letter
get the single character descriptor for this primitive type e
public method get unwrap method try return this wrap type get method get name value catch no such method exception e throw new runtime exception e
get the wrapper class unwrap method for this primitive type e
public database entry get current pkey if this active throw new illegal state exception not active return this pkey
return current primary key
public database entry get current data if this active throw new illegal state exception not active return this data
return the current data
public void replace current data database entry data if is secondary throw new unsupported operation exception cursor is a secondary cursor if this active throw new illegal state exception not active operation status status this cursor put current data switch status case notfound throw new illegal state exception entry has been deleted case success break default throw new sidekar exception operation failed status jeutil copy into data this data
replace the current data
public boolean forward if this cursor null throw new illegal state exception closed return this active go first next
move the cursor forward
public void compile clear state this name map clear this class map clear construct entities for entity model entity model this schema get name map values compile entity entity model construct indexes on entities for entity model entity model this schema get name map values entity entity this name map get entity model get name compile indexes entity entity model get index models
compile the schema information
public boolean backward if this cursor null throw new illegal state exception closed return this active go last prev
move the cursor backward
public void close this db close
close down this instance and its associated temporary database
public boolean first if this cursor null throw new illegal state exception closed return go first
move the cursor to first key value pair
public string get database name return this dbname
get the name of the temporary database used by this instance
public boolean is marked item item database entry value new database entry operation status status this db get null entity get key item value null switch status case notfound return false case success break default throw new sidekar exception operation failed status return true
determine if the given item has been previously marked as having been seen
public void mark item item operation status status this db put null entity get key item empty if status operation status success throw new sidekar exception operation failed status
mark a previously unseen item as having been seen
public boolean last if this cursor null throw new illegal state exception closed return go last
move the cursor to the last key value pair
public void delete if this active throw new illegal state exception not active operation status status this cursor delete switch status case success case keyempty case notfound break default throw new sidekar exception operation failed status
delete the item pointed to by the cursor
public boolean is unique return this unique
get whether this index is unique
public transaction get current transaction boolean require if this closed throw new illegal state exception environment is closed transaction tx this current transaction get if require tx null throw new sidekar exception there is no transaction open in this thread return tx
get the current transaction
public void push transaction transaction tx sanity check if tx null throw new illegal argument exception null transaction if this current transaction get null throw new illegal state exception a transaction is already associated with this thread save transaction this current transaction set tx push notes closeable notes push
set the current transaction for the current thread
public void pop transaction boolean commit get current transaction transaction tx this current transaction get if tx null throw new illegal state exception no transaction is associated with this thread this current transaction remove pop notes throwable exception null try closeable notes pop catch runtime exception e exception e commit false throw e catch error e exception e commit false throw e finally close transaction try if commit tx commit else tx abort catch database exception e if exception null e get cause null e init cause exception throw e
cloase the current transaction for the current thread
public void reset this map clear
clear saved state about previously created instances
public sidekar database get sidekar database return this db
get the database containing this entity
public boolean is top entity return this parent null
is this entity the top level entity in its hierarchy
public long count check open token if is top entity return this db handle count else return this db perform action new database action long public long execute long count 0 for object item entity this count return count
determine the total number of instances of this entity including sub entities
public t cast object obj check open token if obj null return null item item item obj if this discrim map contains key item get sidekar entity discriminator throw new class cast exception not an instance of this return this user class cast item
cast the given object to an instance of this entity
public boolean is abstract return this is abstract
determine if this entity is abstract
public boolean in same hierarchy entity entity return this top parent entity top parent
determine if this and the given entity are in the same hierarchy
public t find unique string index name object values return get index index name get first values
convenience method finding one the first item using an index
public t create detached check open token if is abstract throw new illegal argument exception this is an abstract entity return get generate new id
create a new detached instance of this entity
public boolean is attached item t item check database check open token check entity if item get sidekar entity this throw new illegal argument exception item is not an instance of this see if item exists synchronized item database entry key get key item database entry value new database entry operation status status get database handle get get current transaction key value null switch status case success return true case notfound break default throw new sidekar exception operation failed status return false
determine if item is attached
private tuple input read to field item item simple field field lock mode lock mode queue up the field tuple input input read item lock mode for field f this fields if f field return input f skip input oops bad field throw new illegal argument exception field is not a field within this
read item data up to where the given fields data starts
private tuple input read item item lock mode lock mode database entry value new database entry transaction tx get current transaction if lock mode lock mode rmw tx null lock mode null operation status status get database handle get tx get key item value lock mode switch status case notfound throw new detached item exception item case success break default throw new sidekar exception operation failed status return jeutil to tuple input value
read out the entry in the database corresponding to this item
private void write item item database entry value operation status status get database handle put get current transaction get key item value if status operation status success throw new sidekar exception operation failed status
write out the entry into the database for to this item
public void pre visit astnode node
visits the given ast node prior to the type specific visit
public void post visit astnode node
visits the given ast node following the type specific visit
public void set modifiers int modifiers if modifiers legal modifiers 0 throw new illegal argument exception modifying this modifiers modifiers
sets the modifiers explicitly specified on this declaration
public type get type if base type null lazy initialize use setter to ensure parent link set too long count get ast modification count set type get ast new primitive type primitive type int get ast set modification count count return base type
returns the base type declared in this variable declaration statement
public void set type type type if type null throw new illegal argument exception replace child this base type type false this base type type
sets the base type declared in this variable declaration statement to
public list fragments return variable declaration fragments
returns the live list of variable declaration fragments in this statement
public expression get expression return optional expression
returns the expression of this super constructor invocation statement
public void set expression expression expression a super constructor invocation may occur inside an expression must check cycles replace child this optional expression expression true this optional expression expression
sets or clears the expression of this super constructor invocation
public list arguments return arguments
returns the live ordered list of argument expressions in this super
public imethod binding resolve constructor binding return get ast get binding resolver resolve constructor this
resolves and returns the binding for the constructor invoked by this
public simple name get label return optional label
returns the label of this continue statement or code null code if
public void set label simple name label a continue statement cannot occur inside a simple name no cycles replace child this optional label label false this optional label label
sets or clears the label of this continue statement
public void set constructor boolean is constructor modifying this is constructor is constructor
sets whether this declaration declares a constructor or a method
public simple name get name if method name null lazy initialize use setter to ensure parent link set too long count get ast modification count set name new simple name get ast get ast set modification count count return method name
returns the name of the method declared in this method declaration
public void set name simple name method name if method name null throw new illegal argument exception replace child this method name method name false this method name method name
sets the name of the method declared in this method declaration to the
public list parameters return parameters
returns the live ordered list of method parameter declarations for this
public void set expression expression expression a class instance creation may occur inside an expression must check cycles replace child this optional expression expression true this optional expression expression
sets or clears the expression of this class instance creation expression
public name get name if type name null lazy initialize use setter to ensure parent link set too long count get ast modification count set name new simple name get ast get ast set modification count count return type name
returns the name of the type instantiated in this class instance
public list thrown exceptions return thrown exceptions
returns the live ordered list of thrown exception names in this method
public void set name name name if name null throw new illegal argument exception replace child this type name name false this type name name
sets the name of the type instantiated in this class instance
public type get return type if return type null lazy initialize use setter to ensure parent link set too long count get ast modification count set return type get ast new primitive type primitive type void get ast set modification count count return return type
returns the return type of the method declared in this method
public anonymous class declaration get anonymous class declaration return optional anonymous class declaration
returns the anonymous class declaration introduced by this
public void set anonymous class declaration anonymous class declaration decl a class instance creation may occur inside an anonymous class declaration must check cycles replace child this optional anonymous class declaration decl true this optional anonymous class declaration decl
sets whether this class instance creation expression declares
public void set return type type type if type null throw new illegal argument exception replace child astnode this return type astnode type false this return type type
sets the return type of the method declared in this method declaration
public int get extra dimensions return extra array dimensions
returns the number of extra array dimensions over and above the
public void set harbourdoc harbourdoc harbourdoc replace child this optional harbourdoc harbourdoc false this optional harbourdoc harbourdoc
sets or clears the harbourdoc comment node
public void set extra dimensions int dimensions if dimensions 0 throw new illegal argument exception modifying this extra array dimensions dimensions
sets the number of extra array dimensions over and above the
public expression get expression if expression null lazy initialize use setter to ensure parent link set too long count get ast modification count set expression new simple name get ast get ast set modification count count return expression
returns the expression of this switch statement
public void set expression expression expression if expression null throw new illegal argument exception a switch statement may occur inside an expression must check cycles replace child this expression expression true this expression expression
sets the expression of this switch statement
public list statements return statements
returns the live ordered list of statements for this switch statement
public block get body return optional body
returns the body of this method declaration or code null code if
public void set expression expression expression if expression null throw new illegal argument exception a throw statement may occur inside an expression must check cycles replace child this expression expression true this expression expression
sets the expression of this throw statement
public void set body block body a method declaration may occur in a block must check cycles replace child this optional body body true this optional body body
sets or clears the body of this method declaration
public name get name if package name null lazy initialize use setter to ensure parent link set too long count get ast modification count set name new simple name get ast get ast set modification count count return package name
returns the package name of this package declaration
public void set name name name if name null throw new illegal argument exception replace child this package name name false this package name name
sets the package name of this package declaration to the given name
public ipackage binding resolve binding return get ast get binding resolver resolve package this
resolves and returns the binding for the package declared in this package
public imethod binding resolve binding return get ast get binding resolver resolve method this
resolves and returns the binding for the method or constructor declared
public name get qualifier return optional qualifier
returns the qualifier of this this expression or
public void set qualifier name name a this expression cannot occur inside an expression replace child this optional qualifier name false this optional qualifier name
sets or clears the qualifier of this this expression
public list initializers return initializers
returns the live ordered list of initializer expressions in this for
public expression get expression return optional condition expression
returns the condition expression of this for statement or
public void set expression expression expression a for statement may occur inside an expression must check cycles replace child this optional condition expression expression true this optional condition expression expression
sets or clears the condition expression of this return statement
public list updaters return updaters
returns the live ordered list of update expressions in this for
public block get body if body null lazy initialize use setter to ensure parent link set too long count get ast modification count set body new block get ast get ast set modification count count return body
returns the body of this try statement
public void set body block body if body null throw new illegal argument exception a try statement may occur in a block must check cycles replace child this body body true this body body
sets the body of this try statement
public statement get body if body null lazy initialize use setter to ensure parent link set too long count get ast modification count set body new block get ast get ast set modification count count return body
returns the body of this for statement
public list catch clauses return catch clauses
returns the live ordered list of catch clauses for this try statement
public void set body statement statement if statement null throw new illegal argument exception a for statement may occur inside a statement must check cycles replace child this body statement true this body statement
sets the body of this for statement
public block get finally return optional finally body
returns the finally block of this try statement or code null code if
public void set finally block block a try statement may occur in a block must check cycles replace child this optional finally body block true this optional finally body block
sets or clears the finally block of this try statement
public single variable declaration get exception if exception decl null lazy initialize use setter to ensure parent link set too long count get ast modification count set exception new single variable declaration get ast get ast set modification count count return exception decl
returns the exception variable declaration of this catch clause
public name get name if import name null lazy initialize use setter to ensure parent link set too long count get ast modification count set name get ast new qualified name new simple name get ast new simple name get ast get ast set modification count count return import name
returns the name imported by this declaration
public void set exception single variable declaration exception if exception null throw new illegal argument exception a catch clause may occur inside an single variable declaration must check cycles replace child this exception decl exception true this exception decl exception
sets the variable declaration of this catch clause
public void set name name name if name null throw new illegal argument exception replace child this import name name false this import name name
sets the name of this import declaration to the given name
public void set on demand boolean on demand modifying this on demand on demand
sets whether this import declaration is an on demand or a
public void set body block body if body null throw new illegal argument exception a catch clause may occur in a block must check cycles replace child this body body true this body body
sets the body of this catch clause
public ibinding resolve binding return get ast get binding resolver resolve import this
resolves and returns the binding for the package or type imported by
public int get source position return get start position
returns the character index into the original source file
public type get type if type null lazy initialize use setter to ensure parent link set too long count get ast modification count set type get ast new primitive type primitive type int get ast set modification count count return type
returns the type of the variable declared in this variable declaration
public void set type type type if type null throw new illegal argument exception replace child this type type false this type type
sets the type of the variable declared in this variable declaration to
public void set body block body if body null throw new illegal argument exception replace child this body body true this body body
sets the body of this initializer declaration
public expression get expression if condition expression null lazy initialize use setter to ensure parent link set too long count get ast modification count set expression new simple name get ast get ast set modification count count return condition expression
returns the condition of this conditional expression