OAF(Oracle Application Framework) Interview Questions
1)What is an EO? a. Map to a database table or other data source b. Each entity object instance represents a single row c. Contains attributes representing database columns d. Fundamental BC4J object through which all inserts updates deletes interact with the database e. Central point !or business logic and "alidation related to a table !. Encapsulates attribute#le"el and entity#le"el "alidation logic g. Can contain custom business methods 2. What is a VO? a. $epresent a %uery result b. &re used !or joining' !iltering' projecting' and sorting your business data c. Can be based on any number o! entity objects d. Can also be constructed !rom a ()* statement
3. What are the methods in controller? +rocess$e%uest'+rocess!orm,ata and process!ormre%uest +rocess$e%uest - is called when the page is re%uested !or the !irst time !rom the ser"er. +rocessForm$e%uest - is called when some e"ent occurs on the page +rocess!orm,ata.not "isible). - /sed to capture ,ata !rom the !orm !ields which the user has entered and post it into Model *ayer. 4. What is a Controller? Controller is the ja"a !ile and can be associated to a complete 0&F page or to a speci!ic region. 1here are se"eral tas2s you will do routinely in your code. 3andle button press and other e"ents &utomatic %ueries ,ynamic 43E$E clauses Commits J(+ Forwards 1he logic !or accomplishing all these tas2s is written in controller 5. When is the processRequest method called? +$ method is called when the page is getting rendered onto the screen 6. When is processFormRequest method called? +F$ method is called when we per!orm some action on the screen li2e clic2 o! submit button or clic2 on lo"
. What is e!tension? E5tension is when you ta2e an already e5isting component e5 an 0&F page or a region and then add some more !unctionality to it without disturbing the original !unctionality.
". What is personali#ation? 0racle &pps Framewor2 has an 0& +ersonali6ation Framewor2 associated with it so that you can personali6e any 0&F page in an 0racle E#business (uite application without changing the basic or underlying code o! that 0& Framewor2 page' 0racle &pplication Framewor2 ma2es it "ery easy to personali6e the appearance o! the page or e"en the personali6ation o! data displayed on to an 0& Framewor2 page. $. What are le%els o& personali#ation? 1. Function *e"el 7. *ocali6ation *e"el 8. (ite *e"el 4. 0rgani6ation *e"el 9. $esponsibility *e"el :. &dmin#(eeded /ser *e"el ;. +ortlet *e"el <. /ser *e"el '() What is *C4+? Business Components !or Ja"a is J,e"eloper=s programming !ramewor2 !or building multitier database applications !rom reusable business components. 1hese applications typically consist o!> & client#side user inter!ace written in Ja"a and or 31M*. > 0ne or more business logic tier components that pro"ide business logic and "iews o! business objects. > 1ables on the database ser"er that store the underlying data. '')What are all the components o& *C4+? Following are the components o! BC4J> Entit, O-.ect # E0 encapsulates the business logic and rules. E0?s are used !or @nserting' /pdating and ,eleting data !rom the database table. EA is also used !or "alidating the records across the applications. > Vie/ O-.ect # Biew object encapsulates the database %uery. @t is used !or selecting data. @t pro"ides iteration o"er a %uery result set. B0?s are primarily based on E0?s. @t can be used on multiple E0?s i! the /@ is !or update. > 0pplication 1odule # &pplication Modules ser"e as containers !or related BC4J components. 1he pages are related by participating in the same tas2. @t also de!ines the logical data model and business methods needed.
12) What is an EO? E0 encapsulates the business logic and rules.E0?s are used !or @nserting' /pdating and ,eleting data. 1his is used !or "alidating across the applications. 4e can also lin2 to other E0?s and create a &ssociation object. 13) What is an VO? Biew object encapsulates the database %uery. @t is used !or selecting data. @t pro"ides iteration o"er a %uery result set.B0?s are primarily based on Eo?s. @t can be used on multiple E0?s i! the /@ is !or update. @t pro"ides a single point o! contact !or getting and setting entity object "alues. @t can be lin2ed together to !orm Biew *in2s. '4) What is an 0O? &n association object is created where we lin2 E0?s. For e5ample ta2e the search page where we lin2 the same E0 to !orm a association between the manager and employee. E"ery employee should ha"e a manager associated. But i! it +resident then no there is no manager associated. 1his is a per!ect e5ample to understand the &0. '5) What is an V2? & "iew lin2 is an acti"e lin2 between "iew lin2s. & "iew lin2 can be created by pro"iding the source and destination "iews and source and destination attributes. 1here are two modes o! Biew lin2 operation that can be per!ormed. & document and Master ,etail operation. '6). What is 345? /@C is an e5tensible' J7EE#based !ramewor2 !or building web applications. @t is based on the Model# Biew#Controller .MBC) design pattern' which pro"ides the !oundation !or building scalable enterprise web applications. ' ). Where the VO is located in the 1VC architecture? B0 is located in the Biew *ayer in MBC which is responsible !or presenting the data to the user. '") Which pac6a7e should include EO and 0O. 1he E0 and &0 will be present in the schema.ser"er pac2age. '$) What is the di&&erence -et/een inline lo% and e!ternal lo%. @nline lo" is a lo" which is used only !or that particular page !or which it was created and cannot be used by any other page. E5ternal lo" is a common lo" which can be used by any page. @t is a common component !or any page to use it. @t can be used by gi"ing the !ull path o! the lo" in the properties section DE5ternal *0BE o! the item. 2() /hat is a +a%a-ean? Ja"aBeans is an object#oriented programming inter!ace that lets you build re#useable applications or program building bloc2s called components that can be deployed in a networ2 on any major operating system plat!orm. 2') What is quer, *ean?
)ueryBean is used to e5ecute and return the results o! a %uery on behal! o! the )uery+ortlet application. 22) /hat is the di&&erence -et/een autocustomi#ation criteria and result -ased search? $esults based search generates search items automatically based on the columns on the results table. @n &utocustomi6ation search we need to set what all !ields are re%uired to display as a search criteria. 23) /hat is 189? M,( is Meta,ata (er"ice. 4hen a web page is bro2en into small units li2e buttons'!ields etc they are stored in a database. 1hese are not stored as binary !iles but as data in tables. 1he data are present in J,$ tables. M,( pro"ides ser"ice to store F return page de!initions. M,( collects those de!initions in components !ields in a meaning!ul manner to build a page. 24) What is 512? CM* is a mar2up language !or documents containing structured in!ormation. (tructured in!ormation contains both content .words' pictures' etc.) and some indication o! what role that content plays .!or e5ample' content in a section heading has a di!!erent meaning !rom content in a !ootnote' which means something di!!erent than content in a !igure caption or content in a database table' etc.). 25) What is the di&&erence -et/een customi#ation and e!tension? Customi6ation is under direct user control. 1he user e5plicitly selects between certain options. /sing customi6ation a user can<ering the !unctionality o! an application <ering e5isting /@ <ering e5isting business logic E5tension is about e5tending the !unctionality o! an application beyond what can be done through personali6ation. /sing e5tension we can&dd new !unctional !lows E5tend or o"erride e5isting business logic Create Gew application module Create Gew page Create Gew attribute E5tend 0"erride de!aults F "alidations 26) What is :ersonali#ation? +ersonali6ation enables you to declarati"ely tailor the /@ loo2#and#!eel' layout or "isibility o! page content to suit a business need or a user pre!erence. /sing +ersonali6ation we can> 1ailor the order in which table columns are displayed. > 1ailor a %uery result. > 1ailor the color scheme o! the /@. > Folder Forms > ,o Forms +ersonali6ation 2 )Can ,ou e!tend e%er, possi-le 0pplication 1odule?
&nswer- Go..$oot &M cannot be e5tended. 2") What is root01? 1he application module which is associated with the top#le"el page region .the page*ayout region) is root application module.
2$) Wh, can;t Root 01 -e e!tended? 1he root &M is loaded !irst and a!ter that the M,( (ubstitutions are parsed. 3ence $001 &M gets loaded e"en be!ore the time the substitutions de!inition !rom M,( layer get wor2ed out. 0b"iously' the root am cant substitute itsel!' hence it can=t be e5tended 3()What are the %arious pro&ile options in O0F? FG, ,iagnostics- re%uired !or &B0/1 13@( +&HE and ,iagnostic lin2 on page. +ersonali6e (el! (er"ice ,e!initions- 1o enable +ersonali6e page lin2 on the page. FG, +ersonali6ation $egion *in2 Enabled- used to enable $egion +ersonali6ation lin2s at e"ery region. FG, Migrate to J$&,- By de!ault set to Ies. +age would run !rom M,( i! Ies' else it will run !rom &J. FG, ,ocument root path- re%uired !or personali6ation migration. @t is set to path o! the M,( !older on the respecti"e ser"ers. FG, Branding imageFG, Banding (i6e- these pro!iles options are used !or changing standard image .0racle) on the page.
3')9teps &or VO su-stitution? 1. &bout this +age#K B0' &M' E0' +ath o! +age 7. E5port Commad .in cmd +rompt) 8. Gew .jpr L0pen page 4. *oo2 !or &M and B0 or E0. 9. Copy the class !iles o! B0'&M or E0 :. ,ecompile into Ja"a and store it into My+rojects .with respecti"e directory structure) ;. 0pen B0.5ml in a new jpr <. Create a new BC4J based on your 0riginal B0. M. Create a new B0 and e5tends original B0 1A. Change the %uery 11. $ebuild the project 17. Ho to .jp5.double clic2) 18. Ho to (ubstitutions 14. (ubstitute Bo 19. $ebuild your +roject .jpr 1:. 1rans!er Gew B0 class and 5ml to respecti"e directory structure 1;. F1+ .jp5 into NJ&B& O10+ 1<. uni5 command promrt C,N J&B&O10+ 1M. jp5 importer command
7A. Bounce &pache (er"er 32)What are di&&erent methods &or passin7 paramaters? 1. 1o2ens eg. "nameLPQ&ttributeGameR 7. 3ash Maps eg. 3ashMap "ariablenameLnre 3ashMap.)S "ariablename.add.D+arameterGameE'+arameterBalue)S 8.1hrough(ession eg. pageConte5t.put(ession"alue.D+aramterGameE'+arameterBalue)
33) setFor/ard3R2 list 1here are many parameters' here is the complete list o! it-# public "oid setForward/$*.(tring !unctionGame' byte menuConte5t&ction' (tring menuGame' com.sun.ja"a.util.collections.3ashMap parameters' boolean retain&M' (tring addBreadCrumb' byte messaging*e"el) +arameters!unctionGame # 1his is the !unction name representing the page you want to !orward to. @! its null' an @llegal&rgumentE5ception will be thrown. &lso i! the !unction is not under the current 30ME+&HE a 0&E5ception will be thrown. menuConte5t&ction # ,etermines the beha"ior o! the MenuConte5t a!ter !orwarding to the new page. @t accepts the !ollowing "alues0&4ebBeanConstants.JEE+OMEG/OC0G1EC1- Jeeps the menu conte5t as is. 0&4ebBeanConstants.JEE+OG0O,@(+*&IOMEG/OC0G1EC1- Jeeps the menu conte5t as is' but will not display all menus including global buttons. 0&4ebBeanConstants.JEE+OG0O,@(+*&IOMEG/OC0G1EC1O$E1&@GOH*0B&*OB/110G(- Jeeps the menu conte5t as is' but will not display all menus e5cluding global buttons. 0&4ebBeanConstants.$EM0BEOMEG/OC0G1EC1- $emo"es the menu conte5t 0&4ebBeanConstants.H/E((OMEG/OC0G1EC1- (elects the gi"en !unctionGame !unction i! it e5ists in the current menu. @! not it will try to ma2e a guess by mo"ing up the menu tree until it !inds it. &n e5ception will be thrown i! the !unction could not be located. 0&4ebBeanConstants.$E(E1OMEG/OC0G1EC1- $eset the menu conte5t to the gi"en !unctionGame and
menuGame. menuGame # 1he name o! the 30ME+&HE menu to reset the Menu conte5t to when the menuConte5t&ction is 0&4ebBeanConstants.$E(E1OMEG/OC0G1EC1. @! the menuGame is not o! type 30ME+&HE a 0&E5ception will be thrown. Iou can pass null otherwise. parameters # 3ashMap o! parameter name "alue pairs to append to the !orward /$*. 1he !inal !orward /$* parameters are in the !ollowing se%uence@t will !irst get the !unction=s corresponding /$* call by %uerying the !unction in!ormation !rom the database. @! the user is not authori6ed to e5ecute this !unction' a security 0&E5ception will be thrown. @t will then append all parameters passed in the parameters 3ashMap. First parameter added to the 3ashMap will be !irst added to the /$*. &lso the !ramewor2 will encode all parameter "alues be!ore appending them to the /$*. @t will remo"e all parameters i! they ha"e null "alues in the passed parameters 3ashMap. 1his pro"ides an easy way !or de"elopers to set a certain parameter=s "alue to null i! they want to remo"e it. @t will remo"e any 0& Framewor2 internal /$* parameters such as bcrumb' retain&M' and so on.. retain&M # @! true' all the cached application modules will be retained. @! !alse' all the cached application modules will be released. ,e"elopers must use this parameter to control the release beha"ior o! the cached appplication modules. 1his method will ignore any retain&MLtrue or retain&ML!alse as a /$* parameter or as part o! parameters 34)Code to cop, ro/s in VO public "oid copy.) P (uppliersB0@mpl per"o L get(uppliersB01.)S $ow rowTU L per"o.getFiltered$ows.V(electFlagV'VIV)S !or .int iLASiWrow.lengthSiXX) P (uppliersB0$ow@mpl rowi L .(uppliersB0$ow@mpl)rowS 0&,B1ransaction tr5 L .0&,B1ransaction)get1ransaction.)S Gumber b L tr5.get(e%uenceBalue.VF4JO1BCO(/++*@E$(O(V)S &ttribute*ist a L .&ttribute*ist)rowiS (uppliersB0$ow@mpl r L.(uppliersB0$ow@mpl)per"o.create&nd@nit$ow.a)S (et here your uni%ue attribute "alues' @=m setting here (upplier @d as !or e"ery new row it should be di!!erent. r.set(upplier@d.b)S per"o.insert$ow.r)S R R 35)/hat &or is:reparedForE!ecution<) and e!ecute=uer,<) methods used?
is+reparedForE5ecution !unction will chec2 whether all parameters are assigned properly and %uery is ready !or e5ecution. 0n multiple na"igations to the page this %uery will not be e5ecuted multiple times. 4hile e5ecute)uery !unction is used !or e5ecuting the B0 %uery so that it can !etch the data !rom database into B0 cache. 36)Wh, 9hould /e 7i%e retain01>?? 1he &M should be retained whene"er you are na"igating away !rom a page and when you 2now that there is a possibility to come bac2 to the page again and data is to be retained. E5ample - &ny na"igation lin2 that opens in a new page or any na"igation which has a bac2 button to come bac2 to the initial page. 1he &M should not be retained !or two independent pages' especially i! they ha"e common B0s which !etch di!!erent result sets. @n such cases' retaining the &M may not remo"e the cache o! B0s and so the result may not be as e5pected.
3 ) What is the si7ni&icance o& add*readCrum->? 1he basic intention o! the breadcrumb is to let the user 2now o! the na"igation path he too2 to reach the current page.
3") @o/ do ,ou &ind ri7ht .de% patch &or ,our oracle application
version.
Search in oracle.metalink.com as Jdev with OA Extension.
!) "hat are the tools #ou had used $or decompilin% &ava class' Jad is one o$ the tool $or decompilin% the &ava class.
4() /hat is a +a%a-ean? Ja"aBeans is an object#oriented programming inter!ace that lets you build re#useable applications or program building bloc2s called components that can be deployed in a networ2 on any major operating system plat!orm. 4') What is quer, *ean? )ueryBean is used to e5ecute and return the results o! a %uery on behal! o! the )uery+ortlet application. 42) /hat is the di&&erence -et/een autocustomi#ation criteria and result -ased search? $esults based search generates search items automatically based on the columns on the results table. @n &utocustomi6ation search we need to set what all !ields are re%uired to display as a search criteria. 43) /hat is 189? M,( is Meta,ata (er"ice. 4hen a web page is bro2en into small units li2e buttons'!ields etc they are stored in a database. 1hese are not stored as binary !iles but as data in tables. 1he data are present in J,$ tables. M,( pro"ides ser"ice to store F return page de!initions. M,( collects those de!initions in components !ields in a meaning!ul manner to build a page.
45) What is 512? CM* is a mar2up language !or documents containing structured in!ormation. (tructured in!ormation contains both content .words' pictures' etc.) and some indication o! what role that content plays .!or e5ample' content in a section heading has a di!!erent meaning !rom content in a !ootnote' which means something di!!erent than content in a !igure caption or content in a database table' etc.). 46) What is the di&&erence -et/een customi#ation and e!tension? Customi6ation is under direct user control. 1he user e5plicitly selects between certain options. /sing customi6ation a user can<ering the !unctionality o! an application <ering e5isting /@ <ering e5isting business logic E5tension is about e5tending the !unctionality o! an application beyond what can be done through personali6ation. /sing e5tension we can&dd new !unctional !lows E5tend or o"erride e5isting business logic Create Gew application module Create Gew page Create Gew attribute E5tend 0"erride de!aults F "alidations 4 ) What is :ersonali#ation? +ersonali6ation enables you to declarati"ely tailor the /@ loo2#and#!eel' layout or "isibility o! page content to suit a business need or a user pre!erence. /sing +ersonali6ation we can> 1ailor the order in which table columns are displayed. > 1ailor a %uery result. > 1ailor the color scheme o! the /@. > Folder Forms > ,o Forms +ersonali6ation 4")Can ,ou e!tend e%er, possi-le 0pplication 1odule? &nswer- Go..$oot &M cannot be e5tended. 4$) What is root01? 1he application module which is associated with the top#le"el page region .the page*ayout region) is root application module. 5() Wh, can;t Root 01 -e e!tended? 1he root &M is loaded !irst and a!ter that the M,( (ubstitutions are parsed. 3ence $001 &M gets loaded e"en be!ore the time the substitutions de!inition !rom M,( layer get wor2ed out.
0b"iously' the root am cant substitute itsel!' hence it can=t be e5tended.
5')/e ha%e W@EABV02480CEBRECOR8? What /ill -e the equi%alent to that in O0Frame/or6?
0ns/er # /se a method named "alidateEntity.) within the Entity 0bject. 52)in /hich e!tension to Vie/ O-.ect is not up7rade sa&e?
Answer # @! the original "iew object was created in e5pert mode' then you will ha"e to copy the
0riginal B0 )uery and then you will paste that ()* (tmt )uery into the e5tended Biew 0bject. Gow' i! 0racle were to change the original ()* (tatement Tagainst original B0U' then those changes will not be re!lected in e5tended Biew 0bject. @s there any solutionY 4ell' yes' depends on what you wish to achie"e "ia personali6ation. @! you simply wish to alter the where clause dynamically' then you might as well do that by e5tending the controller. Gote-# 4hen e5tending the C0' we are assuming that at least the selected table aliases !rom the 0riginal ()* (tatement will not be remo"ed by 0racle=s patches. 53)@o/ do ,ou disa-le all the O0 Frame/or6 personali#ations in e*usiness 9uite ?
Ans( &ll the personali6ations done to the system can be disabled by simply setting a pro!ile option to
Ies at site le"el. Game o! this pro!ile option is something li2e ,isableZ(el!Z(er"iceZ+ersonalZ Aote-# Iou can de#acti"ate personali6ations against indi"idual pages selecti"ely' by clic2ing on button VManage +ersonali6ationsV. Iou may need to gi"e yoursel! access to responsibility named VFunctional &dministratorV' so that you can disable personali6ations selecti"ely. 54)What is a 8ata-ase Connecti%it, File ? @t is a .dbc !ile which is speci!ied in the project properties. 1he location o! this !ile on the ser"er is NFG,O10+ secure 55) What is the di&&erence -et/een customi#ation and e!tension? Customi6ation is under direct user control. 1he user e5plicitly selects between certain options. /sing customi6ation a user can<ering the !unctionality o! an application <ering e5isting /@ <ering e5isting business logic E5tension is about e5tending the !unctionality o! an application beyond what can be done through personali6ation. /sing e5tension we can&dd new !unctional !lows E5tend or o"erride e5isting business logic Create Gew application module
Create Gew page Create Gew attribute E5tend 0"erride de!aults F "alidations 56) What is :ersonali#ation? +ersonali6ation enables you to declarati"ely tailor the /@ loo2#and#!eel' layout or "isibility o! page content to suit a business need or a user pre!erence. /sing +ersonali6ation we can> 1ailor the order in which table columns are displayed. > 1ailor a %uery result. > 1ailor the color scheme o! the /@. > Folder Forms > ,o Forms +ersonali6ation 5 )Can ,ou e!tend e%er, possi-le 0pplication 1odule? &nswer- Go..$oot &M cannot be e5tended. 5") What is root01? 1he application module which is associated with the top#le"el page region .the page*ayout region) is root application module.