Good practice to initalize all instance variables with type String to emptr

Is it a good practice to initalize all instance variables with
type String to emptry string?
#1 approach:
public class A
{ private String name = "";
private String address ="";
//etc...
rather than
#2 approach:
public class A
{ private String name;
private String address;
//etc...
When I read Java books, the examples don't usually do #1 approach.
The problem is if we don't initialize to empty string, when we call
the getter method of that instance variable, it will return null.
Please advise. Thanks!!

Please advise. Thanks!!It depends on your coding style. If you can avoid lots of checks for null Strings in the rest of the code then why not initialize to "".
You have the same situation when a method returns an array. If you under circumstances return a null array reference then you have to always check for this special case, but if you return a zero length array instead you have no special case. All loops will just run 0 iterations and everything will work fine.
So in general I guess the return of zero objects instead of null references really boils down to whether it simplicates the rest of your code by removing lots of extra checks for the special null case. This usage is especially favourable in the zero length array case. See Effective Java by Bloch, item 27.

Similar Messages

  • ST03 Export: How to export all instances and task types?

    I am exporting ST03 data using SAP GUI
    I can export data for a single task type and a single instance.Is there a way I can export the Time Profile data for all instances and all task types in a single export? Can I do a single export rather than NxM exports?
    Also, when I export to a text file, there is a header that reports the instance, data, and task type. When I export to excel file I only get the table, not the header info. Is there a way to to get the header info into the excel export?
    Is this the appropriate forum for these questions?
    Any help is appreciated.
    Thanks.
    Tim

    I moved this question to an ABAP forum. Here's the [thread|ST03 Export: How to export all instances and task types?;.
    Tim

  • How to filter by attributes with type Strings

    The documentation is not really detailed about setting attributes with type Strings. I assume I've to type each string value in a new line in the set attributes dialog box. This works fine and my XML looks like this<br /><br /><para CMS = "prodA prodB"><br /><br />having set the two string values "prodA" and "prodB".<br /><br />But how to filter these attributes? The filter CMS="prodA" shows my paragraph correctly, but CMS="prodB" does not show this paragraph as it should. Filters seem to match only the first of the set of string values.<br /><br />I would like to show this paragraph in two document versions for these two products prodA and prodB.<br /><br />Framemaker 8.0.3<br /><br />Tilman

    Tilman,
    this is something that AFAIK is not supported by FrameMaker's own attribute based filtering.
    But, without changing your documents, if you install the *free* ABCM (Attribute-based condition management) plug-in from weststreet consulting, you will succeed. Be sure to read the tutorial!
    http://weststreetconsulting.com/
    - Michael

  • Firefox profiles aren't very useful - all instances open with same one

    I am running Linux: LMDE Cinnamon Edition - 64 bit
    I am using firefox version Mozilla Firefox 31.0
    I wish to have two instances of FF running. One with my standard, personal settings and a second instance that ONLY connects to Facebook and will stop data leaking between the two. I can acheive this by opening Facebook in another browser (e.g. Chrome or Opera).
    I checked the ProfileManager under Firefox and created a second profile called "FB".
    I can run firefox -p FB and it will open an instance of FF with none of my personal settings available - that's what I was hoping for.
    However, if I run a second instance of FF - for example from the command line as firefox -p default it loads with the same profile as the first instance I opened, not the new profile as specified in the command.
    I can only select the profile if there are no prior firefox instances running under my user-id. The first instance defines which profile is used for all subsequent executions - no matter which profile I specify on the command line. Even running firefox -ProfileManager will start with the first-specified profile, not the profile manager.

    Hello,
    If you want to run multiple instances of Firefox, you need to add a -no-remote parameter to the command.
    For example:
    * firefox -P -no-remote
    Please see:
    * http://kb.mozillazine.org/Opening_a_new_instance_of_Firefox_with_another_profile

  • AS 3:calling all instance names with similarities

    As the title suggests I am looking to RegExp as a means to
    find similiarities between diffferent movieclip instance names. I
    have many clips that have an instance name that begins with "step"
    that reside on the maintimeline. The logic written out should be:
    If a movielcip exists on the timeline, whats its name, does
    it have this string within its instance name, if so do this.
    Unfortunately my code does not accomplish this quite
    yet.

    I'd think this would be the same in 3, but in 2 you'd use
    array access
    notation like so:
    var myIndex = 3;
    this["step_" + myIndex].moveUp();
    this would call moveUp within step_3. You can interate
    myIndex in a loop, of
    course, to call the function in a group all at one time.
    Dave -
    Head Developer
    http://www.blurredistinction.com
    Adobe Community Expert
    http://www.adobe.com/communities/experts/

  • How to compare the value of a binding variable with a string "HOLD" ......?

    Hi All,
    I have two tables - TABLE1 & TABLE2 and both the tables are having STATUS column. The requirement is like if the STATUS column of TABLE1 is updated as "HOLD" then the same value has to be updated to the STATUS column of TABLE2.
    create or replace trigger "TEST_TRG"
    BEFORE
    update of "STATUS" on "TABLE1"
    for each row
    begin
    if(:new.STATUS ='HOLD')then
    insert into TABLE2 (STATUS)
    value (:new.STATUS);
    end if;
    end;
    COMPILATION ERROR:
    Compilation failed, line 3 (02:40:14) The line numbers associated with compilation errors are relative to the first BEGIN statement. This only affects the compilation of database triggers.
    PLS-00103: Encountered the symbol "{" when expecting one of the following: ( begin case declare exit for goto if loop mod null pragma raise return select update while with <an identifier> <a double-quoted delimited-identifier> <a bind variable> << continue close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge pipe purge The symbol "{" was ignored. Compilation failed, line 7 (02:40:14) The line numbers associated with compilation errors are relative to the first BEGIN statement. This only affects the compilation of database triggers.
    PLS-00103: Encountered the symbol "}" when expecting one of the following: ( begin case declare else elsif end exit for goto if loop mod null pragma raise return select update while with <an identifier> <a double-quoted delimited-identifier> <a bind variable> << continue close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge pipe purge The symbol "}" was ignored.
    I am getting the compilation errors as above when the trigger is compiled. Can anyone please help me to correct it.
    Thanks and Regards,
    Suhas

    CREATE OR REPLACE TRIGGER "TEST_TRG"
       BEFORE UPDATE OF "STATUS"
       ON "TABLE1"
       FOR EACH ROW
    BEGIN
       IF (:NEW.status = 'HOLD')
       THEN
          INSERT INTO table2
                      (status
               VALUES (:NEW.status
       END IF;
    END;You should learn how to write PL/SQL code.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.apress.com/9781430235125
    http://apex.oracle.com/pls/apex/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • Is there a way to combine a variable with a string?

    Hi,
    Im trying to combine a string with varible so that on function can control a variaty of elements, depending on which varible is chosen.
    Here is my code:
    public function currentFrame_Fun():void
    //trace("3level1Btn_Array" + level1Btn_Array);
    //if (dot_BG.Dot_Screen.currentFrame == 2)
    level1Btn_Array.push("screenPath.L1P" + (dot_BG.Dot_Screen.currentFrame -1) + "Dot1");
    level1Btn_Array.push("screenPath.L1P" + (dot_BG.Dot_Screen.currentFrame -1) + "Dot2");
    level1Btn_Array.push("screenPath.L1P" + (dot_BG.Dot_Screen.currentFrame -1) + "Dot3");
    level1Btn_Array.push("screenPath.L1P" + (dot_BG.Dot_Screen.currentFrame -1) + "Dot4");
    level1Btn_Array.push("screenPath.L1P" + (dot_BG.Dot_Screen.currentFrame -1) + "Dot5");
    trace ("after push array is " + level1Btn_Array)
    /*level1Btn_Array.push("screenPath.L1P" + (currentFrame -1) + "Dot2");
    level1Btn_Array.push("screenPath.L1P" + (currentFrame -1) + "Dot3");
    level1Btn_Array.push("screenPath.L1P" + (currentFrame -1) + "Dot4");
    level1Btn_Array.push("screenPath.L1P" + (currentFrame -1) + "Dot5");*/
    //for (var j:int=1; j < 5; j++){
    /*level1Btn_Array.push("screenPath.L1P" + (dot_BG.Dot_Screen.currentFrame) + "Dot" + j);
    trace("3level1Btn_Array" + level1Btn_Array);*/
    NumberDots();
    public function NumberDots():void
    //trace("level1Btn_Array" + level1Btn_Array);
    for (var i:int=0; i < level1Btn_Array.length; i++)
    var frame:Number = b++;
    trace("frame="+frame)
    trace("array buttoon 3 is" + level1Btn_Array[3]);
    trace("i is " + i)
    //level1Btn_Array[3]
    //screenPath.L1P7Dot4.gotoAndStop(frame);
    screenPath.L1P7Dot4.gotoAndStop(frame);
    is there a way to make this work?
    if you have any ideas plz let me no, this will help imensly!
    thx, pavel

    You can use [] (array access) to get a property of an Object, e.g. object["property"] to access object.property. But you cannot do object["property.anotherProperty"] to access object.property.anotherProperty. You have to do object["property"]["anotherProperty"] instead.
    Therefore in your case you cannot access your nested timeline object using a string in such a way. What you need to do is to store the reference to the object itself in the Array:
    level1Btn_Array.push(screenPath["L1P" + (dot_BG.Dot_Screen.currentFrame - 1) + "Dot1"]);
    Then level1Btn_Array[0] is screenPath.L1PnDot1 - the object itself.

  • How do I concatenate a variable with a string text?

    I have a script that tests urls. If it comes across one that is not a valid url, I want to print out to the console a message that looks like this.... 
    Http://myDomian/myPath: This is not a valid url
    I currently have the url in a variable and this is what my attempted code looks like, so far.
    Write-Host -ForegroundColor Red $url "This url is not valid."
    but this is just giving me an output that looks like "This url is not valid", without displaying the url that it finds to be invalid. How to I get it to display the url that it finds not valid plus the text? Please help

    You are not following instructions because you have not read the help:
    You wrote this which is a syntax violation
    Write-Host
    -ForegroundColor
    Red$url "This url is not valid."
    EXAMPLE: Write-Host <message> <switched>
    $url='http://www.google.com"
    Write-Host " This url is this url $url" -Fore red
    DO NOT CHANGE THE ORDER OF THINGS.
    Test the exact code as posted until you understand how it works then go back and fix your original code.
    Before posting back type: HELP Write-Host -FULL
    Read everything very carefully.
    ¯\_(ツ)_/¯

  • Scope of instance variables in servlets..

    Hi all,
              Sorry for asking a dumb question..
              What is the scope of instance variables in a servlet? Is the scope is
              limited to thread?
              In other words, in the following example, i am setting "testStr", in one
              request and when i tried to access the same instance variable from another
              request, i am getting it as null. Does it mean instance variable is limited
              to that particular thread/request?
              thanks in advance..
              -ramu
              

    Oops ... I had misunderstood and had the problem backwards ;-)
              > Is it known behavior? With registered servlet its working fine (a
              > instance variable is shared by all requests)
              I believe so; I typically deploy in a WAR so have not seen the problem that
              you describe. Servlets can be reloaded, so what you saw could have been
              caused bye a date/time mismatch between the .class file and the server's
              current time. On the other hand, that could be how WebLogic works.
              Peace,
              Cameron Purdy
              Tangosol, Inc.
              http://www.tangosol.com
              +1.617.623.5782
              WebLogic Consulting Available
              "Ramu" <[email protected]> wrote in message
              news:[email protected]...
              > Hi Purdy,
              >
              > I got it. I am testing the servlet as a unregistered servlet, which is
              > creating instance for every new request!!!, which created this whole
              > confusion. Is it known behavior? With registered servlet its working fine
              (a
              > instance variable is shared by all requests)
              >
              > > What theory? ;-) Instance variables are on the object, and the object
              can
              > > be used by multiple threads, thus allowing multiple threads to access
              the
              > > same instance variables.
              > what i mean by theory here is, all instance variables in servlet should
              be
              > shared by all requests. Now i got it sir.
              >
              > Thank you..
              > -ramu
              >
              >
              > >
              > > Peace,
              > >
              > > --
              > > Cameron Purdy
              > > Tangosol, Inc.
              > > http://www.tangosol.com
              > > +1.617.623.5782
              > > WebLogic Consulting Available
              > >
              > >
              > > "Ramu" <[email protected]> wrote in message
              > > news:[email protected]...
              > > > Hi,
              > > >
              > > > > No, an instance variable in a servlet class is not limited to a
              > thread.
              > > > There
              > > > > is exactly one copy of the servlet created in memory and all
              requests
              > > pass
              > > > > through the same instance, thus sharing any instance variables. A
              > > couple
              > > > of
              > > > > things to remember:
              > > > I totally agree with you, But i am wondering why my sample servlet(i
              am
              > > > attaching the file) is not sharing the instance variables across
              > > > threads/reqs. (in 1st request set some string to "testStr" instance
              > > > variable, in next request if you read the same instance variable, you
              > will
              > > > get null!!)
              > > > Our current code is having instance variables. But right now we are
              not
              > > > getting any problems. But as per theory, instance variables should be
              > > shared
              > > > across threads/requests..
              > > >
              > > > Any how we are changing our code to remove all instance variables.
              > > >
              > > > thanks,
              > > > -ramu
              > > >
              > > > >
              > > > > 1.) Using instance or class variables in servlets that are not
              > read-only
              > > > is not
              > > > > a good thing to do. This makes the servlet not thread-safe. To
              > > maintain
              > > > > variables across requests, sessions, etc., use the servlet-defined
              > > objects
              > > > to
              > > > > store the state (e.g., request, session, etc.).
              > > > >
              > > > > 2.) If you modify the servlet class on disk, WebLogic will reload
              the
              > > > servlet
              > > > > class thus discarding the old instance and creating a new one (of
              > > course,
              > > > this
              > > > > depends on some configuration parameters for servlet reloading).
              > > > >
              > > > > Hope this helps,
              > > > > Robert
              > > > >
              > > > > Ramu wrote:
              > > > >
              > > > > > Hi,
              > > > > > thanks for quick reply.
              > > > > > I am not at all using SingleThreadModel. See the following code.
              > > > > > In first request i am passing "abc" value to testStr. But in
              second
              > > > request,
              > > > > > I am getting null for testStr in second request. It looks like
              (for
              > > me)
              > > > for
              > > > > > non single threaded model also, scope of instance variables is
              > > limited
              > > > to
              > > > > > Thread/Request.. But as per theory, because its not single
              threaded
              > > > model,
              > > > > > only one instance should be there AND testStr(instace variables)
              > > should
              > > > be
              > > > > > shared across the all threads. But i am not able see that
              behaviour
              > > > here.
              > > > > > But if declare instance variable as static, o am able to share
              it
              > > > across
              > > > > > all threads/requests.
              > > > > >
              > > > > > note:
              > > > > > From browser i am setting testStr to "abc" with URL like
              > > > > > "localhost/test1?testStr=abc"
              > > > > > And 2nd req from browser is like "localhost/test1" (on server
              > output
              > > i
              > > > am
              > > > > > getting null for testStr)
              > > > > >
              > > > > > Any ideas?
              > > > > >
              > > > > > thanks,
              > > > > > -ravi
              > > > > >
              > > > > > import java.io.*;
              > > > > > import javax.servlet.*;
              > > > > > import javax.servlet.http.*;
              > > > > >
              > > > > > public class test1 extends HttpServlet
              > > > > > {
              > > > > > public String testStr;
              > > > > >
              > > > > > public void doGet (HttpServletRequest req, HttpServletResponse
              res)
              > > > > > throws ServletException, IOException
              > > > > > {
              > > > > > doPost(req, res);
              > > > > > }
              > > > > >
              > > > > > public void doPost (HttpServletRequest req,
              HttpServletResponse
              > > res)
              > > > > > throws ServletException, IOException
              > > > > > {
              > > > > > try {
              > > > > > res.setContentType("text/html");
              > > > > > PrintWriter out = res.getWriter();
              > > > > > if(req.getParameter("testStr") != null)
              > > > > > {
              > > > > > testStr = req.getParameter("testStr");
              > > > > > System.out.println("set testStr = " + testStr);
              > > > > > }
              > > > > > else{
              > > > > > System.out.println("get testStr = " + testStr);
              > > > > > }
              > > > > >
              > > > > > }
              > > > > > catch(Exception e){
              > > > > > e.printStackTrace();
              > > > > > }
              > > > > >
              > > > > > }
              > > > > > }
              > > > > >
              > > > > > "Cameron Purdy" <[email protected]> wrote in message
              > > > > > news:[email protected]...
              > > > > > > Yes or no, depending on if your servlet implements
              > > SingleThreadModel.
              > > > > > >
              > > > > > > See the servlet 2.2 spec for documentation on how many instances
              > of
              > > a
              > > > > > > servlet will be created. See the doc for the SingleThreadModel
              > > > interface.
              > > > > > >
              > > > > > > Peace,
              > > > > > >
              > > > > > > --
              > > > > > > Cameron Purdy
              > > > > > > Tangosol, Inc.
              > > > > > > http://www.tangosol.com
              > > > > > > +1.617.623.5782
              > > > > > > WebLogic Consulting Available
              > > > > > >
              > > > > > >
              > > > > > > "Ramu" <[email protected]> wrote in message
              > > > > > > news:[email protected]...
              > > > > > > > Hi all,
              > > > > > > >
              > > > > > > > Sorry for asking a dumb question..
              > > > > > > >
              > > > > > > > What is the scope of instance variables in a servlet? Is the
              > scope
              > > > is
              > > > > > > > limited to thread?
              > > > > > > >
              > > > > > > > In other words, in the following example, i am setting
              > "testStr",
              > > in
              > > > one
              > > > > > > > request and when i tried to access the same instance variable
              > from
              > > > > > another
              > > > > > > > request, i am getting it as null. Does it mean instance
              variable
              > > is
              > > > > > > limited
              > > > > > > > to that particular thread/request?
              > > > > > > >
              > > > > > > > thanks in advance..
              > > > > > > >
              > > > > > > > -ramu
              > > > > > > >
              > > > > > > >
              > > > > > > >
              > > > > > >
              > > > > > >
              > > > >
              > > >
              > > >
              > > >
              > >
              > >
              >
              >
              

  • Array as Instance Variable

    Friends,
    Hope you can get me on the right track with this. I have an array (that must be an instance variable of type double) :
    private double[] myArray;
    that stores two values at each index:
    double length
    char unitOfMeasure
    We have to develop a method which will perform a different calculation on the value based on the identity of the unitOfMeasure.
    The method I'm working on looks like this:
    public double getDistance (int index)
    if (myArray[index].unitOfMeasure == 'a')
    return ....
    else .....
    The problem is that I get an error that reads "double cannot be dereferenced" I guess this is b/c you can't make a call with a primitive.
    How then, do I get the value of the unitOfMeasure at a particular index (as opposed to the value of length at that same index)?
    thanks!

    Thanks, I understand - much easier to do this way.Above all it's possible. You can never store more
    than one value at an array index position. At least
    not at the same time -:)private static int VALUE_INDEX = 0;
    private static int UNIT_OF_MEASURE_INDEX = 1;
    private double[][] doubles;
    doubles = new double[42][2];

  • Public instance variable vs. accessor method

    I know some OOP purists believe all instance variables should be private, and if there's a need to view or set the value of these instance variable, public accessor methods need to be created. Data encapsulation is the driving force behind this belief.
    But in Java, it's easy enough to declare an instance variable public thus eliminating the need to write accessor method. What's the rational behind this feature? Is it merely to save developer some time from typing in the accessor methods? Does this reason justify the use of public members?

    I know some OOP purists believe all instance variables
    should be private, ALL? No way!
    and if there's a need to view or
    set the value of these instance variable, public
    accessor methods need to be created. There has to be a reason for any :- public int getMyInt(){ ...
    and in many cases protected or default package is more appropriate
    Data
    encapsulation is the driving force behind this belief.
    Correct , also avoiding multiple instances of member states - very often its a control issue too
    But in Java, it's easy enough to declare an instance
    variable public Yes and its also easy enough to write shittie code too ...
    if an instance variable is public there should be a clear comment explaining why the field has to be public
    thus eliminating the need to write
    accessor method. There's nothing wrong with accessors and mutators - the java language is full if them
    What's the rational behind this
    feature? As you stated encapsulation
    Is it merely to save developer some time
    from typing in the accessor methods? This is a lame reason
    Does this reason
    justify the use of public members?and attract unwanted side effects?
    I also don't like to see (or to write) a huge long list of getters and setters at the bottom of any class file and find it quite ugly - You should use them when you need to, not as a matter of routine.
    Accessor - mutator is a design issue for private instance variables that you wish to keep hidden. Your suggestion to make them all public is also a design issue and if I was to see a long list of public variables at the beginning of a class (unexplained with javadoc comments) I would be very puzzled indeed.
    Eclipse will automate the generation of accessors and mutators for you and also has a refactoring tool too - both are extremely useful

  • Do synthesized instance variables work in iPhone SDK?

    I tried using Obj-C properties to synthesize not only the accessor methods, but also the instance variable. I ended up with an error saying something like "...must explicitly name an ivar...".
    I was under the impression the iPhone ran the modern (64-bit) Objective-C runtime. I'm using xCode 3.x and iPhone SDK 2.2. Are synthesized instance variables not supported, or do I need to change some xCode/project configuration settings to activate this support (I'd really like to use it)?
    Does the fact that I'm linking to the Sen Test Kit Framework, or running on a relatively old Intel MacBook Pro cause this problem? If the 2.2 SDK does not support synthesized instance variables, does iPhone SDK 3.0 beta support them?
    Note that I would need the synthesized ivar support to work on the iPhone simulator too (obviously) so that I can do testing. Hopefully the iPhone simulator supports the modern Obj-C 2.0 runtime.
    Thank You,
    Eric

    orangekay wrote:
    A. I don't see that anywhere in the Objective-C 2.0 language specification, so I don't believe this has anything to do with the iPhone SDK.
    B. I don't see any point in adding such a thing to the language as it accomplishes nothing that could not be handled with a standard ivar declaration.
    This sounds like a feature you imagined.
    Yeah, right I imagined it. Get a clue, will you?
    http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Articles/oc Properties.html#//apple_ref/doc/uid/TP30001163-CH17-SW3
    In general the behavior of properties is identical on all runtimes (see Runtime Versions and Platforms in Objective-C 2.0 Runtime Programming Guide). There is one key difference: the modern runtime supports instance variable synthesis whereas the legacy runtime does not.
    For @synthesize to work in the legacy runtime, you must either provide an instance variable with the same name and compatible type of the property or specify another existing instance variable in the @synthesize statement. With the modern runtime, if you do not provide an instance variable, the compiler adds one for you. For example, given the following class declaration and implementation:
    @interface MyClass : NSObject {
    float sameName;
    float otherName;
    @property float sameName;
    @property float differentName;
    @property float noDeclaredIvar;
    @end
    @implementation MyClass
    @synthesize sameName;
    @synthesize differentName=otherName;
    @synthesize noDeclaredIvar;
    @end
    the compiler for the legacy runtime would generate an error at @synthesize noDeclaredIvar; whereas the compiler for the modern runtime would add an instance variable to represent noDeclaredIvar.

  • Accessing Instance Variables

    Hi,
    I am trying to make a presentation that shows all instance variables of a determined process's instance.
    In order to do that, I have created a Gloabal Interactivity Activity with a presentation that ask for a key.
    So, I want to show in the next presentation all the instance variables of the instance processes that has the key informed by the user on the previous presentation.
    How can I do that?
    Thanks very much
    Marcos

    <script language="JavaScript">
    var scriptVar = "<%= jspVar %>";
    </script>

  • Separated Instance Variables in a Split Activity

    Hi,
    How do I get a separated instance variable to propogate to copies in a split activity ? With a SplitN by design this is a manual task using copy.sepVar = sepVar but how do you do this in a Split ?
    Any help would be greatly appreciated.
    cheers
    Tony

    so what you are saying is: the best way is to instead
    defining these instance variables, pass these
    variables values as parameters to private methods?I would agree with this. You need to be very careful when using instance variables with SSB's. You only (currently) have one public method defined in your bean, so you don't need to be concerned about the Container serving you up a different bean on a latter invocation - yet. Adding another public method that uses the same instance variables will cause this to break.
    As far as synchronization goes, you can get into scalability problems here. If your container is trying to process multiple threads through your Bean, each thread will be forced to block until the previous thread continues its task - which can be a performance killer. A slow database query for one user could starve many other users on the system.
    I would suggest either passing all your variables as parameters to your private methods, or (if you are talking about a lot of parameters being passed,) create a Delegate Object behind your EJB to handle all of the processing.

  • Report script - using substitution variable with multiple values

    Hi All,
    Substitution variable with multiple values is not working correctly with Report scripts. Can you please let me know what is the syntax to assign multiple values to a sub variable using maxl:
    alter database samp.samp set variable 'ExtractQuarter' 'Q1,Q2,Q3,Q4';
    alter database Samp.Samp set variable 'ExtractQuarter' 'Q1:Q4';
    I tried both of the above but they are errored out with the below error:
    Error: 1001005 - Unknown Member [Q1:Q4] in Report.
    my requirement is different for both Actual and forecast data extract so i would like to make use of this variable to extract whole year data for Forecast and current quarter data for Actual with out duplicating the report scripts for both processes.
    Thanks,
    PRaveen

    Hi,
    Please refer following thread,
    range of months in report script?
    Hope it helps.
    Regards

Maybe you are looking for

  • How do i connect my macbook pro to a tv

    how do i connect my macbook pro to a tv

  • IMovie help for a newbie

    I am new to the Mac world and could use some help. I am attempting to upload a video I shoot using the built in camera on iMovie to Vimeo. I cannot get the audio to sync with the video on Vimeo. I know there are specific settings I should have...but.

  • (Eng/Esp)  Problem with .SWF in DW/Problema con .SWF en DW.

    Hello, Sorry for my English, im learning, but im not yet a expert. I have  problem  with my Dreamwaver, when I put a .swf (I've done my web with Flash) and press F12 i cant see my SWF. And the error mensager is the follow: Could u help me, plz? Thnx.

  • Netscape.javascript.JSException: Native Window is destroyed

    Supposedly this code closes the window in which the applet is displayed. try{      JSObject win = (JSObject) JSObject.getWindow(this);      win.eval("self.close();"); catch(JSException ex){      System.out.println(ex.getWrappedException().toString())

  • Open Purchase requsitions / orders

    Hi, Can any one please let me know where can I see the Open Purchase requisitions / orders for a given material in a plant ( I do not want the report of all the purchasing docs, I want just the open ones) Thanks, SS