input stringlengths 10 828 | output stringlengths 5 107 |
|---|---|
protected entity bean leave trail int command code entity bean bean return bean | this internal method is used to record a critical bean |
public ejblocal object get pooled bean object for entity bean entity bean bean throws ejbexception return get pooled bean object for entity bean bean false | internal method to request a pooled bean object of the appropriate type |
private string list bean types class bean classes collection output new vector for int i 0 i bean classes length i output add get abstract name for entity bean class bean classes i return strings list output | this internal utility method lists the abstract names |
public void shutdown super shutdown database close | closes the database connection pool |
protected void prod server get server date the following used to allow the server and client to start up simultaneously assuming the server needs to start up at all new thread new runnable public void run try get server date catch exception x start thread yield | establishes a brief connection with the server before the container is |
public entity bean passivate entity bean entity bean bean boolean recurse throws ejbexception in the client passivation of a bean has no effect on the cache if bean null try bean ejb passivate catch remote exception remote failure if bean instanceof thin siamese bean nullify relationships bean return bean | the immediate action of this method is to passivate a bean |
protected collection passivate beans in commands collection commands iterator commands iterator commands iterator int command index 0 while commands iterator has next command command command commands iterator next command set index command index if is command which expects non pooled bean command passivate entity bean command get entity bean return commands | before beans are sent to the server they are passivated |
protected collection reactivate beans in commands collection commands iterator commands iterator commands iterator while commands iterator has next command command command commands iterator next if is command which expects non pooled bean command activate entity bean command get entity bean if command instanceof store command store command command rolled back else if command instanceof remove command remove command command rolled back return commands | beans sent to the server which never come back need to |
public square key ejb create square key primary key return primary key | create life cycle event |
public void ejb post create square key primary key | post create bean life cycle event |
public void specify log file string log file this log file log file | specify the log file the server will write command |
public container create client container url servlet url throws no such method exception instantiation exception invocation target exception illegal access exception try return populate container new client container servlet url catch class not found exception failure throw new ejbexception entity bean class missing failure | constructs a client container for use with this application |
public container create server container mr database database throws no such method exception instantiation exception invocation target exception illegal access exception try if log file null return populate container new server container database log file else return populate container new server container database catch class not found exception failure throw new ejbexception entity bean class missing failure | constructs a server container for use with this application |
public container create deployment container throws no such method exception instantiation exception invocation target exception illegal access exception return populate deployment container new deployment container | constructs a deployment container for use is conjunction with the |
private container populate container container container throws class not found exception no such method exception instantiation exception invocation target exception illegal access exception container add type thin board class thin board class get method get edition null thin board class get method set edition new class string class mr board home class mr board class false not leaving trails true true return container | adds the bean types used in this application to a container |
public ejblocal object get bean object for entity bean entity bean bean throws ejbexception return get bean object for entity bean bean false false | internal method to request a bean object of the appropriate type |
public boolean equals object other key token key tn key token key other key return tn key get token name get token name tn key get edition equals get edition | checks if two keys are equal |
public int hash code return token name hash code edition hash code | evaluate a hashcode for this key |
public boolean equals object other key card key cd key card key other key return cd key get card number get card number cd key get deck id equals get deck id | checks if two keys are equal |
public int hash code return card number deck id hash code | evaluate a hashcode for this key |
public deck key ejb create deck key primary key return primary key | create life cycle event |
public void ejb post create deck key primary key | post create bean life cycle event |
public card key ejb create card key primary key return primary key | create life cycle event |
public void ejb post create card key primary key | post create bean life cycle event |
public token key ejb create token key primary key return primary key | create life cycle event |
public void ejb post create token key primary key | post create bean life cycle event |
public boolean equals object other key square key sq key square key other key return sq key get square index get square index sq key get edition equals get edition | checks if two keys are equal |
public int hash code return square index edition hash code | evaluate a hashcode for this key |
public string ejb create string primary key return primary key | create life cycle event |
public void ejb post create string primary key | post create bean life cycle event |
public boolean equals object other key deck key dk key deck key other key return dk key get deck name equals get deck name dk key get edition equals get edition | checks if two keys are equal |
public int hash code return deck name hash code edition hash code | evaluate a hashcode for this key |
private container populate container container container throws class not found exception no such method exception instantiation exception invocation target exception illegal access exception return null | adds the bean types used in this application to a container |
private container populate deployment container container container throws no such method exception instantiation exception invocation target exception illegal access exception container add type example bean class example bean class get method get colour null example bean class get method set colour new class java awt color class example bean home class example bean object class return container | adds the bean types used in this application to a |
public void business method if container instanceof server container container log on server container to string replace n else system out println container to string | an example business method which lists all the types in the |
public void ejb post create java awt color primary key if container instanceof server container container log on server created example bean primary key else system out println created example bean primary key | post create bean life cycle event |
public void validate throws validate exception string shape get shape float quality get quality if shape equals polygon shape equals circle shape equals ellipse shape equals irregular quality 0 0 quality 100 0 return else throw new validate exception validate exception failure client shape must be polygin circle ellipse or irregular and quality must be from 0 to 100 | validates this bean according to the business rules |
private container populate container container container throws class not found exception no such method exception instantiation exception invocation target exception illegal access exception container add type thin bean class thin bean class get method get primary key null thin bean class get method set primary key new class object class mr bean home class mr bean class false not leaving trails true true return container | adds the bean types used in this application to a container |
private container populate deployment container container container throws no such method exception instantiation exception invocation target exception illegal access exception return null | adds the bean types used in this application to a |
public boolean equals object other key track key tk key track key other key return tk key get cdidentifier equals get cdidentifier tk key get song identifier get song identifier | checks if two keys are equal |
public int hash code return cd identifier hash code int song identifier | evaluate a hashcode for this key |
public list retrieve tracks throws finder exception track home track home track home container get home for entity bean new thin track return track home find where fields equal null new long get song identifier | returns the tracks associated with this bean |
public long ejb create long primary key return primary key | create life cycle event |
public void ejb post create long primary key | post create bean life cycle event |
public boolean equals object other key credit key ct key credit key other key return ct key get song identifier get song identifier ct key get artist identifier get artist identifier | checks if two keys are equal |
public int hash code return int get song identifier get artist identifier | evaluate a hashcode for this key |
public artist object retrieve artist throws finder exception artist home artist home artist home container get home for entity bean new thin artist return artist home find by primary key get credit id get artist identifier | returns the artist associated with this bean |
public song object retrieve song throws finder exception song home song home song home container get home for entity bean new thin song return song home find by primary key get credit id get song identifier | returns the song associated with this bean |
public credit key ejb create credit key primary key return primary key | create life cycle event |
public void ejb post create credit key primary key | post create bean life cycle event |
public list retrieve credits throws finder exception credit home credit home credit home container get home for entity bean new thin credit return credit home find where fields equal null new long get artist identifier | returns the credits associated with this bean |
public cdobject retrieve cd throws finder exception cdhome cd home cdhome container get home for entity bean new thin cd return cd home find by primary key get track id get cdidentifier | returns the cd associated with this bean |
public song object retrieve song throws finder exception song home song home song home container get home for entity bean new thin song return song home find by primary key get track id get song identifier | returns the song associated with this bean |
public track key ejb create track key primary key return primary key | create life cycle event |
public void ejb post create track key primary key | post create bean life cycle event |
public set get related keys container container if related keys null related keys size size reset related keys container return related keys | gets the keys of the beans in this collection |
public set reset related keys container container return related keys container bundle entity bean collection into primary key set this | synchronizes the related keys with the current beans in this collection |
public set get unrelated beans container container this container container if unrelated beans null unrelated beans new tree set new entity bean comparator container return unrelated beans | gets the unrelated beans which have been recently removed from this collection |
public set reset unrelated beans container container this container container return unrelated beans new tree set new entity bean comparator container | removes all references to unrelated beans |
public void write object object output stream stream throws ioexception if unrelated beans null add all unrelated beans unrelated beans clear related keys null stream default write object | changes the write object behaviour so that unrelated beans |
public void clear unrelated beans sets construct this related keys null super clear | unrelates all the beans in a relationship |
public int compare object first object second if first instanceof ejblocal object second instanceof ejblocal object if first get class equals second get class return comparable ejblocal object first get primary key compare to ejblocal object second get primary key else throw new ejbexception bean type mismatch beans are of different types else if first instanceof ejblocal object second instanceof ejblocal object throw new ejbexception bean implementation mismatch only one class implements ejblocal object else return container compare entity beans entity bean first entity bean second | compares two entity beans |
public boolean equals object other return other instanceof entity bean comparator | compares two entity bean comparators |
public set reset related keys container container return related keys container bundle entity bean map into primary key set this | synchronizes the related keys with the current beans in this collection |
public void write object object output stream stream throws ioexception if unrelated beans null put all container bundle entity bean collection into entity bean map unrelated beans unrelated beans clear related keys null stream default write object | changes the write object behaviour so that unrelated beans |
public void committed store response response if container null container copy update stamp from entity bean to bean response get result bean mr entity bean bean make persistent | called when a response to this store command is received |
public time zone get suggested time zone return time zone | get the suggested timezone parameter for this command |
public void veto suggested time zone time zone null | used by the servlet security tier to disallow a |
public collection get constrained fields return constrained fields | get the constrained field parameters to this command |
public int get type field return type field | returns a bit field which describes this constraint |
public string get comparison operator if value2 null if type field constrained equal or like or equal high side 0 return else if type field constrained greater 0 if type field constrained equal or equal low side 0 return else return else if type field constrained less 0 if type field constrained equal or equal low side 0 return else return else if type field constrained equal or equal low side 0 return else return else return type field constrained equal or equal low side 0 | returns the first comparison operator used in encoding this |
public string get comparison operator2 return type field constrained equal or like or equal high side 0 | returns the second comparison operator used in encoding this |
public string to string if value2 null return strings express value get comparison operator name get comparison operator2 strings express value2 else if value null return name get comparison operator strings express value else return name type field constrained descending 0 desc asc | returns a human readable description of this constraint |
public boolean equals object object return compare to object 0 | compares two constraints for equality |
public int hash code return name hash code type field value null value hash code 0 value2 null value2 hash code 0 | calculates a hash code for this constraint |
public boolean get recurse return recurse | get the value of the recurse flag for this command |
public int hash entity bean entity bean bean try return get key getter for entity bean bean invoke bean null hash code catch invocation target exception bean failure throw new ejbexception exception thrown by primary key getter bean failure catch illegal access exception bean failure throw new ejbexception primary key getter of inappropriate access bean failure catch null pointer exception bean failure throw new ejbexception is primary key getter a getter method bean failure return 0 | calculates a hash code based on the primary key of an entity bean |
public int compare entity bean types class bean class1 class bean class2 return get abstract name for entity bean class bean class1 compare to get abstract name for entity bean class bean class2 | compares the table names of two entity bean types |
public int hash code if bean null return get command type else try use the container to generate a hash code on bean parameter return get command type container hash entity bean bean catch null pointer exception container not local or not set try to make a hash code ourselves return get command type bean hash code | returns a hash code for this command |
public int hash entity bean type class bean class return get abstract name for entity bean class bean class hash code | calculates a hash code based on the primary key of an entity bean |
public string get server dump filename return server dump filename | suggests the name of the file that the server should open |
public boolean older than int seconds return system current time millis created seconds 1000 | determines if the transaction in which this command appears |
public void set thread name command table map thread name command table this thread name command table thread name command table | called by the command servlet to allow it to make its |
public map get thread name command table return thread name command table | returns the map from thread names to collections of |
public serializable method get method return method | get the method parameter for this command |
public object invoke container container boolean home throws invocation target exception illegal access exception if home return method invoke container get home for entity bean get entity bean parameters else return method invoke container get bean object for entity bean get entity bean true true parameters | invoke the method specified by this command |
public string get abstract name for entity bean entity bean bean return strings after last bean get class get name substring 4 | internal utility method to convert a bean token to an internal abstract |
public string get abstract name for entity bean class class bean class return strings after last bean class get name substring 4 | internal utility method to convert a bean class to an internal |
protected string get package name for entity bean class class bean class return strings before last bean class get name | internal utility method to return a bean classs parent package name |
protected string get primary key field name for entity bean entity bean bean return get key getter for entity bean bean get name substring 3 | internal utility method to extract the primary key field name |
public void add type class bean class method key getter method method key setter method class home class class object class throws invocation target exception illegal access exception no such method exception instantiation exception super add type bean class key getter method key setter method home class object class false true false false | adds a recognised bean type to this container |
public mr database get mr database return null | get the database object associated with this container if any |
public void reset class table new hashtable uid table new hashtable super handle table new hashtable flags table new hashtable field list table new hashtable string table new hashtable wire handle base wire handle | clears all dictionaries |
public number get number return underlying integer | the integer underlying this |
public boolean is null return underlying integer null | returns true if this nullable integer represents the null value |
protected object throw on null object object if object null throw new ejbexception referenced bean type not recognised or server shutting down return object | internal utility method to preempt null pointer exceptions and produce |
public number get number return underlying byte | the byte underlying this |
public boolean is null return underlying byte null | returns true if this nullable byte represents the null value |
public number get number return underlying double | the double underlying this |
public boolean is null return underlying double null | returns true if this nullable double represents the null value |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.