Date display except sunday from database

<bean:write name="peter" property="tDate" >
                    Hi I am displaying the dates from database using above tag.
Now the problem is I dont need to display the dates which are sundays
so let me know how to do this
thanxs in advance

Hi.
In the execute method of the PreloadPayVoucherAction class that is an Action subclass, I suppose that you should set the bean that contains the parameters you want to display in the jsp in the request scope. For example, you should have:
request.setAttribute("userContainer", userContainer);
This ensures that the userContainer object is set in the request scope and is accessible through all jsps throughout this request. After the execute method of the PreloadPayVoucherAction class exits, finally, the control is passed to the jsp page, where the request.getAttribute("userContainer.accountName") should work.
Regards,
Vasilis

Similar Messages

  • How to display multiple tables from database using netbeans swing gui

    plz reply asap on how to display multiple tables from database using netbeans swing gui into the same project

    Layered Pane with JTables or you can easily to it with a little scripting and HTML.
    plzzzzzzzzzzzzzzzzz, do not use SMS speak when posting.

  • Sharepoint List to Telerik Grid, Where data is not coming from database into List.

    SharePoint List to Telerik Grid, Where data is not coming from database into List.
    Here, i have a SharePoint list , where configurable text are stored, using some utility.
    I want to convert that SharePoint list into Telerik grid, with all Editable Option which i have in SharePoint.

    I know little about Telerik Grid, only find following article about Telerik integrate with SharePoint:
    http://www.telerik.com/help/aspnet-ajax/moss-spradlistview_designer_general.html
    a similar question:
    http://www.telerik.com/forums/how-to-bind-to-a-sharepoint-list-using-radgrid
    Thanks,
    Qiao Wei

  • Problem in displaying XML document from database

    Hi I am getting only record in printing xml file which takes from data base.
    Here is my programme.
    Document doc;
    ����public void processTable(Connection con, String tableName)
    ����{
    ��������try
    ��������{
    ������������this.iColumnCount=0;
    ������������HashMap hm = new HashMap();
    ������������//XML related Interfaces
    ������������DocumentBuilderFactory dbf;
    ������������DocumentBuilder db;
    ������������Element rootElement = null;
    Element colData = null;
    ������������Element relElement = null;
    �����
    ������������//Database relevent Interface
    ������������ResultSet rslt = null;
    ������������DatabaseMetaData dmd = null;
    ������������ResultSetMetaData rsmd= null;
    ������������//Initilize the Factory Classes
    ������������dbf = DocumentBuilderFactory.newInstance();
    ������������db = dbf.newDocumentBuilder();
    ������������doc = db.newDocument();
    ������������//Assign the root elements to document
    ������������rootElement = doc.createElement("entity");
    colData = getColMetaData(tableName);
    ������������rootElement.appendChild(colData);
    ������������doc.appendChild(rootElement);
    ������������TransformerFactory tFactory = TransformerFactory.newInstance();
    ����������������Transformer transformer = tFactory.newTransformer();
    ����������������transformer.transform(new DOMSource(doc),
    ��������������������new StreamResult(new FileOutputStream(tableName+".xml")));
    ��������} catch (Exception sqle)
    ��������{
    ����������������e.printStackTrace();
    ��������}
    ����}
    ����/**
    �����* Method getColMetaData.
    �����* @param tableName
    �����* @return Element
    �����*/
    ����private Element getColMetaData(String tableName)
    ����{
    ��������try{
    ������������ResultSet rslt = null;
    ������������ResultSetMetaData rsmd = null;
    ������������DataTypeMap dtp = new DataTypeMap();
    ������������HashMap hm = new HashMap();
    ������������hm = dtp.DataTypes();
    ������������Connection con = db.createConnection();
    ������������Statement stmt = con.createStatement();
    ������������String sQuery = "select * from " +tableName;
    ������������rslt = stmt.executeQuery(sQuery);
    ������������rsmd = rslt.getMetaData();
    ������������Element rooElement = null;
    ������������//Element currentElement =null;
    ������������iColumnCount = rsmd.getColumnCount();
    ����������������Element currentElement = null;//doc.createElement("field");
    // rootElement = doc.createElement("column");
    ����������������for (int i = 1; i <= iColumnCount; i++)
    ��������������������{
    currentElement = doc.createElement("field");
    ������������������������currentElement.setAttribute("DBFieldName",rsmd.getColumnName(i));
    ������������������������currentElement.setAttribute("FieldName",rsmd.getColumnLabel(i));
    ������������������������
    ��������������������}
    ��������������return currentElement;
    ��������catch(Exception ee){
    ������������logger.info(ee.getMessage());
    ��������}
    ��������return null;
    ����}
    Here 'return currentElement;' return the collection of elements.But when I print
    document it is giving only last element.I am not getting how only one record is printing even it has more records
    please help me in this regards.
    here the out put:
    <?xml version="1.0" encoding="UTF-8"?>
    <entity>
    ��<field DBFieldName="X_TYPE" FieldName="X_TYPE"/>
    </entity>
    -krish
    [email protected]

    Problem in displaying the XML Data from database
    Hi I have requirement of generating the XML from database.I could able to acheive partially.
    I am giving the problem below.
    public void processTable()
    Element rootElement = doc.createElement("entity");
    Element colData= getColMetaData(tableName);
    rootElement.appendChild(colData);
    doc.appendChild(rootElement);
    //print the document
    /*getColData method as follows*/
    private Element getColMetaData(String tableName)
    try{
    ResultSet rslt = null;
    ResultSetMetaData rsmd = null
    Connection con = db.createConnection();
    Statement stmt = con.createStatement();
    String sQuery = "select * from " +tableName;
    rslt = stmt.executeQuery(sQuery);
    rsmd = rslt.getMetaData();
    iColumnCount = rsmd.getColumnCount();
    Element currentElement = doc.createElement("field");
    for (int i = 1; i <= iColumnCount; i++)
    currentElement.setAttribute("FieldName",rsmd.getColumnName(i));
    currentElement.setAttribute("Position", parseString(i));
    rootElement.appendChild(currentElement);
    return currentElement;
    catch(Exception ee){
    logger.info(ee.getMessage());
    return null;
    /* End of Method*/
    Here when I printing the document it is giving out put like :
    <entity >
    <field FieldName="X_ID" Position="1"/>
    </entity>
    The is displaying only one field information even though table contains more then one column.If we maintain all the aboue code in single method it is working fine.I want to decouple the like above.Bcz I may have more then one set of elements like this.
    Please help in this regards,
    -Krish
    [email protected]

  • Getting data in a combobox from database

    I have done database connectivity in flex using .net. Now I am getting data in flex in a data grid. Everuthing is working fine if I take data in a data grid.
    My problem is that if I try to take that data in any other control, other than data grid, it shows up no data, it only shows "object[object].
    for ex:
    if I am getting 3 rows from databse and I try to get those in a combo box, den I am getting 3 items in combo box like this:
    object[object]
    object[object]
    object[object]
    instead of actual data.
    I am stuck in this problem for last 3 days. I have tried lot of things but nuthing is working. Plz anyone help me out soon. Its really urgent.
    I am working on a live project and not able to proceed because of this problem.

    Hi Bhavika,
    You need to tell your combobox which value should be displayed in the ComboBox...for display...
    You are getting 3 rows from database which are objects since you haven't told your combobox which value to be displayed it is displaying as [Object,Object]...
    So you need to tell your ComboBox which values to be displayed ..and you can do this by assigning the labelField property of the ComboBox..
    Say in your object you have three properties say..data, value, name...etc;;
    Then if you want display name as your ComboBox display label then simply write ....labelField="name" in your ComboBox ...
    Thanks,
    Bhasker Chari

  • Can i display all images from databases with adf jsp

    hi
    I want to display all images from the databases whit adf bussines components, because with the sample on http://www.oracle.com/technology/training/products/intermedia/index.html page, i only can display 10 images. i'd lije to know if i can to search in the databases by the id of the image.
    this is the code:
    %@ taglib uri="http://xmlns.oracle.com/adf/ui/jsp/adftags" prefix="adf"%>
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
    <%@ page contentType="text/html;charset=windows-1252"%>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>untitled</title>
    </head>
    <body>
    <html:errors/>
    <table border="1" width="100%">
    <tr>
    <th> </th>
    <th>
    <c:out value="${bindings.ImagenView1.labels['Id']}"/>
    </th>
    <th>
    <c:out value="${bindings.ImagenView1.labels['Descripcion']}"/>
    </th>
    <th>
    <c:out value="${bindings.ImagenView1.labels['Image']}"/>
    </th>
    </tr>
    <c:forEach var="Row" items="${bindings.ImagenView1.rangeSet}">
    <tr>
    <td>
    <c:out value="${Row.currencyString}"/>
    </td>
    <td>
    <c:out value="${Row['Id']}"/> 
    </td>
    <td>
    <adf:render model="Row.Image"/>
    </td>
    <td>
    <c:out value="${Row['Image']}"/> 
    </td>
    </tr>
    </c:forEach>
    </table>
    </body>
    </html>

    I think you want the interMedia JSP tag library...
    http://www.oracle.com/technology/software/products/intermedia/htdocs/descriptions/tag_library.html
    Larry

  • I can't create Entity Data Model Class directly from database

    I have just installed odac beta (ODAC1120250Beta_EntityFramework) and Orace XE 11g for test.
    I have Visual Studio 2010 on Windows 7 32bit.
    The problem is that after updating odac I can't create ADO.NET Entity Data Model class. If I try, VS2010 wizard makes me choose if I want to generate from db or create an empty model. If I choose to generate from database, the next window disappers making me return to VS2010.
    The workaround is to create an empty model and then update model from database. In this way it works.
    Anybody has experimented the same?...
    Best regards
    Francesco

    A couple of things you could try:
    1. Install SP1 for Visual Studio 2010.
    2. Do you already have an Oracle connection created in server explorer? If not, try creating one and then create the model.

  • Displaying data in a tree from database table

    Hi,
    I want to display data from a database table (mara-matnr) in a tree structure. I went through the coding of SBSPEXT_HTMLB. There static data was taken in to wa_tab. But there I want to bring data from a database table into wa_tab. For this I created an internal table without headerline by taking a work area, now how can I move data from this work area to wa_tab record by record.
    I hope some one might have worked on this. Plz help me....
    Thanks in advance,
    Ravindra.

    Hi,
    take a look at this <a href="/people/tomas.altman/blog/2004/12/13/sdn-blog-how-to-do-internal-tables-in-bsp which explains how internal tables work in ABAP OO.
    Furthermore I think you want to do this:
    insert <yourWorkarea> into table wa_tab.
    A complete mara example would be:
    data tab_mara type table of mara.
    data wa_mara type mara.
    select * from mara into table tab_mara.
    *or you can use:
    select * from mara into wa_mara.
       insert wa_mara into table tab_mara.
    endselect.
    regards
    Thomas

  • Displaying PDF file from database BLOB

    I have successfully added a PDF file to a table as a BLOB. Now, I need to display the BLOB. I have created the following package but it does not display anything. Can someone please help?
    SQL> create or replace package image_get
    2 as
    3 procedure pdf( p_id in demo.id%type );
    4 end;
    5 /
    Package created.
    SQL> create or replace package body image_get
    2 as
    3
    4 procedure pdf( p_id in demo.id%type )
    5 is
    6 l_lob blob;
    7 l_amt number default 30;
    8 l_off number default 1;
    9 l_raw raw(4096);
    10 begin
    11 select theBlob into l_lob
    12 from demo
    13 where id = p_id;
    14
    15 owa_util.mime_header( 'image/pdf' );
    16 begin
    17 loop
    18 dbms_lob.read(l_lob,l_amt,l_off,l_raw);
    19 htp.prn(utl_raw.cast_to_varchar2(l_raw));
    20 l_off := l_off+l_amt;
    21 l_amt := 4096;
    22 end loop;
    23 exception
    24 when no_data_found then
    25 NULL;
    26 end;
    27 end;
    28 end;
    29 /
    Package body created.
    SQL> DECLARE
    2 l_pdf int(1);
    3 begin
    4 l_pdf := 1;
    5 image_get.PDF(l_pdf);
    6 end;
    7 /
    PL/SQL procedure successfully completed.
    SQL> DECLARE
    2 Image1 BLOB;
    3 ImageNum NUMBER := 1;
    4 BEGIN
    5 SELECT TheBLOB INTO Image1 FROM demo
    6 WHERE id = ImageNum;
    7 DBMS_OUTPUT.PUT_LINE('Size of the Image is: ' ||
    8 DBMS_LOB.GETLENGTH(Image1));
    9 /* more LOB routines */
    10 END;
    11 /
    Size of the Image is: 14064
    PL/SQL procedure successfully completed.
    SQL> exit
    Am I missing something? I recently discovered that I need to set SERVEROUTPUT on to display the DBMS_OUTPUT. Is their some other environment variable I need to set.
    Thanks!

    *Always post code wrapped in <a href=http://wikis.sun.com/display/Forums/Forums+FAQ#ForumsFAQ-Arethereanyusefulformattingoptionsnotshownonthesidebar?"><tt>\...\</tt> tags</a>:*
      PROCEDURE lf_html_pdf (pv_image IN VARCHAR2, pv_index IN NUMBER) is
         l_mime        VARCHAR2 (255);
         l_length      NUMBER;
         l_file_name   VARCHAR2 (2000);
         lob_loc       BLOB;
      BEGIN
          begin
            selecT OI_BLOB,DBMS_LOB.getlength (OI_BLOB)
            into lob_loc,l_length
            from ord_img
            where  oi_tno= pv_image
              and oi_ti='PDF'
              and oi_idx=pv_index;
          exception
                when others then
                null;
            end;
         OWA_UTIL.mime_header (NVL (l_mime, 'application/pdf'), FALSE);
         HTP.p ('Content-length: ' || l_length);
         OWA_UTIL.http_header_close;
         WPG_DOCLOAD.download_file (lob_loc);
      END lf_html_pdf; Start by getting rid of:
          exception
                when others then
                null;and never using it anywhere ever again.
    If you're not actually going to use the <tt>l_mime</tt> and <tt>l_file_name</tt> variables then remove these as well. (Although I really think you should set a filename.)
    >
    Error report:
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "SYS.OWA_UTIL", line 356
    ORA-06512: at "SYS.OWA_UTIL", line 415
    ORA-06512: at "HCLABPRO.PKG_PDF", line 220
    ORA-06512: at line 2
    06502. 00000 - "PL/SQL: numeric or value error%s"
    >
    The error stack indicates that the exception is being raised in <tt>HCLABPRO.PKG_PDF</tt>: what is <tt>HCLABPRO.PKG_PDF</tt>? Does this actually have anything to do with the procedure above?
    I get the error message as below when i execute the procedure above;How do you execute it?
    What happens when it's executed without the <tt>when others...</tt> built-in bug?

  • How to display an image from database

    Hi all,
    I've saved an image(jpeg file) as BLOB item in the database through the forms.I need to fetch that particular image from the database and display the image in the report.How can i do that?
    I tried to fetch the column from the database and added a text item and selected the PHOTO column , the properties has changed once i selected the BLOB item.File format I changed to Image , But the width is 4 and I'm not able to change that.
    While executing I'm getting two errors,
    REP : 0069 Internal Error
    REP : 62203 Internal Error reading the image - Unable to render RenderedOp for this operation
    Please help me to solve this issue.
    Thanks in advance...

    Hello,
    Try to revert to the "old" way to render images :
    http://www.oracle.com/webapps/online-help/reports/10.1.2/topics/htmlhelp_rwbuild_hs/rwrefex/envvars/envvar_reports_default_display.htm
    To revert to the dependency on DISPLAY and use screen fonts (old font look up algorithm):
    Set REPORTS_DEFAULT_DISPLAY=NO.
    Remove the screenprinter.ppd entry in the uiscreenprint.txt file.
    Set the DISPLAY variable to the active X-Windows display surface.
    Regards

  • Displaying carriage returns from database query

    hi i'm fairly new to colfusion but have a good basic
    understanding.
    i'm trying to build a community website that has a guestbook
    and forums. i want to build these from scratch.
    i'm using cfmx7 and sqlserver 2005.
    the problem i'm having is when my cfm page retrieves posts
    made to the guestbook or forum, the carriage return characters are
    missing. posts are coming out all on one line.
    how do i get the retrieved posts to display new lines and
    paragraphs the way they were input into the database?
    just like these forums do?
    thanx so much. adella.

    Here is the code. Just replace body with your db field name.
    <cfoutput>
    #Replace(body, newLine, "<br>", "ALL")#
    </cfoutput>

  • Display Videos retrieved from Database?

    Hi all,
    I am trying to display videos from my database, does anyone know how to do this? I would like to display the video on my jsp page. I have no problem retrieving it but how do i get it to have a player for example like embedding a video from Youtube. Any suggestions? Thanks!

    Well it doesn't work as the video which you are retriving from the database is not in SWF / FLV or any shockwave supported format.
    Well if i were given a similar situation i'd solve it by the below stratergy.
    1).I'd Query my database and i'd get some metadata about the video like
    (videoId interger(5) PK,videoName varchar(50) not null,isYouTubeVideo varchar(1) not null,youTubeVideoUrl varchar(200),videoMimeType varchar(40) not null)
    2).On a basic grounds i'd apply a small display logic if the video is a youtube video( as youtube simply converts the videos into FLV format with a high compression ratio) or if the video's MIME type is video/x-flv (FLV's mime type) lets simply use youtube's standard embeding feature and render the JSP accordingly else use Media Player's embeding feature and render the JSP accordingly.
    jsp code snippet
    eg:*
    <jsp:useBean id="videoBean" class="com.myapp.entity.VideoBean" scope="request"/>
    <c:choose>
       <c:when test="${videoBean.YouTubeVideo == 'Y' || videoBean.videoMimeType == 'video/x-flv'}">    
              <object width="425" height="344">              
                   <c:if test="${videoBean.videoMimeType == 'video/x-flv'}">
                        <param name="movie" value="fileServlet?fileId=${videoBean.videoId}"/>
                        <param name="allowFullScreen" value="true"/>
                        <embed src="/fileServlet?fileId=${videoBean.videoId}" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"/>
                    </c:if> 
                   <c:if test="${not empty videoBean.youTubeVideoUrl}">
                        <param name="movie" value="${videoBean.youTubeVideoUrl}"/>
                        <param name="allowFullScreen" value="true"/>
                        <embed src="${videoBean.youTubeVideoUrl}" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"/>
                    </c:if> 
              </object>
       </c:when>
       <c:when test="${videoBean.videoMimeType == 'application/x-Shockwave-flash' || videoBean.videoMimeType == 'application/futuresplash'}">
              <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="425" height="344">
                    <param name="quality" value="high"/>
                    <embed src="/fileServlet?fileId=${videoBean.videoId}" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="425" height="344"/>
              </object>
       </c:when>
       <c:otherwise>
               <OBJECT ID="MediaPlayer" WIDTH="425" HEIGHT="344" CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" STANDBY="Loading Windows Media Player.." TYPE="application/x-oleobject">
                      <PARAM name="FileName" value="${videoBean.videoName}"/>
                      <PARAM name="autostart" value="false"/>
                      <PARAM name="ShowControls" value="true"/>
                      <PARAM name="ShowStatusBar" value="false"/>
                      <PARAM name="ShowDisplay" value="false"/>
                     <EMBED TYPE="application/x-mplayer2" SRC="/fileServlet?fileId=${videoBean.videoId}" NAME="MediaPlayer" WIDTH="425" HEIGHT="344" ShowControls="1" ShowStatusBar="0" ShowDisplay="0" autostart="0"/>
               </OBJECT>
        </c:otherwise>
    </c:choose>
    NOTE: I have taken an example of embeding media player as an alternative player in this example however as Balusc explains it is on you to choose an alternative player which can fit your client's requirement or the browsers which he uses.
    Hope,that helps you out :)
    REGARDS,
    RaHuL

  • Can you display 4 addresses from database per page from Excel?

    ok, to be more specific...
    I have a 4.25 x 5.5 postcard that I want to print 4 to a page.  I also have an Excel database with mailing address.  Im well aware how to have addresses print into my document doing a mail merge but Im only aware of this working with one address per page.  What Im doing is 4 different addresses per page.  Is this possible?

    Thanks, this will be VERY handy in the future!  Mail merge programs are such a ******* pain but ID makes it a heck of a lot easier!
    One more question, I tried a test with a 5.5 x 4.25 card with address fields in the middle.  I dropped it on the top left of an 8.5 x 11 layout and told it in the options to not resize anything.  I ran the merge and it did put 4 different address for each page on about 5 pages.  That is exactly what I wanted.  It was giving me a message when I did it this way or when I was practicing and doing it wrong that I didnt understand what it meant, "No overset text was generated when merging records".  Everything seemed to work properly so what does this mean?

  • Problem with displaying the data from Database on swf file.

    Hi ,
      I am new to flash.Thanks in Advance Please help me....
    Actually my requirement is my application consists a button(submit_Btn) when we click on the button(submit_Btn), each time it must to database(through servlet) and brings the data from database and places it on the flash swf file.Here my problem is for the first time when we click on the button it goes to database and place the data(which was returned from database) on the swf file.Next  when we click on the button for the second time(or anytime) it is not going  and bringing the new data from database(if some data is modified in database or not),Infact it is showing the old data(the data that was collected from previous ClickListener) only on the swf file and it is also not showing any complile time or run time error.
    my Code looks like this:
    submit_Btn.addEventListener(MouseEvent.CLICK,onCheck2);
    function onCheck2(evnt:MouseEvent):void {
    var xmlLoader:URLLoader = new URLLoader();
        var xmlurl:String = "http://localhost:8888/xmlServlet";
        var xmlrequest:URLRequest = new URLRequest(xmlurl);
    xmlLoader.dataFormat = URLLoaderDataFormat.TEXT;
    xmlLoader.addEventListener(Event.COMPLETE, xmlcompleteHandler);
    xmlLoader.load(xmlrequest);
    function xmlcompleteHandler(event:Event):void {
        var loader:URLLoader = URLLoader(event.target);
        var succData:String=loader.data;
            var xmlData:XML = new XML();
            var xmlList:XMLList;
            xmlData = XML(loader.data);
            xmlList = xmlData.children();
            for (var i=0; i<xmlList.length(); i++) {
                for (var n=0; n<xmlData.UserHumanap[i].HumanapDot.length(); n++) {
                        var x_coordinate:Number = xmlData.UserHumanap[i].HumanapDot[n].@x;
                        var y_coordinate:Number = xmlData.UserHumanap[i].HumanapDot[n].@y;
                        var point2:Point = new Point(x_coordinate,y_coordinate);
                        var circle:Sprite = new Sprite();
                        circle.graphics.beginFill(0x00ff00);
                        circle.graphics.drawCircle(point2.x,point2.y,3);   //Placing the data as dots on the swf file
    Thanks in Advance.......Please Help me..........
    its Urgent..........
    Thanks,
    Swarthi

    Checkout following line in your code
    var xmlurl:String = "http://localhost:8888/xmlServlet";
    now change it to
    var xmlurl:String = "http://localhost:8888/xmlServlet?random="+String(MAth.random());
    I think you will get the point now

  • Pre-loading the Cache from Database during application start-up

    We are using Spring, Hibernate, Oracle Coherence 3.5.2 Weblogic Webservices
    Our requirement is to pre-load the cache during the application start-up most probably during Authentication/Authorization Service is invoked.
    We plan to load the data for other services from database into Coherence cache so that whenever user access that particular service he ends up hitting the Cache instead of database.
    We would greatly appreciate sample code snippets on how to write CacheInitializerBean with marker to demonstrate the state of cache.

    Hi Rob,
    Thanks for pointing to the article: Pre-Loading the Cache
    In fact i already looked at that article before posting. It just mentions how to load the data from database into Cache.
    What i am looking for is how to make this happen during application start-up. This is my first hurdle.
    The second one is as mentioned in the article http://coherence.oracle.com/display/COH35UG/Pre-Loading+the+Cache
    i wrote following code which never gets populated into cache. Not sure whats going wrong even though i see Hibernate loadAll() method loading all the objects in the console
    public   void populateCache() throws SQLException
        Map<Long, Object>  buffer = new HashMap<Long, Object>();
        int count = 0;
         List<Contract> contractList = this.getHibernateTemplate().loadAll(Contract.class);
         log.debug("contractList size="+contractList.size());
         for(Contract contract : contractList)
             Long key   = new Long(contract.getId());
             Object  value = contract;
             buffer.put(key, value);
             // this loads 1000 items at a time into the cache
             if ((count++ % 1000) == 0)
                  contractCache.putAll(buffer);
                 buffer.clear();
         if (!buffer.isEmpty())
              contractCache.putAll(buffer);
        }We would greatly appreciate your time in helping us resolving two hurdle blocks.

Maybe you are looking for

  • Restoring time machine backup stuck at end

    Hello! I recently suffered a random filesystem failure and had to reinstall the OS. I was running 10.7, in fact, I turned on my MBP to install 10.7.1. After a lengthy download, the installer prompted me to restore from a Time Machine backup, which I'

  • Business Rule - Problem with Validation Execution

    I'm running into an issue where conditional Validation Execution is not working as expected. The background is that i have an Entity Object containing a few string attributes on which i must apply Regular Expression business rules to make sure only c

  • I have activated home sharing but it's not showing up in my iOS devices

    I have iTunes 10.4.1 and iOS 4.3.5 on my ipod touch and I have activated home sharing but it's not showing up in my iOS devices. I don't know what i'm doing wrong. My firewall is allowing iTunes. I even disabled it and see if that would work, and it

  • Re: Connection To Home Audio System

    I have currently upgraded my phone to the Nokia N80 which i have to admit is so far the best phone i have ever had to date. The problem i am having is trying to figure out how i can connect my phone to my Technics Audio system. It mentions something

  • Create Data Type from XSD

    Hey guys i need to create Data Type from and XSD,in the beginning i had an XML document which i converted to XSD using Altova ,then i imported this XSD in IR under External definition,now how should i go ahead with creating Data Type? my sample XSD i