Can a Data Bean hold a member of primitive type?

My senior advices me not to use members of primitive types inside a data bean. Say like not to use a boolean, int etc...instead use a Boolean, Integer etc....
but he doesnt give me a proper reason for the same, but juz says that itz all a part of a good design guideline.
could u plz throw ur views on this....?

Using the wrappers instead of the primitives allows you to use "null" to represent the absence of a value. That's often useful.

Similar Messages

  • How can share data between jsp pages using beans??

    any one can give me code for 2 jsp pages with bean that share data for them

    <jsp:usebean name="yourBeanName" type="com.whatever.foo" scope="session"/>
    this will look for a bean named yourBeanName in the scope specified by the scope attribute. If none was found, the container will instantiate one with the no arg constructor for your bean and place it into the proper scope.
    if your bean had a method getName(), you could then on your jsp do:
    <%=yourBeanName.getName()%> to print the results of the method to the page. there are other ways to do the actual placing of the output on the page, but this is the most direct.

  • Can't Create Bean Error

    I modified the numguess example that comes with tomcat but I get a "can't create bean" error message when I call my jsp file. If anyone can see what I'm doing wrong or suggest ways to discover the problem I'd appreciate it.
    My modified jsp:
    <!--
    Copyright (c) 1999 The Apache Software Foundation. All rights
    reserved.
    Number Guess Game
    Written by Jason Hunter, CTO, K&A Software
    http://www.servlets.com
    -->
    <%@ page import = "num.NumberGuessBean" %>
    <jsp:useBean id="numguess" class="num.NumberGuessBean" scope="session"/>
    <jsp:setProperty name="numguess" property="*"/>
    <html>
    <head><title>Number Guess</title></head>
    <body bgcolor="white">
    <font size=4>
    <% if (numguess.getSuccess()) { %>
    Congratulations! You got it.
    And after just <%= numguess.getNumGuesses() %> tries.<p>
    <% numguess.reset(); %>
    Care to try again?
    <% } else if (numguess.getNumGuesses() == 0) { %>
    Welcome to the Number Guess game.<p>
    Play with default limits ( a number between 0 and 100)<p>
    or enter upper and lower limits.<p>
    <form method=get>
    Play with defaults?: <input type=radio name=default value="yes">Yes
    <input type=radio name=default value="no">No
    <\form>
    <% if (numguess.getRadio().equals("no")) { %>
    <form method=get>
    Enter upper limit:<input type=text name=upperLimit>
    Enter lower limit:<input type=text name=lowerLimit>
    <\form>
    <% numguess.reset(); %>
    <% } %>
    <form method=get>
    What's your guess? <input type=text name=guess>
    <input type=submit value="Submit">
    </form>
    <% } else { %>
    Good guess, but nope. Try <b><%= numguess.getHint() %></b>.
    You have made <%= numguess.getNumGuesses() %> guesses.<p>
    I'm thinking of a number between <jsp:getProperty name="numguess" property="lowerLimit"/> and <jsp:getProperty name="numguess" property="upperLimit"/>.<p>
    <form method=get>
    What's your guess? <input type=text name=guess>
    <input type=submit value="Submit">
    </form>
    <% } %>
    </font>
    </body>
    </html>
    and the modified bean:
    * ====================================================================
    * The Apache Software License, Version 1.1
    * Copyright (c) 1999 The Apache Software Foundation. All rights
    * reserved.
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
    * are met:
    * 1. Redistributions of source code must retain the above copyright
    * notice, this list of conditions and the following disclaimer.
    * 2. Redistributions in binary form must reproduce the above copyright
    * notice, this list of conditions and the following disclaimer in
    * the documentation and/or other materials provided with the
    * distribution.
    * 3. The end-user documentation included with the redistribution, if
    * any, must include the following acknowlegement:
    * "This product includes software developed by the
    * Apache Software Foundation (http://www.apache.org/)."
    * Alternately, this acknowlegement may appear in the software itself,
    * if and wherever such third-party acknowlegements normally appear.
    * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
    * Foundation" must not be used to endorse or promote products derived
    * from this software without prior written permission. For written
    * permission, please contact [email protected].
    * 5. Products derived from this software may not be called "Apache"
    * nor may "Apache" appear in their names without prior written
    * permission of the Apache Group.
    * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
    * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
    * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    * SUCH DAMAGE.
    * ====================================================================
    * This software consists of voluntary contributions made by many
    * individuals on behalf of the Apache Software Foundation. For more
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    * Originally written by Jason Hunter, http://www.servlets.com.
    package num;
    import java.util.*;
    public class NumberGuessBean {
    int answer;
    boolean success;
    String hint;
    int numGuesses;
    String radiochoice;
    int lowerLimit=0;
    int upperLimit=100;
    String error;
    public NumberGuessBean() {
    reset();
    public void setGuess(String guess) {
    numGuesses++;
    int g;
    try {
    g = Integer.parseInt(guess);
    catch (NumberFormatException e) {
    g = -1;
    if (g == answer) {
    success = true;
    else if (g == -1) {
    hint = "a number next time";
    else if (g < answer) {
    hint = "higher";
    else if (g > answer) {
    hint = "lower";
    public void setRadio(String s) {
         radiochoice=s;
    public String getRadio() {
         return radiochoice;
    public void setLowerLimit( int lowerLimit) {
         this.lowerLimit=lowerLimit;
    public int getLowerLimit() {
         return lowerLimit;
    public void setUpperLimit(int upperLimit) {
         this.upperLimit=upperLimit;
    public int getUpperLimit() {
         return upperLimit;
    public boolean getSuccess() {
    return success;
    public String getHint() {
    return "" + hint;
    public String getError() {
         return ""+error;
    public int getNumGuesses() {
    return numGuesses;
    public void reset() {
         if (getRadio().equals("yes")) {
              answer = (int)(Math.random()*100);
         else {
              int i;
              i=(int)(Math.random()*upperLimit);
              if (i<lowerLimit) {
                   i=i+lowerLimit;
              answer=i;
         success = false;
    numGuesses = 0;

    implement synchronizable and createa constructor, then check it once again.

  • Data not exist for member combination in web analysis report

    When I run the report in web analysis studio iam able to find the data for a particular member combination.When I try to run the same report in workspace iam not finding any data for same member combination.Can U please help me to resolve this issue

    Hi Swetha,
    You must've realized that- Even if you select only the desired members, you end up being able to drill-down unwanted members. Correct ? :)
    The only way, I believe, is- To create a users' group at your Data source side, perhaps, Essbase & provision this new group with a Metaread filter which prevents him/her from Drilling down to the leaf node.
    PS: Giving Read access might also let the user not see the data for children. But, if you want to hide the members also, Metaread+ is the way to go.

  • Query related to Siebel Data Bean - Business Object - Account - Update

    Hello,
    I am using Siebel Databean to update Business object - Account fields. I am using the field names displayed in browser to update the Account properties.
    But sometimes it fails with below error:-
    For e.g. Field 'Account Team' -
    Field 'AccountTeam' does not exist in definition for business component 'Account'.
    Please ask your systems administrator to check your application configuration.(SBL-DAT-00398)
    Where I can find the information related to mapping of fields in business object 'Account' which I can use in Siebel Data bean program?
    Thanks in advance !!

    Hi!
    You need to use Siebel Tools to determine the Business Component Field Mappings to the Applet Controls that you're looking at.
    Regards,
    Oli

  • Automatically turn off "packet data on hold or act...

    hi guys,
    I searched on this board and find out that I can hold down the red button on my N97 to cancel any live connection. But this "packet data on hold" information box keeps coming back as my phone is probably getting emails from the exchange server every 15 min.  Is there anyway to ask the phone to not keep the connection open or just terminate the connection after it is done? Or, is there a way to get rid of this annoying info box?
    thanks a lot

    Did you purchase new or used? Is it fully charged when this happens?
    Not normal. Take it to an Apple Store for evaluation.
    Make a Genius Bar Reservation
    http://www.apple.com/retail/geniusbar/
     Cheers, Tom

  • Siebel data bean fetch data in chunks, executeQuery2 ?

    Hi,
    I am able to retrieve all records of Employee business component using Siebel data bean. Below is the code snippet-
    oPsDR_Header = dataBean.newPropertySet();
    lPS_values = dataBean.newPropertySet();
    busComp.clearToQuery();
    busComp.setViewMode(AllView);
    busComp.activateMultipleFields(oPsDR_Header);
    busComp.executeQuery(true);
         Through this code I am getting all Employee records. My requirement is to fetch records in chunks. As, when there would be several thousand records memory requirement for my process would be very high. Can I configure anything in data bean or in Siebel server to achieve this? How API busComp.executeQuery is different from busComp.executeQuery2 ?
         Thanks very much for any help!
    Regards,
    Ajay

    Hi!
    You need to use Siebel Tools to determine the Business Component Field Mappings to the Applet Controls that you're looking at.
    Regards,
    Oli

  • Essbase error msg while using Excel add-in: data item found before member

    We're encountering an Essbase error message "data item found before member" on 2 of 4 cubes. Has anyone else encountered this msg, and does anyone have an idea how to resolve it. It occurs on multiple machines in development and testing environments.

    As dougadams said, some members can be converted by Excel so that essbase no longer treats them as labels. Typically this includes numeric member names (i.e. accounts) and dates. I find the dates to be more of an issue than numeric member names, because it typically changes the date format as well. Either way, using a single quote as a prefix to the member name will tell Excel to treat it as a text entry, and hence a member/label to Essbase.The above is almost always the reason for the error you got. Of course, it's also possible that you really do have a numeric entry somewhere before your first 'data cell' in the template, especially if you did some manipulation of the template.

  • How many images can iPhoto 2.01 hold?

    How many images can iPhoto 2.01 hold? What's the maximum.
    And why does iPhoto occassionally crash when dragging folders of images into the Album list area?
    thanks,
    Hairfarmer

    I have 70,000 RAW images arranged in directories by year/day.  The only thing slow about it is during catalog backup. When first starting LR it takes a couple of minutes to enumerate the dates with photo counts, but that occurs in the background.  I detect no database related slowness while editing or performing random accesses and searches.  I have seen no difference in the above after having upgraded to V4.
    The only slowness that I find annoying has nothing to do with the database.  It is after a certain number of spot removals of varying sizes. The larger and/or more varied the spot size tends to accelerate this.  At some point it starts disk thrashing and becomes impossible to work with (I have to back up to a history step when it was running OK, which can take several minutes).  When this occurs the task manager shows a high rate of page faults, meaning it is swapping out stuff to disk (even though I have plenty of unused ram).  This suggests a problem with the compiler, but that is just an wild educated guess.

  • Fetch a multivalued attribute using Data Bean

    Hello,
    I am trying to fetch employee user related information using Data Bean.
    Here employee has position as a multivalued attribute.
    Currently when I fetch record for an employee I get information only for one position.
    I want to fetch the whole list of position's assigned to this employee.
    Can any one please help me on how to achieve this?
    Thanks,
    Harshal

    Please read the Bookshelf on GetMVGBusComp.
    http://docs.oracle.com/cd/E14004_01/books/OIRef/OIRef_Interfaces_Reference11.html#wp1185173

  • Can I perform future holds for a lot

    Hi
    Can I perform future hold for a lot in OSFM Module.
    I want to hold a lot for further process, once it crosses a specific operation. Or I want to hold it after so and so date.
    Please post your advises.
    We are using 11.5.10+ version
    regards
    Sreee

    This is a good requirement however unfotunately this is not supported currently in OSFM..
    Thanks - rakesh

  • How much RAM can my Macbook Pro hold MAX?

    Can my Macbook Pro hold a MAX of 8GB or is it just 4GB? I'm getting different answers online and I'm a little annoyed at this point. My computer specs currently are:
    15 inch Laptop
    MacBook Pro 2.6 GHz Intel Core 2 Duo
    2 GB 667 MHz DDR2 SDRAM.
    Got my computer in 2009.
    At Crucial.com it says it can hold up to 8GB when I select my computer processor speed from their list, but I noticed it saying DDR3 (and I don't know what that means to be honest). Here's the link:
    http://www.crucial.com/store/mpartspecs.aspx?mtbpoid=7F3A5584A5CA7304
    To the best of my knowledge I selected the correct computer, which I own, from their list.
    Under "About This Mac", on my computer, it says DDR2 for the memory, on Crucial.com it says DDR3. As a result I'm confused and will that cause problems?
    I'll be getting my RAM kit from Crucial.com, so do I buy the 4BG kit, because that's all my laptop can handle, or is it OK to get the 8GB kit, which says DDR3?
    I do a lot of video and audio, so I would like to get my RAM up to 8 GB if it will.
    Thanks

    One more question friend....You've been so helpful
    Will these two sticks work together on my machine?
    2GB, 200-pin SODIMM, DDR2 PC2-5300 memory module
    http://www.crucial.com/store/mpartspecs.aspx?mtbpoid=B54C51B4A5CA7304
    along with a...
    4GB 200-pin SODIMM DDR2 PC2-6400 Memory Module
    http://www.amazon.com/Crucial-CT51264AC800-200-pin-SODIMM-PC2-6400/dp/B001RB21JE
    So these two would add up to 6GB total. Now the ONLY DIFFERENCE that I see is the 2GB stick is PC2-5300(667Mhz)speed and the 4GB stick is PC2-6400(800Mhz)speed. I understand that my machine won't run at the 800Mhz speed that the PC2-6400 stick is designed for, cause my machine says 667 under the memory info. From what I read online, it's ok to put a higher Mhz stick in there, it will just cap at 667Mhz speed? But.......both sticks are DDR2, which is right for my computer, but will the 667 MHz with a 800 Mhz be a huge no-no to run together? At this point I think that is my main concern! If I can't do this, than I think I'll have to go with the 2x2GB kit for 4GB total, but I REALLY would like to run 6GB.
    Shew.... :P
    Thanks again!

  • How to i create a new itunes account for my old iphone so i can transfer data to new iphone, since my daughters new iphone is now linked to my acc and she ends up with all my apps and contacts etc

    My daughter has previously had an ipod which was linked to my itunes iphone account.
    she now has a new iphone and has linked this to that account and now she receives all my contacts apps etc when she syncs her account.
    How do i create a new itunes account for my old iphone so that i can transfer data to my new iphone and keep the two seperate so that when she deletes all my contacts and apps and then syncs her phone again we can still be compatible.

    iOS 5 & iCloud Tips: Sharing an Apple ID With Your Family

  • Restrict Which Users Can Enter Data In List Form in SharePoint Foundation 2013

    Is there a way to restrict which users can enter data in particular fields in a list item entry form?
    We are using a SharePoint Foundation 2013 list and calendar to manage vacation time. We need to restrict non-supervisor users users from entering a value in a certain field in the vacation request form.
    Here is how the system works now:
    1. Employees complete the vacation request form (which creates a list item)
    2. An email is sent to their supervisor to either approve or decline the request
    3. Approved requests are automatically entered onto the vacation calendar
    We have restricted the list so that only supervisors can edit items (the pending vacation requests). The problem is that all users can mark their own requests as approved when they fill out the request form in the first place. Is there a way to restrict
    which users can enter data in particular fields on a list item entry form?

    Thanks for the suggestion. We ended up 1) hiding the approval column and 2) creating a second list, workflow, etc. The user no longer sees the approval column when filling out the form. Requests are now submitted to list A. Workflow #1 copies the request
    to List B, then deletes the item from List A. Once the request is added to List B, Workflow #2 emails the user that the request has been received and emails the supervisor that a request needs to be approved. Only supervisors have editing permissions on List
    B. Approved requests are automatically added to the vacation calendar (the calendar view of List B).
    We found the following site to be helpful in learning how to hide the list column:
    http://community.bamboosolutions.com/blogs/bambooteamblog/archive/2013/06/03/how-to-hide-a-sharepoint-list-column-from-a-list-form.aspx

  • Can two Apple IDs be linked so that they can share data? My iMac and iPad have the same Apple ID and sync contacts, bookmarks, etc. My wife's iPad has a different Apple ID. Can it be linked somehow to mine to share contacts etc?

    Can two Apple IDs be linked so that they can share data? My iMac and iPad have the same Apple ID and sync contacts, bookmarks, etc. My wife's iPad has a different Apple ID. Can it be linked somehow to mine to share contacts etc?

    No. You cannot link your contacts to hers. However, you can use Home Sharing to share the information:
    Understanding Home Sharing
    iOS- Setting up Home Sharing on your iOS device
    Setting up Home Sharing for Apple TV (2nd & 3rd generation)
    iTunes- Setting up Home Sharing on your computer

Maybe you are looking for