Need to store multiple session values in flex

Hi,
     I need to store multiple session values in flex based on the user who logged in.
For Example, if a user logged in as an administrator and in another windows another user logged in as guest, i need to maintain two seperate session for the two different users.
Is it possible for maintaining different sessions.
Expecting your valuable response.
Thanks
Jude Paul

Look at Shared Objects. You can store this information in them by creating a unique object for each type of user.

Similar Messages

  • Need to store multiple xml files as each record in oracle table

    Hi All,
    I have a set of XML files (say 20 xml files). I need to store the enitire content of each file as a string into the oracle table.
    Do we have any PL/SQL procedures which will do this job. I will pass the path of the directory to the procedure, so that it takes all the xml files and store it in the table.
    After that i need to remove some tags of the xml. so it will be better if we store records as a string rather than of xmltype.
    Please help in achieving this.
    Thanks in Advance,
    Ram Mohan T

    Hi Gyanchand,
    I have wrote an article BizTalk Server 2010: Grouping
    and Debatching/Splitting Inbound Messages (TypedPolled) from WCF-SQL Adapter  which is for SQL, but yes same can be done with Oracle.
    If grouping is not required then, you can overlook it and apply debatching only.
    Maheshkumar
    S Tiwari|User
    Page|Blog|BizTalk
    Server: Multiple XML files to Single FlatFile Using File Adapter

  • Passing multiple session values from cold fusion into a flash movie

    Hello all,
    I know that to pass multiple variables into a flash movie
    you could use the embed tag like this(with the & between each
    variable):
    <embed
    flashvars="variable1=value1&variable2=value2"
    ></embed>
    Now to pass a single session variable from coldfusion in i
    did the following; which worked:
    <embed
    src="ASdb.swf"
    FlashVars="UserName=<cfoutput>#session.userName#</cfoutput>"
    width="550" height="400" autostart="true">
    </embed>
    Note that i had to use the cfoutput tags to get the value
    stored in the variables. Now; i tried to do the same thing for two
    session variables and the second one does not get read in. Here was
    my code:
    <embed src="ASdb.swf"
    FlashVars="UserName=<cfoutput>#session.userName#</cfoutput>&testTypeID=<cfoutput>#session .testTypeID#</cfoutput>"
    width="550" height="400" autostart="true">
    </embed>
    Can someone please tell me what I am doing wrong? Thank you
    very much in advance.

    Hold on there was a little error: My final code that did not
    work was the following:
    <embed src="ASdb.swf"
    FlashVars="UserName=<cfoutput>#session.userName#</cfoutput>&testTypeID
    =<cfoutput>#session.testTypeID#</cfoutput>"
    width="550" height="400" autostart="true">
    </embed>

  • AS3.0 Need to Store Radio Button Value  as SharedObject

    I am under a tight deadline. Friday Aug.22!!! I am trying to
    store the value of a radio button (in a group for yes/no) when a
    'Next" button is pressed. I have a nextBtn.addEventListener(...) to
    contain a function which holds code to store the value of each
    radio button on the page into its own SharedObject. As such:
    _so.data.DrugName1 = DrugName1.selected;
    I do not know the AS3.0 code to get the value of the selected
    radio button in a grouping and then to use that value and store it
    into the SharedObject _so.data I have been banging my head for
    days. I fear I keep trying to use AS2 code for an AS3 project.
    AAAAAhhhhhhhh!
    Can someone please help me determine the value or data of a
    radio button or radio button group. Is it "selected" or
    "selectedData" or "getValue()" or "value" or "data" or what ??????
    I don't know where else to turn. :(
    alexdove at comcast.net
    Please email direct if you can help. I'll be sure to re-post
    a solution once I get it.
    Thank you in advance.
    Alex Dove

    FlashTastic, thanks for the reply. I entered the code but I
    cannot get the values to repopulate in the page when I return. I
    try to put the SharedObject data of the radio button back into the
    button on the page but it will not take. Here is my code:
    //*************code in page to load SharedObject value back
    into radio button when the page loads if a value
    exists*****************
    if((HumiraY_Row1.selected == false) &&
    (_so.data.HumiraY_Row1 != null)){HumiraY_Row1.selected = true;}
    if((HumiraN_Row1.selected == false) &&
    (_so.data.HumiraN_Row1 != null)){HumiraN_Row1.selected = true;}
    //******** Here is when the Next button is pushed to save the
    data***
    nextBtn2.addEventListener(MouseEvent.CLICK,
    mouseDownHandler2);
    function mouseDownHandler2(event:MouseEvent):void {
    if(HumiraY_Row1.selected == true){_so.data["HumiraY_Row1"] =
    HumiraY_Row1.selected;}
    if(HumiraN_Row1.selected == true){_so.data["HumiraN_Row1"] =
    HumiraN_Row1.selected;}
    Still stuck. Look forward to another post. :)
    Alex

  • How to store multiple values associated to one key

    hello all
    In my program I need to store "multiple values associated to one key".
    for example : key would be ="T"
                             Values are    = 2,4,5,1,2Plz tell me which data structure I can use for this purpose.
    I have tried Hashtable for it, unfortunately it does not support duplicate keys in one Hashtable.
    Thanx.
    Rakesh

    The easiest thing to do, is store another data structure as your value for a
    particular key. So "T" being your your key, you would associate the value
    to be an int[] (if you know the number of sub values) or create a new Vector
    for each key, then you don't have to worry about the number of values at
    compile time. All the while still using the Hashtable for constant time
    look up. So like this:
    public void storeMultValues(int[] arr)
      Vector v = new Vector();
      v.add(new Integer(1));
      v.add(new Integer(2));
      v.add(new Integer(3));
      this.hashtable.put("T", v);
    }See if you can work with that.
    -Cludge

  • How do I create a program with multiple sessions?

    I need to allow multiple sessions with this program.
    I realize that it involves threading of some sort, but I'm pretty new to this area and am not sure how I should go about this.
    Here are the instructions:
    "�     Write an application that will create an online dictionary a data file will be supplied that contains a list of words and their meanings. The hash table will contain a key (the word in question) and a value (byte offset of the word meaning stored in a random access file). You will also provide methods for entering, searching and deleting words online. The program must allow for multiple sessions."
    I have most of this all done, and have a dictionaryBroker ready to write the add, delete and search methods.
    But what about the mutliple sessions?
    I'm thinking that my hashTable and RandomAccessFile classes are both going to have to be singleton.
    What I want is for multiple people to be able to run the program at the same time, but if one person adds or deletes a record, I want it to update instantly for everyone.
    But it also needs to run smoothly for everyone using it.
    Thanks for any help, I just need a little push in the right direction here to help get me going.

    Well here is the entire assignment:
    &#61607;     Write an interface for a hash table that satisfies the following criteria:
    The hash table will contain a key (String) and a value (Object)
    Allow for a specific load capacity, if the capacity is exceeded the table is rehashed. The rehash may be called independently
    Must allow for maintaining the hash table (adding modifying etc) the key will not be changed
    Must allow for retrieving information from the table
    Must allow addition using a Map object or one key, value pair at a time
    The addition using a Map and the rehash must be a two pass approach
    �     Implement the interface.
    �     Write a test routine to test all aspects of the interface. The test must calculate the efficiency of your hashing algorithm.
    �     Write an application that will create an online dictionary a data file will be supplied that contains a list of words and their meanings. The hash table will contain a key (the word in question) and a value (byte offset of the word meaning stored in a random access file). You will also provide methods for entering, searching and deleting words online. The program must allow for multiple sessions.
    Submission
    Submit your eclipse project or executable jar file through WebCT. An efficiency of 70% or better must be attained for the assignment to be graded.
    I'm in Canada, not the US.
    It says online dictionary, but I don't think we actually have to do that. I'm pretty sure I can just use a simple GUI to allow them access to the dictionary.
    So, I'm assuming that I just have to make sure that if multiple people are trying to access it at the same time it needs to update at the same time or something. The hashtable was the main part of the assignment so this part shouldn't be too large.

  • How to store Multiple Attachments in Workflow.

    Hello All,
    I am doing an scenario, in that i need to store multiple attachments in the workflow container.
    Kindly help me, how to store and also, how to retrieve those attachments form worklfow.
    I am using custom workflow.
    Thanks in advance......
    Best Regards,
    Chandran S

    Hi Jubish/Venkat
    1. I iterated this fucntion moudule to store the multiple attachments to the workflow
       SAP_WAPI_ATTACHMENT_ADD
    2. Call this FM to get the attachemnts form the workflow (pass workitem Item id which is used for storing the attchments).  SAP_WAPI_GET_ATTACHMENTS
    from above you will get objkey for each attachment as output in table.
    3. Pass the  objkey to this FM to get the contents
    SO_DOCUMENT_READ_API1'. this will retrun the content of the attachment either in object_content,   contents_hex.
    4. Pass the Obtained content to SCMS_BINARY_TO_XSTRING to get the disired format.
    Best Regards,
    Chandran S

  • Store Multiple rows in a dictionary to show as a grid

    Hi,
    I need to store multiple rows in a data dictionary.
    Please give me the solution if the CCP has these feature to store multiple row data.
    Please provide the guide if this is limitation in CCP

    I also have this problem. I have one form defined normally (e.g. server) and a second form defined as a grid (e.g. disks). My problem is when defining the plan, I can create a service item for the server but can't create one for the disk. How do I get the data from a grid form over to CPO? The design guide was quite vague on that point.
    I thought also doing it as a bundle might work but that would in theory launch multiple different CPO processes which is not what I want. I would like all data from each from to be sent in a single request to the CPO process.
    How do I do this?
    Is it down to the type of adapter settings?
    Actually, I've just answered my own question and now my adaptor is sending all the data but I would still like to know if I should be creating service items for those grid forms?
    Ryan

  • How to store Multiple values with restriction in Oracle 9i

    Hi,
    I am using oracle 9i R2 and i would like to know that how can i store multiple values and restrict some of values into oracle table?
    ex.
    I need to create table or inserting into existing table like below:
    ID will be Primary/Unique key and each ID has multiple dept but each ID to have only 1 “X” dept, only 1 “Y” dept and only 1 “Z” dept… but, can have multiple “W” dept
    What will be the best option to create/store data like this?
    Like Table level Constraint (Unique or Check), Triggers or pl/sql?
    ID     DEPT
    1     X
    1     Y
    1     Z
    1     W
    2     X
    2     Y
    2     Z
    2     W
    2     W
    2     W

    Hi,
    Other solution:
    Function:
    CREATE OR REPLACE FUNCTION my_unique_function(p_dep IN VARCHAR2) RETURN VARCHAR2
       DETERMINISTIC AS
    BEGIN
       IF (p_dep = 'X' OR p_dep = 'Y' OR p_dep = 'Z') THEN
          RETURN p_dep;
       ELSE
          RETURN NULL;
       END IF;
    END;
    /Test:
    Connected to Oracle Database 10g Express Edition Release 10.2.0.1.0
    Connected as hr
    SQL> create table emp(id number, dept varchar2(30));
    Table created
    SQL>
    Function created
    SQL> CREATE unique index ix_emp on emp(my_unique_function(dept));
    Index created
    SQL> insert into emp(id,dept) values (1, 'X');
    1 row inserted
    SQL> insert into emp(id,dept) values (2, 'X');
    insert into emp(id,dept) values (2, 'X')
    ORA-00001: unique constraint (HR.IX_EMP) violated
    SQL> insert into emp(id,dept) values (3, 'Y');
    1 row inserted
    SQL> insert into emp(id,dept) values (4, 'Y');
    insert into emp(id,dept) values (4, 'Y')
    ORA-00001: unique constraint (HR.IX_EMP) violated
    SQL> insert into emp(id,dept) values (5, 'Z');
    1 row inserted
    SQL> insert into emp(id,dept) values (6, 'Z');
    insert into emp(id,dept) values (6, 'Z')
    ORA-00001: unique constraint (HR.IX_EMP) violated
    SQL> insert into emp(id,dept) values (7, 'W');
    1 row inserted
    SQL> insert into emp(id,dept) values (8, 'W');
    1 row inserted
    SQL> Regards,

  • Creating multiple profiles, using unified profile types, to store multiple values for same properties

    Hi All:
    I am trying to create multiple profiles, using unified profile types, to
    store multiple values for same properties. Here my intention of using
    'unified profile types' is to create multiple profiles (to store multiple
    values for a property). All the properties are stored in the same database
    maintained by Personalization server. Also, I am trying to use the same
    'USER' ejb as profile class/home/pk/jndi.
    The scenerio is,
    define unified profile types (Business, Vacation) using Personalization
    admin tools, using com.beasys.commerce.axiom.contact.User,
    com.beasys.commerce.axiom.contact.UserHome,
    com.beasys.commerce.axiom.contact.UserPk,
    com.beasys.commerce.axiom.contact.User for Profile Class, Home, Pk class,
    JNDI name respectively.
    Define Property set 'HotelCommerce' with property
    HotelProp as single, restricted, text (valid values Single, Double)
    Now you can use the attached jsp files to login as a user and try to set the
    property value for HotelProp for each profile. As per my understanding, I
    was expecting that I can set different values for the property 'HotelProp'
    for each profiles. But unexpectedly, all the profiles get the same value.
    Question. is it the correct behavior? if yes, how can I achieve this
    functionality?
    if not, do you see any problem in my scripts?
    your answer asap is appreciated. we need to make decision on using
    Personalization server v/s developing our own Personalization server!!!:)
    thanks,
    -rajesh
    PS: I have tried 'Unified Profile Example' type too, but that did not work.
    [propsettest.jsp]
    [home.jsp]

    I am trying to create multiple profiles, using unified profile types, to
    store multiple values for same properties. Here my intention of using
    'unified profile types' is to create multiple profiles (to store multiple
    values for a property). All the properties are stored in the same database
    maintained by Personalization server. Also, I am trying to use the same
    'USER' ejb as profile class/home/pk/jndi.Hello Rajesh,
    This is not the purpose of the UUP. The UUP is used to allow existing
    database schemas to be aggregated with the existing Weblogic Personalization
    Server database schema to provide a single, customized user profile with which
    to maintain the user properties (
    http://e-docs.bea.com/wlcs/p13n/users.htm#1068901 )
    If you want to have properties that change value based on some "profile" or
    classification of a user, then you should use classifier rules to change the
    user from "OnVacation" to "AtWork" or "AtHome". You can use these classifier
    rules to select content for the user or conditionally execute logic (
    http://e-docs.bea.com/wlcs/p13n/rules.htm )
    Ture Hoefner
    BEA Systems, Inc.
    1655 Walnut Street; suite 200
    Boulder, CO 80302
    www.beasys.com

  • Store multiple values into a variable

    I was wondering if it was possible to store multiple values into one varaible. Something along the lines of...
    Oracle: 10g
    --Table xSample (this is obviously a dumbed down version of the table for the sake of showing what I want to accomplish
    S_ID   YEAR
    1         2009
    2         2009
    3         2009
    4         2009
    --Query
    select     s_id
    into       pID
    from      xSample
    where    year = 2009;Basically the reason I was trying to figure out how to store multiple values into a variable is b/c I was going to use that variable (pID) as a parameter and have it's values passed dynamically when the proc was called. The values would go into a query that would look something like:
    select *
    from cust_data
    where person_id in (pID)
    aka
    select *
    from cust_data
    where person_id in (1,2,3,4)Not sure if this is possible, but if anyone knows of a way I could accomplish this that would be great.
    Edited by: user652714 on Dec 23, 2009 9:37 AM

    Here's a basic idea building a comma seperated list, then consuming it in another query (taking the in list approach from Tom's post, linked earlier).
    create table xsample (s_id number not null, year number);
    insert into xsample select level, 2009 from dual connect by level <=4;
    commit;
    declare
       --4000 should be lots ... hopefully?
       v_parameter_list varchar2(4000);
    begin
      --create the comma seperated list
      select
        substr(max(sys_connect_by_path(s_id, ',') ), 2, 4000)
      into
        v_parameter_list
      from
        select s_id, row_number() over(order by 1) as rn
        from xsample
        where year = 2009
      start with rn = 1
      connect by prior rn = rn - 1;
      --consume the comma seperated list
      for x in
        with data as
          select
            trim( substr (txt,
            instr (txt, ',', 1, level  ) + 1,
            instr (txt, ',', 1, level+1)
            - instr (txt, ',', 1, level) -1 ) ) as token
          from
            select ','||v_parameter_list||',' txt
            from dual
          connect by level <= length(v_parameter_list)-length(replace(v_parameter_list,',',''))+1
        select *
        from xsample
        where s_id in (select * from data) 
      loop
        dbms_output.put_line('next item = ' || x.s_id);
      end loop;
    end;
    /

  • Need help with the session state value items.

    I need help with the session state value items.
    Trigger is created (on After delete, insert action) on table A.
    When insert in table B at least one row, then trigger update value to 'Y'
    in table A.
    When delete all rows from a table B,, then trigger update value to 'N'
    in table A.
    In detail report changes are visible, but the trigger replacement value is not set in session value.
    How can I implement this?

    You'll have to create a process which runs after your database update process that does a query and loads the result into your page item.
    For example
    SELECT YN_COLUMN
    FROM My_TABLE
    INTO My_Page_Item
    WHERE Key_value = My_Page_Item_Holding_Key_ValueThe DML process will only return key values after updating, such as an ID primary key updated by a sequence in a trigger.
    If the value is showing in a report, make sure the report refreshes on reload of the page.
    Edited by: Bob37 on Dec 6, 2011 10:36 AM

  • Need help. Need to store single key for 2 values

    Hi,
    I need to store 2 value objects with only one key value. How do I do that?

    Use an array of length 2 or a class like this:class Pair {
        private Object a;
        private Object b;
        public Pair (Object a, Object b) {
            this.a = a;
            this.b = b;
        public Object getA () {
            return a;
        public Object getB () {
            return b;
    }Kind regards,
    Levi

  • I need to return multiple values in function

    create or replace function f (p in varchar2) return varchar2
    is
    a number(10);
    begin
    for loop 1 in 1..10
    select instr('yyyyyyyyynnnnnyynny','y',1,i) into a from dual;
    end loop;
    return a;
    end;
    my function return a value but i need to return multiple values
    thanks in advance

    Dipali Vithalani wrote:
    I understand that OUt parameter should not be used in funtions... Then I am eager to know, why oracle has provided the opton of OUT Parameter in funtion creation ? Hope you can explain that..This is an option is many languages.
    And there is valid use for it. PL/SQL however does not implement the full solution. An OUT parameter is essentially passing parameters by reference and not passing it by value.
    Passing by reference means passing a pointer to the function/procedure to the variable in the caller. This allows the function/procedure to directly reference the value in the caller.
    Passing by value means that the value from the variable in the caller is copied to the stack space of the function/procedure being called. The function/procedure thus has its own local copy of that value.
    That could be a performance and resource problem when the caller has a large data structure and the entire structure needs to be copied from the caller to the called procedure/function. In such a case it is a lot faster (and less memory needed) to simply pass a pointer to that structure to the function/procedure being called.
    And this is basically what an OUT parameter does - it allows PL/SQL code direct access to write into the variable of the calling code.
    In some cases you may have a large data structure, want to pass it by reference, but do not want the function/procedure being called to change it. You do not want to allow it modify your large data structure. You simply want to pass a pointer and allow read access to the function/procedure.
    In other languages, such a parameter is defined as a constant - as constants cannot be changed. So the parameter signature will look something like the following:
    create or replace function FooFunc( largeStruct CONSTANT IN OUT NOCOPY SomeDataType ) return SomeOtherDataType is ..And this is the only time that you should use an OUT parameter (passing by reference) in a function - when the function parameter is a large data structure. At the same time, the function is disallowed from changing that OUT parameter. It is passed as an OUT parameter simply to increase call performance and reduce memory requirements.
    PL/SQL unfortunately does not support this - allowing a value to be passed as a constant reference.
    As for why PL/SQL supports it the way it does - it does not mean that because PL/SQL supports OUT parameters for functions, it should be used. PL/SQL also supports the GoTo statement. Simply because it supports a specific feature does not mean that it is a good idea to use it.

  • Multiple return values (Bug-ID 4222792)

    I had exactly the same request for the same 3 reasons: strong type safety and code correctness verification at compile-time, code readability and ease of mantenance, performance.
    Here is what Sun replied to me:
    Autoboxing and varargs are provided as part of
    JSRs 14 and 201
    http://jcp.org/en/jsr/detail?id=14
    http://jcp.org/en/jsr/detail?id=201
    See also:
    http://forum.java.sun.com/forum.jsp?forum=316
    http://developer.java.sun.com/developer/earlyAccess/adding_generics/index.html
    Multiple return values is covered by Bug-ID 4222792
    Typically this is done by returning an array.
    http://developer.java.sun.com/developer/bugParade/bugs/4222792.html
    That's exactly the problem: we dynamically create instances of array objects that would better fit well within the operand stack without stressing the garbage collector with temporary Array object instances (and with their backing store: 2 separate allocations that need to be recycled when it is clearly a pollution that the operand stack would clean up more efficiently)
    If you would like to engage in a discussion with the Java Language developers, the Generics forum would be a better place:
    http://forum.java.sun.com/forum.jsp?forum=316
    I know that (my report was already refering to the JSR for language extension) Generics is not what I was refering to (even if a generic could handle multiple return values, it would still be an allocated Object
    instance to pack them, i.e. just less convenient than using a static class for type safety.
    The most common case of multiple return values involve values that have known static datatypes and that should be checked with strong typesafety.
    The simple case that involves returning two ints then will require at least two object instances and will not solve the garbage collection overhead.
    Using a array of variable objects is exactly similar, except that it requires two instances for the components and one instance for the generic array container. Using extra method parameters with Integer, Byte, ... boxing objects is more efficient, but for now the only practical solution (which causes the least pollution in the VM allocator and garbage collector) is to use a custom class to store the return values in a single instance.
    This is not natural, and needlessly complexifies many interfaces.
    So to avoid this pollution, some solutions are used such as packing two ints into a long and returning a long, depacking the long after return (not quite clean but still much faster at run-time for methods that need to be used with high frequencies within the application. In some case, the only way to cut down the overhead is to inline methods within the caller code, and this does not help code maintenance by splitting the implementation into small methods (something that C++ can do very easily, both because it supports native types parameters by reference, and because it also supports inline methods).
    Finally, suppose we don't want to use tricky code, difficult to maintain, then we'll have to use boxing Object types to allow passing arguments by reference. Shamely boxed native types cannot be allocated on the operand stack as local variables, so we need to instanciate these local variables before call, and we loose the capacity to track the cases where these local variables are not really initialized by an effective call to the method that will assign them. This does not help debugging, and is against the concept of a strongly typed language like Java should be:
    Java makes lots of efforts to track uninitialized variables, but has no way to determine if an already instanciated Object instance refered in a local variable has effectively received an effective assignment because only the instanciation is kept. A typical code will then need to be written like this:
    Integer a = null;
    Integer b = null;
    if (some condition) {
    //call.method(a, b, 0, 1, "dummy input arg");
    // the method is supposed to have assigned a value to a and b,
    // but can't if a and b have not been instanciated, so we perform:
    call.method(a = new Integer(), b = new Integer(), 0, 1, "dummy input
    arg");
    // we must suppose that the method has modified (not initialized!)
    the value
    // of a and b instances.
    now.use(a.value(), b.value())
    // are we sure here that a and b have received a value????
    // the code may be detected at run-time (a null exception)
    // or completely undetected (the method() above was called but it
    // forgot to assign a value to its referenced objects a and b, in which
    // case we are calling in fact: now.use(0, 0); with the default values
    // or a and b, assigned when they were instanciated)
    Very tricky... Hard to debug. It would be much simpler if we just used:
    int a;
    int b;
    if (some condition) {
    (a, b) = call.method(0, 1, "dummy input arg");
    now.use(a, b);
    The compiler would immediately detect the case where a and b are in fact not always initialized (possible use bere initialization), and the first invoked call.method() would not have to check if its arguments are not null, it would not compile if it forgets to return two values in some code path...
    There's no need to provide extra boxing objects in the source as well as at run-time, and there's no stress added to the VM allocator or garbage collector simply because return values are only allocated on the perand stack by the caller, directly instanciated within the callee which MUST (checked at compile-time) create such instances by using the return statement to instanciate them, and the caller now just needs to use directly the variables which were referenced before call (here a and b). Clean and mean. And it allows strong typechecking as well (so this is a real help for programmers.
    Note that the signature of the method() above is:
    class call {
    (int, int) method(int, int, String) { ... }
    id est:
    class "call", member name "method", member type "(IILjava.lang.string;)II"
    This last signature means that the method can only be called by returning the value into a pair of variables of type int, or using the return value as a pair of actual arguments for another method call such as:
    call.method(call.method("dummy input arg"), "other dummy input arg")
    This is strongly typed and convenient to write and debug and very efficient at run-time...

    Can anyone give me some real-world examples where
    multiple return values aren't better captured in a
    class that logically groups those values? I can of
    course give hundreds of examples for why it's better
    to capture method arguments as multiple values instead
    of as one "logical object", but whenever I've hankered
    for multiple return values, I end up rethinking my
    strategy and rewriting my code to be better Object
    Oriented.I'd personally say you're usually right. There's almost always a O-O way of avoiding the situation.
    Sometimes though, you really do just want to return "two ints" from a function. There's no logical object you can think of to put them in. So you end up polluting the namespace:
    public class MyUsefulClass {
    public TwoInts calculateSomething(int a, int b, int c) {
    public static class TwoInts {
        //now, do I use two public int fields here, making it
        //in essence a struct?
       //or do I make my two ints private & final, which
       //requires a constructor & two getters?
      //and while I'm at it, is it worth implementing
      //equals(), how about hashCode()? clone()?
      //readResolve() ?
    }The answer to most of the questions for something as simple as "TwoInts" is usually "no: its not worth implementing those methods", but I still have to think about them.
    More to the point, the TwoInts class looks so ugly polluting the top level namespace like that, MyUsefulClass.TwoInts is public, that I don't think I've ever actually created that class. I always find some way to avoid it, even if the workaround is just as ugly.
    For myself, I'd like to see some simple pass-by-value "Tuple" type. My fear is it'd be abused as a way for lazy programmers to avoid creating objects when they should have a logical type for readability & maintainability.
    Anyone who has maintained code where someone has passed in all their arguments as (mutable!) Maps, Collections and/or Arrays and "returned" values by mutating those structures knows what a nightmare it can be. Which I suppose is an argument that cuts both ways: on the one hand you can say: "why add Tuples which would be another easy thing to abuse", on the other: "why not add Tuples, given Arrays and the Collections framework already allow bad programmers to produce unmainable mush. One more feature isn't going to make a difference either way".
    Ho hum.

Maybe you are looking for

  • Variant for create Purchase Order ?

    Hi MM experts, how can i create 2 varients for one USER ID.  when we create the po with ME21N  in Personal Settings 1,  how can we maintail 2 diferent plant ,storage location ,purch org ext... 2,  creating of po with reference of (document overview o

  • Upgrade System Center Operations Manager 2007 R2 CU6 -- 2012 RTM issues (Assembly related exception in log)

    Hi guys I am currently performing a distributed, complex upgrade with a customer: 4 management servers (1 being RMS), both databases (OM & DW) on a single SQL Server (2008 R2 SP2) We moved over the RMS role to another server and decomissioned the old

  • ALV OO: how to change layout more than once using custom pushbuttons?

    Hello, I'm developing a report using ALV Class CL_GUI_ALV_GRID. It's nearly complete. but I need to add some little feature. I create pushbuttons on GUI Status in order to show/hide totals and to group/ungroup fields according. I have already created

  • Return vendor material

    Hi, I have 2 questions. 1) Return material to vendor: I receive consigned material. We transfer this material from vendor consigned stock to own stock using 411K. Now we wish to return this material to vendor. Can I send material back directly from o

  • Re: Error while throwing OAException message

    Hi, I am facing the same issue, doing the controller extension and when throwing an OAEXCEPTION im getting this error. Please let me know if there is any work around. Thanks Divya