Skip to Content
author's profile photo Former Member
Former Member

query regarding the onload event of orderlist.java in MAM code

a) Condition condition = null;

b) condition = queryBuilder.getOrderSimpleCondition ("SYNC_KEY", RelationalOperatorType.NOT_EQUALS, "0");

}

c) context.addValue("orderListType", orderListType);

-


In the above lines of code ,

Plesae tell few things:

1) what is the purpose of Condtion Object in a) ?

2) what is the purpose of querybuilder in b)? Does it just makes a condtion for the data to be fetched or after making the condition it goes to the database and fetches the result ? .

When i debug the application condition just contains " SYNC_KEY<> 0"

3) In c) orderlisttype is the list variable that contains the orders fetched from database, if i am right ? Then who is setting the orders from the database to this list variable ?

-


Basically , i am looking for how data is fetched from database , put into variables ane then how data from these variables is shown to the user through JSP in MAM Code ?

I tried to debug the application and understanding it , but debugging takes you into JAR files ( compiles class files ), so got stuck there.

SO , could anybdy please share his knowledge on MAM Code or how to go abt it ?

Thanks & Regards,

Vipin

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Sep 25, 2006 at 06:43 AM

    Hi Vipin,

    Condition is used so that a query can be performed on the database and only records true to the Condition can be selected. In simple terms Condition forms the where clause of the query.

    As such, creating a Condition object itself will not result in a hit to the database. But Condition can be used in creating a Query object to form the Where clause part of the query.

    Best Regards,

    Sandeep

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi all,

      Thanks to everybdy for their inputs and i am able to track many things in Code nw.

      Could you guys tell me few details about this function ?

      public BOList getMam001s() throws BOException {

      Object pTag = PerformanceLog.methodStarted(this);

      try {

      BOList list = (BOList)naming.create(BOList.class.getName());

      RowCollection rows = dataFacade.getRows(SYNC_BO_DESC.getTopRowDescriptor());

      ............

      ..............} //Function Ends

      1) what is the pupose of below line of code ?

      Object pTag = PerformanceLog.methodStarted(this);

      2) RowCollection rows = dataFacade.getRows(SYNC_BO_DESC.getTopRowDescriptor());

      With the above line of code , are we asking the persistance to get us the data for Orders SynBO ?

      If yes, then this means rows variable should have all the Orders data in it, Am i right ?

      Also, as we can see from MAM code that for fetching orders data , we use following condition:

      condition = queryBuilder.getOrderSimpleCondition("SYNC_KEY", RelationalOperatorType.NOT_EQUALS, "0");

      I cant see this condition being used , if above statement is used for getting data ?

      3)One more thing, as we know that getMam001s() fucntion fetches the data for order list. i have put a debug point in this function . But , while debugging control never reaches in this function.

      Debug is able to reach following function:

      class ListTag :

      public int doStartTag() throws JspException

      {

      pageContext.getOut().print(PageBuilder.displayList(listName, pageContext, getListHeaderScope(), getListDataScope(),getNavigationLinkScope()));

      }

      Thanks & Regards,

      Vipin.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.