Designing totals wit BC4J

How would you design this:
You have a table REV of revenues per day (date PER and number REV). There may be more than one row per day (let's say one for each order). You have to make BC4J that give you access to the single rows for retrieval and update. So far no difficulty (default EO and VO will do). But you have to keep track of the daily and monthly sums of the revenues, displaying them and updating them as the user adds rows to the table REV and makes changes to existing rows.
So I may make two expert mode VOs that retrieves the sums (one for the monthly and one for the daily sums). But where to keep track of the uncommited revenues ? A VO can not subscribe events, can it ? And I think it is not possible to make a EO that is based exclusively on calculated attributes (this had to be the case since there is no DB-Object corresponding to the sums, and I am not willing to make a DB-View for this purpose, as I would certainly get into performance issues with the inevitable group-by).
I had to handcraft two hashtables for the sums of the uncommited changes against the months and days, respectively, and put them into the EO of REV.
Or I put the calculations into the VO of REV, present it with the means of client methods (or client row methods?), and back it up again with hashtables to cache the values. But how to catch the uncommited changes ?
Pascal Glauser

<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by JDev Team:
I guess you would want to update the values of 'dailyTotal' and 'monthlyTotal' as the user add/updates individual rows of data (i.e revenue for each day)
You could add two transient/caluclated attributes at the EO level
1) dailyTotal
2) monthlyTotal
these two attributes are not persistent and not database columns
The EO would also have other database colums such as 'Revenue'
In the setRevenue() method (which gets invoked whenever the user manipulates the row) you could recaluclate the transient attributes.
For ex:
public void setReveunu(Number value) {
Number dayrev = getdailyTotal();
dayrev.add(value);
setdailyTotal(dayrev);
this would add the new value updated in the revenue column of a day to the dailyTotal.
you could add some more logic into the setter of the revenue to suit your needs, similarly you could also do for the monthlyTotal.
You would want to keep the Transient attributes at the EO if you want them to seen across different VO's or if the Transient attribute need to be seen by a single VO then you could maintain it the VO level.
raghu<HR></BLOCKQUOTE>
Dear JDev Team
Thank you very much for your answer.
I know about the possibilities of transient attributes at the EO level. There will indeed be some more logic as the frequency of the sums is not the same like the frequence of the entity itself.
I noticed that there can be calculated attributes at the VO, too. The missing link is, how will the VO be informed, if an attribute of one of its rows is changed. A VO cannot subscribe events, can it ?
Pascal Glauser
null

Similar Messages

  • Have any extension framework that design based on BC4J/ADF

    Hi all:
    have any one know that whether have any commercial or opensource extension framework that design based on BC4J or ADF, we need a complete application framework to build ERP system through JClient technology,
    we wish concentrate on translating business rules and process to code instead of worrying about the technical plumbing required to create application systems. and need a set of standard components to ensure a consistent look-and-feel and corporate identity among all applications.
    Oracle JHeadstart is good extension framework and 4GL tool that is based on struts/JSP/UIX solution, but we need a JClient 4GL tool like it.
    JTwister is a good application framework solution for Swing technology, but cannot adopt with BC4J/ADF.
    if you have any idea, please give me a suggestion.

    http://www.inpowersoft.com/bc4j/index.htm - might be what you are looking for.

  • How to fulfill "component-based" design architecture  through BC4J

    who can help to explain some principles or discipline ,
    how to get entrprise component-based architecture application through adopt BC4J or ADF framework ?

    Components based means that you create components that you can reuse in your application or other applications.
    When you work with BC4J for example you can create entity objects that can be reused in different view objects, view objects can be reused in different application modules, and application modules can be used in other application modules.
    When you work with ADF you create a component that access your data - for example and EJB and you can reuse it to create a JSP ui or a Swing UI or another Java object that access it.
    Java is object orienter - you don't get any more "component" oriented than that.

  • Anyway to have JDeveloper dynamically load BC4J components in memory?

    We are dealing with a large BC4J based application that contains large amount of application modules. So far, 300 application modules and total 4000 BC4J objects have been created. The size of the application still keeps growing daily... may up to twenty times than what we are having right now.
    While the application size growing, some unusual problem comes out. The biggest problem is that it makes JDeveloper very sluggish. It takes 15 minutes to just open JDeveloper and may need a few minutes to open the application module editor. (FYI: in our team, most developers have 1G memory and 1.8G CPU or up.) This is probably still OK for right now, but it will become a big problem later when the project size grows.
    When we analysis the project structure, we know that most of time, developer does not need to load all the application modules. For example, we have a core package that contains about 30 application modules. This core package needs to be shared and should be loaded. But, the other nine packages contain about 30 application modules each do not need to be loaded into memory at the same time in most cases. Since BC4J is XML based, we could not find a way to just partially load those application modules, especially when there’s cross references between them.
    When we check the project.jpr file, looks like all BC4J objects are referenced there. We have 40K lines in our project.jpr file now. When open JDeveloper, we believe JDeveloper will try to load all referenced BC4J XML content into memory. This consumes 500M memory and makes the overall performance very sluggish. The situation may become even worse when the project size keeps growing. For example, we cannot have 5000M (5G) memory in a development machine for 3000 application modules.
    We do know that by checking out the "ScanSource Paths to Determins Project Contents" in the Input Paths of Project Settings, we can short the JDeveloper’s open time, but this will not give BC4J relationship information and some other useful information… Not a practical solution.
    So, any idea to make JDeveloper dynamically loaded BC4J based on need?
    We’ve tried a few ways. One is to partition the application into different project and import the core one into the other projects. Only open the project in workspace when need. But this is not officially documented by Oracle and we are not sure whether it is possible/correct or not. Another thought is to remove the NOT-CURRENTLY-USED package from the project. But JDeveloper only support file level remove.
    Any help on this dilemma will be highly appreciated.
    Thanks,
    Charles

    The package is the unit of loading in the IDE for ADF business components.
    To edit components, they must belong to the project.
    To refer to components in a read-only way, they can be imported. This allows other editable or read-only components to refer to them without allowing the imported components to be edited.
    Both editable and imported components need to be loaded in memory to use them, so you can save memory at design time by creating projects that leave out as many packages as possible.
    Is there a way we can get your existing project in house to study its design time performance?

  • SSRS Report - Group Totals are Zero when Group Row Hidden

    I have a report with one group called Counties. This group has a filter.
    I added code to produce the totals for Prior, Current and DistinctCount:
    Public Shared Dim grandTotal1 as Decimal = 0
    Public Shared Dim CountyTotal1 as Decimal = 0
    Public Function AddTotal1(ByVal b AS Decimal) AS Decimal
    grandTotal1 = grandTotal1 + b
    CountyTotal1 = CountyTotal1  + b
    return b
    End Function
    Public Function GetCountyTotal1()
    Dim ret as Decimal = CountyTotal1
    CountyTotal1 = 0
    return ret
    End Function
    Public Function GetGrandTotal1()
    Dim ret as Decimal = grandTotal1
    grandTotal1= 0
    return ret
    End Function
    Public Shared Dim grandTotal2 as Decimal = 0
    Public Shared Dim CountyTotal2 as Decimal = 0
    Public Function AddTotal2(ByVal b AS Decimal) AS Decimal
    grandTotal2 = grandTotal2 + b
    CountyTotal2 = CountyTotal2  + b
    return b
    End Function
    Public Function GetCountyTotal2()
    Dim ret as Decimal = CountyTotal2
    CountyTotal2 = 0
    return ret
    End Function
    Public Function GetGrandTotal2()
    Dim ret as Decimal = grandTotal2
    grandTotal2= 0
    return ret
    End Function
    Public Shared Dim grandTotal3 as Decimal = 0
    Public Shared Dim CountyTotal3 as Decimal = 0
    Public Function AddTotal3(ByVal b AS Decimal) AS Decimal
    grandTotal3 = grandTotal3 + b
    CountyTotal3 = CountyTotal3  + b
    return b
    End Function
    Public Function GetCountyTotal3()
    Dim ret as Decimal = CountyTotal3
    CountyTotal3 = 0
      return ret
    End Function
    When it runs, it gives me this:
    This works fine. But now I need to hide the details on the counties. I just need the line with the 15, 32 and the 9.
    I highlighted the group row, right clicked -> Row Visibility and changed it to Hide. But when I do this, my results are three zeros.
    I am at a loss now on how to just show the totals. Does anyone have any suggestions for me to try?
    cpemtp1

    Hi cpemtp1,
    Per my understanding that you just want to get the total display in the report and hidden the details, right?
    I have tested on my local environment and suggest you to create an new dataset and using the query below to get the Total of every country and then you can using the SUM() function to sum the total of all the country which meet the  conditions.
    Detail information below for your reference:
    Create an new dataset and using the query below to get the sum of every country meet the filter condition:
    Select a.PRIORYEAR,a.CUREENTYEAR ,a.Country from (select SUM(PRIORYEAR) as P1,SUM(CUREENTYEAR) as C1,Country
    from TableName
    group by Country) a
    where a.P1<=a.C1
    Create an new tablix under the button of the existing Tablix or you can just remove the old tablix as below
    Original Table:
    New designed total:
    If you still have nay problem, please feel free to ask.
    Regards
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • HELP - Message Driven Design

    Hi people,
    we're looking for colleagues who have also implemented a system with
    asynchronous components.
    As we were testing this kind of design, we discovered that response times
    were very very slow (6 seconds, with no work to be done for the components).
    When message driven bean 1 sent messages to message driven bean 2, it took 6
    seconds !!
    This kind of behaviour makes an asynchronous design totally unusable for us.
    Are asynchronous components unusable for any kind of performing application
    Please give us some feedback,
    Jubin Zawar

    well so far we tested on jboss, now its weblogics turn :))
    i am intending to design an application with asynchronous components.
    there will be requests posted on topics, and these components will be
    retrieving requests from topics, work on them as long as far as they can,
    and then repost the results on topics.
    other components may take these results and continue working on them, and so
    on ... I think you get the idea.
    this means of course a large amount of messages and topics, this also means
    that message delivery must not take more than 0.1 seconds.
    we will have around 100 topics and 20 types of messagedriven EJBs in there.
    so we decided to test the performance and response times for this kind of
    application, while the ejbs are not yet developed.
    we decided for this simple scenario to benchmark :
    PostingClient posts to Topic1.
    MDB1 (a message driven EJB) is listening on topic1, gets the message, puts
    its time of receipt in the message, and sends it to topic2.
    MDB2 (a message driven EJB) is listening on topic2, gets the message, puts
    its time of receipt in the message, and sends it to topic3.
    MDB3 (a message driven EJB) is listening on topic2, gets the message, puts
    its time of receipt in the message, and sends it to topic4.
    MDB4 (a message driven EJB) is listening on topic2, gets the message, puts
    its time of receipt in the message, and sends it to topic1.
    and when the message is posted to topic1, MDB1 regets the message.
    There is another listener on topic1 --> MonitoringClient.
    MonitoringClient gets the messages arriving there, and reports the times the
    message took between the 4 MDBs.
    Summary : the messages sent into the BEA Server remain in there, and make
    loops from MDB1 to MDB4 and back again, endlessly.
    We tested this scenario on jboss, with 50 messages only. We got times of 2
    to 5 seconds.
    It is also "funny" that the times the MonitoringClient reports are longer
    and longer, they start at 2, and get to 5.
    The max pool size was 200.
    We will be testing this scenario on BEA too, but what do you think about the
    test ?
    Best regards,
    Jubin Zawar
    ----- Original Message -----
    From: "Rob Woollen" <[email protected]>
    Newsgroups:
    weblogic.developer.interest.ejb,weblogic.developer.interest.ejb.ejb20,weblog
    ic.developer.interest.misc
    Sent: Tuesday, May 22, 2001 4:46 AM
    Subject: Re: HELP - Message Driven Design
    Jubin Zawar wrote:
    Hi people,
    we're looking for colleagues who have also implemented a system with
    asynchronous components.
    As we were testing this kind of design, we discovered that response
    times
    were very very slow (6 seconds, with no work to be done for thecomponents).
    When message driven bean 1 sent messages to message driven bean 2, ittook 6
    seconds !!6 seconds seems very long for a JMS message. Can you provide anymore
    information?
    This kind of behaviour makes an asynchronous design totally unusable for
    us.
    >>
    Are asynchronous components unusable for any kind of performingapplication
    ?No, that is not true.
    -- Rob
    Please give us some feedback,
    Jubin Zawar

  • Nested MSO, slideshow inside MSO triggered by button, invisible on start, able to open/close

    Consider the following scenario:
    (albeit, this may not even be the right way to do this, or perhaps such functionality is not possible based on existing tools at this time, however, I thought I would post and see if anyone has a trick to share...)
    I have a slideshow on the page, it is set to auto play.
    I would like to hide it initially, and have it trigger with a button... and then let the user close it. Much like the "light box" effects we have all come to know from the web.
    Seems easy enough.
    However, in my first attempt to do this I did the following:
    1- create an OPEN button (F1)
    2- create a container box and a CLOSE button, grpup them (F2)
    3- turn them both into an MSO (M1)
    4- set the button in F1 to trigger F2 (open state)
    5- set the button in F2 to trigger F1 (close state)
    -> test, works.
    next step, slideshow!
    I grab 5 images, create a new MSO (M2).
    Turn it into a slideshow Folio Overlay...
    -> test, works.
    Now this is where it gets funky...
    MY FAIL 1- If I try to take M2 and then right click M1, there is NO paste into option.
    MY FAIL 2- If I click on the Object States Panel, and then Right click State 2 for M1, there is no "past into option"
    MY FAIL 3- If I try to "Alt+Ctrl+V" with M2 into State 2 for M1 it does not work.
    --> nor does any other scenario where I attempt to paste any MSO into another MSO
    I have even tried
    x- grouping the MSO slideshow with a non MSO element such as a frame, text boxt, image, ect..
    x- taking the 5 images and pasting them into the MSO seperate, and then trying to turn them into a new MSO inside State 2, which the new MSO button is greyed out and will not let me apply it.
    Possible solution I have come up with after looking over alot of Bob's stuff in the tutorials area
    (PS his videos and tut's realy help, its a differant kind of thinking going on here with DPS, I imagine it relates to how the C in the binary works and is translated by the InDesign GUI into app code... would be nice to just type in "function on_tap(){open_slideshow(vars);}"  lol silly programmer, this is primarily a tool for designers  ... but I do think its awesomeness, as a programmer, I dont even want to write code anymore after using DPS and Phone Gap...),
    so... here it is, not necessarily the most attractive...
    1- Make the slide show MSO, push to BACK, set to auto play and swipe allowed...
    2- place a large opaque box on top of the slideshow, group it with the OPEN button
    3- create a close button
    4- turn them into an MSO, now there is an 'open' button in state 1 on top of an opaque box that sends to state 2, and a 'close' button in state 2 that sends to state 1
    This seems to work, I have not tested it on all devices, the iPad will kind of do this wierd glitchy thing, as if it "knows" there is something moving underneath the opaque box. Depending on how I have positioned scrollable frames on top of these elements from a stacking perspective there can be some unexpected behavior. The best results I have had from more complex layouts is to get creative with positioning...
    any other suggestions, tips, tricks, would be appreciated
    ON a site note:
    POSSIBLE BUG:
    ANYTIME I try to take ANYTHING that is already using the FOLIO OVERLAY and right click the STATE in the STATES PANEL
    In Design total crash!!! The only time I can take a  FOLIO OVERLAY (FO) and "right click paste into" an MSO state is by clicking on the state on the stage, it can not be done from the panel, the panel only works with non "FO" items... Even though the state in the panel shows the "past into" option, if I do, *poof* instant app crash... FYI for anyone toying with this. Kudo's to Adobe for the outstanding "auto save" feature. It has saved me time, and there for in some strange way, has also saved some of my life.
    Here is what InDesign poops out when a "Folio object" is attempted to be "pasted into" an MSO via the MSO panel.
    Problem signature:
      Problem Event Name:          BEX
      Application Name:          InDesign.exe
      Application Version:          8.0.0.370
      Application Timestamp:          4f72c3ee
      Fault Module Name:          StackHash_0a9e
      Fault Module Version:          0.0.0.0
      Fault Module Timestamp:          00000000
      Exception Offset:          00000023
      Exception Code:          c0000005
      Exception Data:          00000008
      OS Version:          6.1.7601.2.1.0.768.3
      Locale ID:          1033
      Additional Information 1:          0a9e
      Additional Information 2:          0a9e372d3b4ad19135b953a78882e789
      Additional Information 3:          0a9e
      Additional Information 4:          0a9e372d3b4ad19135b953a78882e789

    @zagarskas – nested MSOs are currently NOT supported by Adobe.
    However we could build such a construct by using ExtendScript (Adobe's flavor of JavaScript).
    The problem with that is, that Buttons inside  a nested MSO will not work as expected. At least my testing is showing that.
    If you want nested MSOs without Buttons (inside the nested one) or if you like to experiment, see the following thread:
    http://forums.adobe.com/message/4573924#4573924
    But please, read the whole thread from a to z ;-)
    Uwe

  • Help Unlocking Template File

    I recently took on a project helping out a colleague who had a Web Designer totally mess up her business.  He created a good site for her, but dropped the ball on hosting it.
    Long story short, he gave her a disc with the files.  The large site is created with Templates.  When I go in and try to edit a template, DW says the file is locked and I can only VIEW the file because it is locked.
    Does anybody out there have an idea as to how I can unlock the specific template files to make changes?

    What I would recommend doing is if you like the template, detach the template and save a new one and base those pages off of it.
    If you click on Modify->Templates->Detach from Template, DW will allow you to edit the template code as if you are editing a plain page.

  • How to write the Query

    i have a table with the fields
    d_date, d_type varchar2(10), d_time number(2,3)
    the data in this table is
    10/10/2007 analyse 150
    11/10/2007 analyse 150
    10/10/2007 create 150
    11/10/2007 create 150
    10/10/2007 Design 200
    11/10/2007 Design 200
    how to create a query to get the following
    analyse create design total
    300 300 400 1000
    30% 30% 40% 100%

    SQL>
    SQL> With t As
      2  (
      3    Select 1 col1, 'analyse' col2, 150 col3 From dual Union All
      4    Select 2, 'analyse', 150 From dual Union All
      5    Select 1, 'create',150 From dual Union All
      6    Select 2, 'create', 150 From dual Union All
      7    Select 1, 'Design', 200 From dual Union All
      8    Select 2, 'Design', 200 From dual
      9  )
    10  Select  Unique
    11           col2,
    12           Sum(col3) over(Partition By col2 Order By col2) sum_col2,
    13           Sum(col3) over() tot
    14          ,Sum(col3) over(Partition By col2 Order By col2)/Sum(col3) over()*100||'%' perc
    15  From t ;
    COL2      SUM_COL2        TOT PERC
    analyse        300       1000 30%
    Design         400       1000 40%
    create         300       1000 30%
    SQL> Message was edited by:
    Nicloei W

  • How can I receive a trial for InDesign CS4?

    We recently made the jump from CS3 to CS5.
    But theres a few things Id like to try out to see the difference
    between CS5 & 4. Especially with InDesign
    SO... does anyone know if its still available?
    How can I contact? email address? etc...
    THANKS EVERYONE!
    WOOHOO!!! =)
    Brian Bibi
    Senior Designer
    Total Identity

    Download Adobe CS4 and CS3 Free Trials Here (incl. After Effects) | ProDesignTools
    Don't install the CS4 trial on top of a CS5 intall. First, they should be installed in chronological order for best results, and second, uninstalling an older version after a newer one (when the trial expires and you're tired of not being able to doubleclick to open any ID file, let alone CS5 files) can cause enough damage to require reinstalling the later version.

  • What is Lazy Loading In AM

    Hi
    My understanding is on lazy Loading is
    At the design Time , The BC4J are associated with RootAM are Instantiated On demand.
    Isn't it?

    Close you old thread also...Dont leave them open until or unless the issue is not resolved.
    DescritiveFlexField Requirement
    The Lazy Loading option defers instantion of view instances and nested application modules until they are needed. This is more performant than choosing to instantiate all referenced objects at AM instantiation time regardless of whether or not they are needed.
    Read more in dev guide
    Thanks
    --Anil
    http://oracleanil.blogspot.com/

  • UDF to User Defined Obect Issue

    Hi,
    I have created UDO,which consist of Bothe header level and Row level, and I have created one UDF under Marketing Documents Title and checked the check box of 'link table' and assigned Header Level table.
    But when I go to A/R invoice and In UDF no link is there. From Invoice I want to go the UDO (Table)Which I have created.
    Regards
    Shashi

    Hi Jambulingam,
    U got me wrong, Actually list does not contain one employee. list contains no of employees involved in particular service. So for this we need to create a UDO Where we can give Invoice document no in header field and in row level we can give the name of employees, designation, Total Days, CTC.
    Note. there can be no of services involved for one Invoice. For each services there will be  list which consist of above mentioned fields
    Any Inputs for this above mentioned scenario?
    Regards
    Shashi
    Edited by: shashi mantripragada on Jun 10, 2009 2:36 PM

  • I may have totally screwed myself but...after installing Yosemite without checking first, my CS4 Design Premium suite wouldn't open. So I deinstalled it, but I only have disks for my old CS3. When I got the CS4 upgrade I downloaded it. What can I do??

    I may have totally screwed myself but...after installing Yosemite without checking for potential problems with Adobe software, my CS4 Design Premium suite wouldn't open. So after consulting some forums, I deinstalled it, but I only have disks for my old CS3. When I got the CS4 upgrade I downloaded it, back in 2011... What can I do?? Everything was fine before I upgraded that *#$%* Yosemite.

    You can find the CS4 download here: https://helpx.adobe.com/creative-suite/kb/cs4-product-downloads.html
    Benjamin

  • How to get grand total in query designer

    Hi,
       Antbody know how to get the grand total after the  last row in query designer? I
    Thanks

    Hi,
    If we select the very first Characterstic in the rows section and set the Supress result rows as "never".
    That will show the overall result in the end of the report,
    In the query properties tab ,check for display properties of the result.That should be set to bottom.
    Hope this will work.
    Thanks
    Mukesh

  • Running totals in crystal designer

    Hi all!
    I want to create a report with running total, that accumulate Balance value for each page.
    Total accumulate should be reseted on each new page.
    I have a query for report: SELECT CardCode, CardName, Balance FROM OCRD.
    And i want a running total for field "Balance" (this total should be reseted on each new page).
    In Crystal Designer I create new Running Total Field (in the PageFooter section).
    In the Editing Running Total window I fill the following sections:
    1) Summary section. Field to summarize: "Command.balance". Type of summary: "sum".
    2) Evaluate section. On change of field: "command.cardcode"
    3) Reset section. I want to choose PageNumber in the field "on change of field". But there is no any special field in the section "Available tables and fields"
    How to reset the running total on each new page?
    Thanks in advance

    Hi all!
    The problem can be solved with report formulas. Probably this information will be useful to somebody.
    So, we have the following task: need to calculate subtotals on each page.
    Let's look at the solution.
    On the first step, create Formula fields:
    1) InitPageSum field has formula:
         WhilePrintingRecords; NumberVar PageSum := 0;
    2) CalcPageSum field has formula:
         WhilePrintingRecords;
         numberVar PageSum := PageSum + {Command.LineTotal}; // I use command to get field-values from //database
         numberVar PageSum
    3) PageBalance field has the following formula:
         WhilePrintingRecords; numberVar PageSum
    On the second step we place formula-fields in report sections.
    1) Variables initialization.
    Insert section in PageHeader area (lets name this section PHa). Drag formula InitPageSum into PHa for zeroing PageSum for each page. Then suppress the section PHa.
    2) Increasing subtotal on page.
    Create additional section in Details area (Dc). Drag CalcPageSum formula-field on this section (Dc). PageSum variable will be increasing in each line. Suppress the section Dc.
    3) Display results.
    a) Insert additional section in PageFooter area (let's name it PFa). Drag PageBalance formula-field into this section (PFa). The section PFa should be displayed on each page of the report, except the last page. The formula is:
    if PageNumber  <>  TotalPageCount then true else false.
    b) Insert additional section in ReportFooter area (let's name it RFa) and make this section the first section of the Report Footer area. Drag PageBalance formula-field into the section RFa. The section RFa should be displayed on the last page only. So, for the Suppress property of this section, create the formula:
    if PageNumber  =  TotalPageCount then true else false
    We make this adjustment (additional section in report footer area) because we need subtotals directly under the report (and not at the bottom of the page)
    Best regards,
    Katrine

Maybe you are looking for