Which is better creating view accessor based on view object or view instanc

When creating view accessors whether in the entity object or in the view object, we have two options:
1- create the view accessor based on a view object.
2- create the view accessor based on a view instance.
what are the differences between these two options?
what are the cases where I should only use option 1 or option 2?
which one is better?

Hello Timo,
I will try to explain my question better.
when we create view accessor, after click on create new view accessor icon, the create view accessor window is opened, at the header of this window there is a statement says:
Select a view object or shared view instance and shuttle it to the selected list to create a view accessor.
and here is my concern, which one to use
1- select a view object from one of the available view object and shuttle it to the selected list.
2- select a view instance from the application module and shuttle it to selected area.
If you have FOD sample (and I am sure you have it :) ), I see that oracle team has used both of them in different places, for examples
1- in oracle.fodemo.storefront.entities.PersonEO all view accessors are created from view instance in SharedLookupService application module.
<ViewAccessor
    Name="PersonTypesVA"
    ViewObjectName="oracle.fodemo.storefront.lookups.LookupsBaseVO"
    AMUsageName="SharedLookupService"
    ViewInstanceName="PersonTypes"/>is it because they are used to create LOV?
2- in oracle.fodemo.storefront.entities.OrderEO the view accessor is created from a view object, not from instance inside application module.
    <ViewAccessor
    Name="OrdersVO"
    ViewObjectName="oracle.fodemo.storefront.store.queries.OrdersVO"/>I couldn't find the usage of this accessor?
Hope it is clear now.

Similar Messages

  • Which is better External View OR Database procedure Proxy ?

    Hi Jasmin and Kilian,
    Creation of External View in HANA and consume in ABAP.
    Which is better External View OR Database procedure Proxy.
    Regards,
    Pravin
    Message was edited by: Jens Weiler
    Branched from http://scn.sap.com/thread/3498161

    Hi Pravin,
    that depends on your application logic and use case. There is no general recommendation for one or the other.
    If, for instance, you have input parameters, you would go for a DB procedure proxy, since the external view does not allow to pass input parameters from the ABAP to the HANA column view.
    On the other hand, if you would like to consume the result in an ALV with integrated data access (the "next generation ALV"), you would rather go for an external view... so - like the answer to so many other questions - it depends... .
    Cheers,
      Jasmin

  • Which Is Better:Create The Database Manually Or As a Part Of  Your Code?

    hi everybody
    i just want to know people when you creating a JDBC Application
    and introduce the program to the user to deal with
    do you create the database through the database client like phpmyadmin for mysql
    or by using query in your program?if so when you use the query in your flow of code?
    or you restore an empty database backup file enclosed in the setup directory?
    i just want to know what is the best design way when creating the database on the end user machine?

    First_knight wrote:
    and how do you deal with user installing new operating system,or formatting the hard disk?
    you tell him to take backup of the database then restore it again,right?yes. How else is he going to preserve his data?
    sheesh...
    In real applications the database is just about always maintained separately from the application and contains a lot of logic and structures that you can't create using Hibernate, JPA, or whatever.
    It's also almost always a database that's been in existence for a long time, well before you ever were asked to write that Java application to talk to it.
    Autogeneration of tables is nice for rapid prototyping or for demo purposes where it allows you to install the application more easily, but that's about it.

  • Cannot create a summary based on remote objects

    Has anyone ever come across this error when creating a summary folder for a warehouse, using a DB Link?
    Does anyone know how to resolve this?

    Hi
    This is not a restiction of Discoverer, this is a SQL restriction, and it makes jolly good sense if you think about it.
    You cannot create a materialized view across a database link. This is because the optimizer only works within its database. It cannot cross a database link because it will be interfering with the optimization of another database and thus will be unable to determine whether a query should be redirected. So if a query cannot be redirected, what's the point in having a materialized view, or, in Discoverer's language, a summary table?
    How can you resolve this? Simple: you make sure that the summary and the objects upon which the summary will be based all exist within the same database.
    I know this is probably not the answer that you wanted.
    Best wishes
    Michael

  • "Create View" Long time

    Hi All,
    When I run "create view" command, it takes long time on Oracle 10.2.0.5 and Db mode is Physical Standby (Read-Write). I tried some configuration for tuning but didn't reach to solution.
    What can be reasons of this latency ? Have you any ideas ?
    B.R.
    Edited by: ozgurumut on Mar 6, 2013 1:03 AM

    Everyday, We create flashback point then activate Standby DB, finally Open DB for internal user. End of day DB returns to flashback point (flasback restore) to morning. So Read write :) That you haven't mentioned earlier ;)
    You can find ASH report on this link http://www.2shared.com/document/VwEVound/ASH_Rpt_-_mngdb1.html
    Reviewed ASH report, Am not sure when you took the ASH report. Lets suppose you have given "Create view" command around 9:10 AM and completed by 9:20 AM, Take ASH report only from start date and time of 9:10 AM to 9:20 AM. If you took based on the same then i cannot see any query which is executing "create view",
    Or else you can try again as below.
    1) Connect to the session where you are going to give command "create view"
    2) Gather sid from v$session
    3) from the other session check
    SQL> select event, total_waits, Total_timeouts, time_waited, max_wait from v$session where sid=<>;
    Here you have to mention sid you gathered from the step 2.
    Then you can see where it is waiting exactly, Moreover i dont think it is issue with Standby database[read-write]

  • Which is better white ipad or black ipad?

    I want to get the new ipad and I have gone to the store and seen both the black and the white one. But sometimes there are limits to what you can do. I want to know how they compare.
    Of course I know color is my preference. But from someone who has used either. Which is better for viewing movies and photos? I would assume black, but then I have read a few that said the white makes everything pop and look better. They advertised the white more, but then in some ads show the iphoto on the black one ?
    Any views?
    Thanks!

    BLACK
    But, I must admit that when they come out with the RED one -
    it will match my new Volvo S60 D3 with two-tone steering wheel…
    Now that will be distracting (but fun!)

  • Which is better ? Toplink Java objects or Toplink Entities ?

    Hi
    We are planing to use Toplink JPA that comes with JDeveloper 11g preview release
    I have a question here!
    I would like to get clarified which is better to use :
    1. Toplink Java Objects from Tables ,
    2.Toplink Entities from Tables
    Could you suggest the best approach, and pros and cons of both the approaches?
    Thanking you ,
    Samba

    Samba,
    Ultimately both are using the same TopLink runtime. In the case of Entities you are using JPA and Java Objects you are using TopLink native API and metadata.
    Going forward I would recommend JPA with TopLink extensions as required.
    Doug

  • A dynamic table based on run-time created view object -- please help!

    Hello!
    I'm trying to create a dynamic table based on an run-time created view object. All go ok, but table binding component take the first view/iterator state and don't reflect changes they have. Please, take a look:
    1. At run-time the view is being replaced by new red-only one based on query in application module:
    getQueryView().remove();
    createViewObjectFromQueryStmt("QueryView", statement);
    2. Page definition file contains an iterator (using iterator or methodIterator - doesn't matter) binding and table, which binds to the iterator, like:
    <methodIterator id="distributeQuery1Iter" Binds="distributeQuery1.result"
    DataControl="QueryServiceDataControl" RangeSize="10"/>
    <table id="distributeQuery11" IterBinding="distributeQuery1Iter"/>
    3. The page code uses <af:table>. But, if I use table binding (it's right) like this:
    <af:table var="row" value="#{bindings.distributeQuery11.collectionModel}">
    <af:forEach items="#{bindings.distributeQuery11.attributeDefs}" var="def">
    the table will never changed (i.e. still show the first view instance).
    When I tried to use iterator binding directly (it's bad and cannot provide all needed features unlike CollectionModel from table binding) I saw that table works!
    (Code is somehing like:
    <af:table var="row" value="#{bindings.myIterator.allRowsInRange}">
    <af:forEach items="#{bindings.myIterator.attributeDefs}" var="def">
    Why the table binding do not reflect changes in iterator? Or should I use different approach?
    Thanks in advance!
    Ilya.

    I got it to work! I used a hybrid approach comprised of some of your code and some of Steve Muench's AcceessAppModuleInBackingBean example.
    In the setBindings method, I execute an app module method that redefines the query, then I used your code to delete and recreate bindings and iterator:
    public void setBindingContainer(DCBindingContainer bc) {
    this.bindingContainer = bc;
    rebuildVO();
    The rebuildVO() method looks like the code you provided in your example:
    private void rebuildVO() {
    DCDataControl dc;
    DispatchAppModule dApp;
    DCBindingContainer bc;
    DCIteratorBinding it;
    OperationBinding operationBinding;
    ViewObject vo;
    DCControlBinding cb;
    try {
    bc = getBindingContainer();
    dc = bc.findDataControl(DATACONTROL);
    dApp = (DispatchAppModule)dc.getDataProvider();
    // Execute App Module Method to rebuild VO based upon new SQL Statement.
    dApp.setDispatchViewSQL();
    vo = dApp.findViewObject(DYNAMIC_VIEW_NAME);
    it = bc.findIteratorBinding(DYNAMIC_VO_ITER_NAME);
    it.bindRowSetIterator(vo, true);
    // logger.info("Remove value binding...");
    cb = bc.findCtrlBinding(DYNAMIC_VIEW_NAME);
    cb.getDCIteratorBinding().removeValueBinding(cb);
    bc.removeControlBinding(cb);
    // logger.info("Creating new value binding...");
    FacesCtrlRangeBinding dynamicRangeBinding =
    new FacesCtrlRangeBinding(null,
    bc.findIteratorBinding(DYNAMIC_VO_ITER_NAME), null);
    // logger.info("Add control binding...");
    bc.addControlBinding(DYNAMIC_VIEW_NAME, dynamicRangeBinding);
    } catch (Exception e) {
    e.printStackTrace();
    And my App Module method that redefines the view object looks like this:
    public void setDispatchViewSQL() {
    String SQL =
    "begin ? := PK_BUsiNESS.F_GETDISPATCHVIEWSQL();end;";
    CallableStatement st = null;
    String ViewSQL = null;
    try {
    st = getDBTransaction().createCallableStatement(SQL,
    DBTransaction.DEFAULT);
    * Register the first bind parameter as our return value of type LONGVARCHAR
    st.registerOutParameter(1, OracleTypes.LONGVARCHAR);
    st.execute();
    ViewSQL = ((OracleCallableStatement) st).getString(1);
    findViewObject(DYNAMIC_VO_NAME).remove();
    ViewObject vo = createViewObjectFromQueryStmt(DYNAMIC_VO_NAME, ViewSQL);
    vo.executeQuery();
    } catch (SQLException s) {
    throw new JboException(s);
    } finally {
    try {
    st.close();
    } catch (SQLException s) {
    s.printStackTrace();
    When I run it I get my desired results. One thing I don't quite understand is why when the page is first rendered it shows the last set of records rather than the first. Now I have to figure out how to put navigation URLS in each of the table cells.
    Thanks for your help; I would not have gotten this far without it,
    Jeff

  • Which is better to install Oracle 11g database based on ASM or Filesystem

    We will install 2 sets of Oracle 11.2.0.3 on Redhat Linix 5.6 and configure Data Guard for them further -- one will be a primary DB server, the other will be a physical standby DB server. The Oracle DB stoage is based on SAN Array Disk with 6TB size. Now there are two options to manage the DB datafiles:
    1. Install Oracle ASM
    2. Create the tranditional OS filesystem
    Which is better? in the past, our 10g data guard environment is not based on Oracle ASM.
    Someone think if we adopt the oracle ASM, the shortcomings are :
    1. as there is one more instance that will consume more memory and resource.
    2. as the ASM file system cannot be shown out on the OS level directly such as "df" command, the disk utilization monitor job will be more difficult. at least it cannot be supervised at OS level.
    3. as the DB bshoule be done the daily incremental backup (Mon-Sat) to Local Backup Drive. the bakup job must be done by RMAN rather than user-managed script.
    Who can provide some advices? Thanks very much in advance.

    user5969983 wrote:
    We will install 2 sets of Oracle 11.2.0.3 on Redhat Linix 5.6 and configure Data Guard for them further -- one will be a primary DB server, the other will be a physical standby DB server. The Oracle DB stoage is based on SAN Array Disk with 6TB size. Now there are two options to manage the DB datafiles:
    1. Install Oracle ASM
    2. Create the tranditional OS filesystem
    Which is better? in the past, our 10g data guard environment is not based on Oracle ASM. ASM provides a host of new features ito data management, and performance - to the extent that you can rip out the entire existing storage system, replace it with a brand new storage system, without a single second of database downtime.
    Someone think if we adopt the oracle ASM, the shortcomings are :
    1. as there is one more instance that will consume more memory and resource.Not really relevant on 64bit h/w architecture that removes limitations such a 4GB of addressable memory. On the CPU side... heck, my game PC at home has a 8 core 64bit CPU. Single die and dual core CPUs belong to the distant past.
    Arguing that an ASM instance has overheads would be silly. And totally ignores the wide range of real and tangible benefits that ASM provides.
    2. as the ASM file system cannot be shown out on the OS level directly such as "df" command, the disk utilization monitor job will be more difficult. at least it cannot be supervised at OS level.That is a A Very Good Thing (tm). Managing database storage from o/s level is flawed in many ways.
    3. as the DB bshoule be done the daily incremental backup (Mon-Sat) to Local Backup Drive. the bakup job must be done by RMAN rather than user-managed script.
    rman supports ASM fully.
    I have stopped using cooked file systems for Oracle - I prefer ASM first and foremost. The only exceptions are tiny servers with a single root disk that needs to be used for kernel, database s/w, and database datafiles. (currently these are mostly Oracle XE systems in my case, and configured that way as XE does not support ASM and is used as a pure cost decision).

  • How to CREATE VIEW to merge two tables each of which has CLOB-typed column

    I failed in creating a view to merge two tables that have CLOB-type column each.
    The details are:
    Database: Oracle 9i (9.2.0)
    Two tables "test" and "test_bak", each of which has the following structure:
    ID Number(10, 0)
    DUMMY VARCHAR2(20)
    DUMMYCLOB CLOB
    The following operation fails:
    create view dummyview (id, dummy, dummyclob) as
    select id, dummy, dummyclob from test
    union
    select id, dummy, dummyclob from test_bak;
    I was announced:
    select test.id, test.dummy, test.dummyclob
    ERROR in line 2:
    ORA-00932: inconsistent data type: required - , but CLOB presented.
    But if creating views from only ONE table with CLOB-type columns, or from two tables WITHOUT CLOB-typed columns, the creation will succeed. The following 1) and 2) will succeed, both:
    1) one table, with CLOB-typed column
    create view dummyview (id, dummy, dummyclob) as
    select id, dummy, dummyclob from test;
    2) two tables, without CLOB-typed columns
    create view dummyview (id, dummy) as
    select id, dummy from test
    union
    select id, dummy from test_bak;
    I want to merge the two tables all, with complete columns, how to write the CREATE VIEW SQL statement?
    many thanks in advance

    Dong Wenyu,
    No.
    But you could do this:
    SELECT source.*, nvl (tab1.clob_column, tab2.clob_column)
    FROM your_table1 tab1, your_table2 tab2, (
    SELECT primary_key, ...
    FROM your_table1
    UNION
    SELECT primary_key, ...
    FROM your_table2
    ) source
    WHERE source.primary_key = tab1.id (+)
    AND source.primary_key = tab2.id (+)
    In other words, do the set operation (UNION (ALL)/INTERSECT/MINUS) on just the PK columns before pulling in the LOB columns.
    d.

  • Window vs view - how can i jump to a view which was previously created?

    Hello!
    how can i jump to a view previously created without the push or pop to view function?
    I have a UITabBarController with several view(s) (controllers)* and in one of my views i am using a navigation controller which pushes to various views. At the end, i would like to have a button, where the user can go back to its initial view (when the application is starting) i guess, that it has something to do with the rootview Controller.. the problem is: i dont have a root view controller because i am working with the TabBar example from apple, which is using the IB.
    thx for any hints..
    alex
    *which still is not working.. availiable at http://www.learnclip.com/iphone_tutorials/ViewPusher.zip

    You know what, about 30 seconds ago I figured out what I did. I set the Quiz preferences to “Required to pass before continuing” instead of “Required to take quiz”.
    I am sure Action Script is the wrong term (I’ve only used Captivate for 2 weeks). I applied an Advanced action to skip over the knowledge checks. I got the tutorial from this link:
    http://blogs.adobe.com/captivate/2011/07/excluding-knowledge-check-questions-when-reviewin gretaking-the-quiz.html
    Thanks for replying!
      Tiffany Robinson│Instructional Designer│Design and Development Team
       Email: [email protected]<mailto:[email protected]> │ Phone: 386-218-3577
      Check out thousands of free books and reports from Books 24x7 in the Kelly Learning Center!
            Kelly Services, Inc.

  • Which is better - Add a dimension or create more members in an existing

    Which is better - Add a dimension or create more members in an existing dimension?
    We are trying to figure out which can give us better performance in terms of calculations and retrieving reports - to add another dimension (entity/country) or add about 500-800 more members in an existing location/division dimension?
    Thank you!

    If you have BSO cube i would recommend to add in the same dimension where as ASO you can add members in a new dimension. Adding a new dimension is like creating a new cube you have to change each and every single calc scripts,report scripts,FR reports,Webforms and your rule files .... all the dependencies has to be changed manually . I think 500 members in the exsting BSO dimension will not impact the calc or retrieval times that much .

  • Need to create a block based on view

    We can create a block based on procedure...but whats the need to do so...please can anybody explain.

    create the block with the data block wizard. Use your View as Data-Source.
    After that set all items to QUERY-ONLY, when they are not updateable. E.g. if you create a view from EMP to DEPT. Then it is not allowed to update DNAME. DNAME is set to QUERY-ONLY.

  • Which is better A-A or A-S with IPMP link based?

    Hello.
    I'd like to know good configuraion with IPMP link based.
    I know there are 2 options, Active-Active and Active-Standby.
    Which is better?
    Actually I think A-A is better. Because if I use A-S option, you can not see the up status with secondary nic.
    Thank you for your help ;)
    Regards,
    River Lee.

    USB is better and faster

  • Create view structure based on table

    Hi,
    I've got two tables one spec table containing a table num, column name and column length. For example:
    Table num             Column name         Column length
    1                    client_id                          8
    1                    client_name                    15
    1                    client_gender                   1
    2                    order_num                       4
    2                    order_date                       8
    ...and one data table containing multiple records with table num and data for each table num defined in spec table. For example:
    Table num          Data
    1               12345678Ben Anderson   M
    1                75486923Evy Jans       F
    2                123420/05/07
    2                000117/04/07
    ...How can I create a script to create a view for table num '1' based on the strucure defined in the spec table and containing the data of table one that is stored in the data table?
    Thanks.
    Regards,
    Ken

    Assuming that the spec table has a column position column then given these tables:
    SQL> SELECT * FROM tab_spec;
        TAB_ID COL_NAME                          COL_LEN    COL_POS
             1 client_id                               8          1
             1 client_name                            15          2
             1 client_gender                           1          3
             2 order_num                               4          1
             2 order_date                              8          2
    SQL> SELECT * FROM tab_data;
        TAB_ID DATA
             1 12345678Ben Anderson   M
             1 75486923Evy Jans       FA procedure along the lines of:
    CREATE PROCEDURE make_view (p_tab_id IN NUMBER,
                                p_view_name IN VARCHAR2) AS
       l_sql   VARCHAR2(32767);
       l_start NUMBER := 1;
    BEGIN
       l_sql := 'CREATE VIEW '||p_view_name||' AS SELECT ';
       FOR r IN (SELECT col_name, col_len
                 FROM tab_spec
                 WHERE tab_id = p_tab_id
                 ORDER BY col_pos) LOOP
          l_sql:= l_sql||'SUBSTR(data,'||l_start||', '||r.col_len||') '||
                  r.col_name||',';
          l_start := l_start + r.col_len;
       END LOOP;
       l_sql := RTRIM(l_sql, ',')||' FROM tab_data WHERE tab_id = '||p_tab_id;
       EXECUTE IMMEDIATE l_sql;
    END;should do the trick. Note that the owner of the procedure will need to have the CREATE VIEW privilege granted directly and not through a role.
    Having done this, I must reiterate what others have already said. This is a spectacularly bad idea. Rather than creating a view, I would change it to generate a CREATE TABLE statement to dump the data into proper tables.
    John

Maybe you are looking for

  • Open vi reference in executables

    My application requires to run two sub vis in parallel , Even though the VI is running the executable is showing reference. I am using open VI reference to open the sub vi from the main vi please reply..urgent

  • HP LaserJet 2605dn display is blank and will no longer print

    I have had this printer for several years and has always worked flawlessly, until just recently. I encountered a severe jam and still had 40+ pages in the buffer that could not easily be recreated, so i decided to leave the computer on while removing

  • ID for Outbound Email in CRM 5.0 Web IC

    Hi ! We would like to get the turn around time for an email request in the CRM 5.0 Web IC. We are able to get the timestamp of the inbound email from the Service Ticket in the business context. Is there a way to retrieve the outbound email (reply) ti

  • Firefox Ver. 34.0.5 fails to render Youtube website. CSS not working. Ideas?

    Youtube.com website not rendering (CSS requests are not working), and videos not accessable. This is not related to any plugin issues, such as Flash, etc. The youtube.com main page renders like an experimental HTML document, with no style-sheet info.

  • [svn:osmf:] 13806: Fix a bug with the handling of drm metadata/ additional header

    Revision: 13806 Revision: 13806 Author:   [email protected] Date:     2010-01-27 10:00:06 -0800 (Wed, 27 Jan 2010) Log Message: Fix a bug with the handling of drm metadata/additional header Modified Paths:     osmf/trunk/framework/OSMF/org/osmf/net/N