How to handle such code: ? super ? extends Type

Hi I faced of a problem which I don't handle:
SortedSet<? extends Integer> set = new TreeSet<>();
Comparator<? super ? extends Integer> c = set.comparator();//how to handle such code?
...Best Regards
Andrej

Integer is a final class, it can not be extended. So, you could as well write:
SortedSet<Integer> set = new TreeSet<Integer>();
Comparator<? super Integer> c = set.comparator();
c.compare(new Integer(5), new Integer(5));On the other hand, If you were thinking of a set allowing different kinds of numbers, this is what you might be looking for.
SortedSet<? super Number> set = new TreeSet<Number>();
Comparator<? super Number> c = set.comparator();
c.compare(new Integer(5), new Long(5));Why it must be "super" instead of "extends" is explained by [PECS rule|http://stackoverflow.com/questions/2723397/java-generics-what-is-pecs].

Similar Messages

  • How to handle source code changes in apex

    hi all,
    can anybody help me plz...
    how to handle source code changes in apex.
    which development process is best suite for apex.
    Regards
    Alekh

    Thanks Andy, so as per the suggestion we have to handle the above snippet as individual if block statements as i had shown below.
    But in this case how we show the else part as NULL.
    correct me if my understanding is wrong.
    if  'Products' in (:P1_ENG_GRP1, :P1_ENG_GRP2, :P_ENG_GRP3) then
                    lv_to_email_id :='[email protected]';
    end if;
    if  'Materials' in (:P1_ENG_GRP1, :P1_ENG_GRP2, :P_ENG_GRP3) then
               lv_to_email_id :='[email protected]';
    end if;Thanks,
    Anoo..

  • How to handle area code split

    It's looking like the phone company is going to split our area code in the next year or two.  This is because there are not enough numbers left, so there's a good chance that one part of the geographical area using the current area code will be assigned a new 3-digit code.
    I am trying to figure out how to handle this in my OSX, iOS and iCloud world.  If I could select all the contacts with the existing area code and export them to a tab-delimited file, I'd stand a good chance of selecting the ones that need to be changed and then doing a "find and replace all" operation in Exel or Numbers.  But I'm not seeing that as an option. 
    It would really be OK for me if there were "an app for that" so I could do the work on my iPad and let iCloud take care of my other devices.  But I'm not seeing that as an option either.
    Does anyone have good esperience or suggestions on how to handle this?

    Integer is a final class, it can not be extended. So, you could as well write:
    SortedSet<Integer> set = new TreeSet<Integer>();
    Comparator<? super Integer> c = set.comparator();
    c.compare(new Integer(5), new Integer(5));On the other hand, If you were thinking of a set allowing different kinds of numbers, this is what you might be looking for.
    SortedSet<? super Number> set = new TreeSet<Number>();
    Comparator<? super Number> c = set.comparator();
    c.compare(new Integer(5), new Long(5));Why it must be "super" instead of "extends" is explained by [PECS rule|http://stackoverflow.com/questions/2723397/java-generics-what-is-pecs].

  • How to handle SQL code for Daylight Savings for MST Time zone

    Hi,
    1. My time zone is MST. My data showing differently as day light saving started from November. Please help me how to handle these issue.
    2. After Mar 09 2014 Daylight saving going to end.( For this how to handle in the SQL codes)
    Please answer for the above 2 doubts.
    Thanks in advance.
    Regards,
    LuckyAbdul

    Hi Abdul,
    Daylight saving is basically like switching to another timezone. If your normal time zone is Mountain Standard Time (MST), you will switch to Mountain Daylight Time in the summer.
    If daylight saving or timezones are a concern. It is best to store your dates in a DATETIMEOFFSET(0) column. This data type includes the offset between your selected timezone (MST or MDT) and UTC. The offset between MST and UTC is -7 hours and the offset
    between MDT and UTC is -6 hours.
    Be sure to datetimeoffset(0) and not just datetimeoffset. datetimeoffset(0) uses 8 bytes to store it's data (same as datetime), but datetimeoffset uses 10 bytes. This is especially important if you are going to index this column.
    Also be sure to use a similar data type in your application or the timezone information will be lost. If it is an .Net application you should use The DateTimeOffset type. Most other programming languages have equivalent types.
    Hope this helps. If you have anymore questions please let me know.
    For more information see:
    http://msdn.microsoft.com/en-us/library/bb630289.aspx
    http://msdn.microsoft.com/en-us/library/ms187819.aspx
    http://msdn.microsoft.com/en-us/library/system.datetimeoffset%28v=vs.110%29.aspx

  • How to handle plsql Object and Table type inside BPEL

    Hi All,
    I have a procedure with 5 IN and 4 OUT parameters. Out of 4, One is Object type and remaining 3 are Table type. Now in my bpel, i am calling this proc from DB Adapter. The DB Adapter wizard created XSD with proper structure. But when i am testing this i am not getting these out parameters values in the payload of Invoke DBAdapter activity. I am neither getting errors nor output.
    What could be the issue.?
    Thanks in advance,
    Sudheer

    Arik,
    JDev is not creating any wrapper packages as such. It simply created a XSD with same as my procedure name.
    My XSD looks like this...
    <element name="OutputParameters">
    <complexType>
    <sequence>
    <element name="P_OBJ_H_INFO_O" type="db:APPS.H_OBJ_TYPE" db:index="6" db:type="Struct" minOccurs="0" nillable="true"/>
    <element name="P_TAB_L_INFO_O" type="db:APPS.L_TAB_TYPE" db:index="7" db:type="Array" minOccurs="0" nillable="true"/>
    <element name="P_TAB_M_INFO_O" type="db:APPS.M_TAB_TYPE" db:index="8" db:type="Array" minOccurs="0" nillable="true"/>
    <element name="P_TAB_A_INFO_O" type="db:APPS.A_TAB_TYPE" db:index="9" db:type="Array" minOccurs="0" nillable="true"/>
    </sequence>
    </complexType>
    </element>
    And again the 3 table types internally referring object types.
    Thanks for reply. Awaiting response...
    Sudheer

  • How to handle error for a Db Table to Db table transform in ODI

    Hi,
    I have created two table in two different schema source and target, where there is a field for e.g.- place where the datatype is varchar2 and data inserted is string.
    In designer model of ODI i have put the type of place as number in both source and target and accordingly done the mapping.
    When it is executed it should give an error, but it got completed but no data is inserted neither in target table nor in error table in the target schema(E$_TARGET_TEST which is created automatically).
    Why the error is not given and how to handle such type of error..
    Please help.
    The codes for source and target tables are as follows:
    source table code:
    CREATE TABLE "DEF"."SOURCE_TEST"
        "EMP_ID"   NUMBER(9,0),
        "EMP_NAME" VARCHAR2(20 BYTE),
        "SAL"      NUMBER(9,0),
        "PLACE"    VARCHAR2(10 BYTE),
        PRIMARY KEY ("EMP_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "USERS" ENABLE
    inserted data:
    INSERT INTO "DEF"."SOURCE_TEST" (EMP_ID, EMP_NAME, SAL, PLACE) VALUES ('1', 'ani', '12000', 'kol')
    INSERT INTO "DEF"."SOURCE_TEST" (EMP_ID, EMP_NAME, SAL, PLACE) VALUES ('2', 'priya', '15000', 'jad')
    target table code:
    CREATE TABLE "ABC"."TARGET_TEST"
        "EMP_ID"     NUMBER(9,0),
        "EMP_NAME"   VARCHAR2(20 BYTE),
        "YEARLY_SAL" NUMBER(9,0),
        "BONUS"      NUMBER(9,0),
        "PLACE"      VARCHAR2(10 BYTE),
        PRIMARY KEY ("EMP_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "USERS" ENABLE

    Hi,
    I have used the following KMs in my transformation with the following options:
    IKM SQL Incremental Update
    INSERT    <Default>:true
    UPDATE    <Default>:true
    COMMIT    <Default>:true
    SYNC_JRN_DELETE    <Default>:true
    FLOW_CONTROL    <Default>:true
    RECYCLE_ERRORS    <Default>:false
    STATIC_CONTROL    <Default>:false
    TRUNCATE    <Default>:false
    DELETE_ALL    <Default>:false
    CREATE_TARG_TABLE    <Default>:false
    DELETE_TEMPORARY_OBJECTS     <Default>:true
    LKM SQL to SQL
    DELETE_TEMPORARY_OBJECTS    <Default>:true
    CKM Oracle
    DROP_ERROR_TABLE    <Default>:false
    DROP_CHECK_TABLE    <Default>:false
    CREATE_ERROR_INDEX    <Default>:true
    COMPATIBLE    <Default>:9
    VALIDATE    <Default>:false
    ENABLE_EDITION_SUPPORT    <Default>:false
    UPGRADE_ERROR_TABLE    true

  • Handling pop up of sub type HR_MAINTAIN_MASTERDATA function module

    Hi All,
    I am using HR_MAINTAIN_MASTERDATA for creating employee it's working fine but i am not able to handle pop up for sub type.
    For example sub type for Address it gives me pop up with values 1 Permamant address 2 Office address etc.
    Anybody know how to handle such pop up in function module. How to provide values to sub type.
    Thanks in advance.

    Hi,
    <li>Instead of using HR_MAINTAIN_MASTERDATA function module, you can use HR_INFOTYPE_OPERATION, because HR_MAINTAIN_MASTERDATA is used inside HR_INFOTYPE_OPERATION.
    <li>Check the sample program .
    REPORT  ztest_notepad .
    DATA:p0006  TYPE STANDARD TABLE OF p0006 WITH HEADER LINE.
    DATA:return LIKE  bapireturn1.
    p0006-pernr = '00001234'.
    p0006-subty = '2'.
    p0006-endda = '99991231'.
    p0006-begda = sy-datum.
    p0006-anssa = '2'.
    p0006-name2 = 'xyz'.
    p0006-stras = 'Street 64'.
    p0006-ort01 = 'US'.
    p0006-pstlz = '560634'.
    APPEND p0006.
    CLEAR  p0006.
    LOOP AT p0006.
      CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'
        EXPORTING
          number = p0006-pernr.
      CALL FUNCTION 'HR_INFOTYPE_OPERATION'
        EXPORTING
          infty         = '0006'
          number        = p0006-pernr
          subtype       = p0006-subty
          validityend   = p0006-endda
          validitybegin = p0006-begda
          record        = p0006
          operation     = 'INS'
          tclas         = 'A'
        IMPORTING
          return        = return.
      IF  return IS INITIAL.
        WRITE 'Successfully records created'.
      ENDIF.
      CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'
        EXPORTING
          number = p0006-pernr.
    ENDLOOP.
    Thanks
    Venkat.O

  • Handling pop up of sub type HR_MAINTAIN_MASTERDATA

    Hi All,
    I am using HR_MAINTAIN_MASTERDATA for creating employee it's working fine but i am not able to handle pop up for sub type.
    For example sub type for Address it gives me pop up with values 1 Permamant address 2 Office address.
    Anybody know how to handle such pop up in function module. How to provide values to sub type.
    Thanks in advance.

    HI R P,
    The field SUBTY is there as an export parameter for function module you mentioned.
    Please pass the value for that field when you call the FM in your program.
    Hope this helps
    Ajay

  • How to handle the dynamic rows in pdf table

    Dear All,
    earlier i posted one thread reagarding getting pdf table data
    [facing problem while getting interactive form table data;
    this is working fine, i sued bind_table in wddoinit, but here i am fixing the rows count and bind_table.
    for example i have initially taken row count as 3 then i want to increase the rows in pdf table.
    i know we can use the formcalc to increase the rows by taking a button in pdf layout.
    this also working, but the data is not picking for newly added rows, i hope the problem is because the table node in the context is not binded for this new rows.
    even i tried using with webdynpro native button controlls still not working.
    any one help me what exactly this bind_table is doing and how to handle this code in form calc.
    since my table is pdf table.
    Thanks,
    Mahesh.Gattu

    Hi Thomas,
    Thanks for your confirmation,
    i have checked the paramets of submit button we have only wdevent parameters they are
    CL_WD_CUSTOM_EVENT
              PARAMETERS - Hashed table having 2 columns
              ID     ->IF_TDS (Interactive Form element Name)
             CONTEXT_ELEMENT     ->->
    these are same in case of submit button1 and submit button 2.
              NAME - Name of the Button Event i.e ON_SUBMIT (  this is also same in both the buttons).
    so i think it is not possible to work with multiple buttons by assinging to multiple tables on form.
    The other option is to place the buttons outside of the forum in the surrounding WDA area.
    This way you have no problem handling the events.
    in wddoinit if i use bind_table with 5 rows form table is populating with 5 rows, but when i take a button
    out side the form and use bind_table by incremeting the rows the pdf table rows are not adding, if i enter
    some thing on pdf table then click on add row button then the table rows are getting add. if i don't do any
    action on pdf table and click on add row button pdf is not getting update.
    is there any issue.. if i don't keep cursor on table and type some thing.. the add button is not updating
    the rows.
    if i take a  button on wd view i.e outside the form and use bind table i shall add the rows.. but in case of remove rows how to do.
    in case of normal table we can use Remove_Element( ) but how can i know the selected row from the pdf table, please help me in this concern also.
    Regards,
    Mahesh.Gattu
    Edited by: Maheshkumar gattu on Jan 7, 2009 3:57 PM
    Edited by: Maheshkumar gattu on Jan 7, 2009 4:03 PM
    Edited by: Maheshkumar gattu on Jan 7, 2009 5:21 PM

  • Check Code (PK) When type in to text field,Exist or not

    Hi,
    i want to create a Language Master.I have take two fields LAN_CODE and LAN_NAME in LANG_MASTER Table. Here LAN_CODE is my Primary Key.
    Now problem is when i type New LAN_CODE into Text Field Item and when i press Submit then it show me Error LAN_CODE Already Exist .
    I need when i Type New LAN_CODE in Language Code TEXT FIELD then it should be check LAN_CODE Already Exist or not. if LAN_CODE Already Exist .then Cursor should not point (go) to Next Item.
    My LAN_CODE Formate is
    HIE-------Hindi
    ENG------English
    PAN------PANJABI
    How can i check code when i type new code in to text field.Code Exist or Not.
    How can i do this.
    Thanks
    Vedant
    Edited by: Vedant on Jun 2, 2011 11:39 PM

    Hi Paul ,
    Thanks to reply me.
    I have created a form with report and
    i did apply that code ,It's working BUt Now Problem is when i press TAB then it's show me error Value Already Exit But Here it's change into APPLY_CHANGE Mode .
    How can i prevent to page not in Apply Change Mode.
    i want when TAB Press and check for Duplicate VAlue it should be in Create New Language Mode.
    How can i do this.
    Thanks
    Vedant
    Edited by: Vedant on Jun 5, 2011 11:19 PM

  • How do I get an extended SecurityManager to handle privileged code?

    Hi.
    I have written my own SecurityManager which asks if the user wants to allow the action before denying it. It also offers to write the whole permission into the current policy file.
    The problem I have is that I can't get the securitymanager to handle privileged code. At the moment I get the call stack and check which classes that doesn't have the permission, check their codebase and write the permission to that codebase. But that will fail if any code is privileged.
    So what I need is to get some information about those protection domains that are marked privileged, and it seems that the only way to get that is by using DomainCombiner.
    But it doesn't seem to work at all, thinking that it might have something to do with that I have to run the critical code in my security manager as privileged, and that I do something wrong when I am extracting the DomainCombiner.
    Well, I hope you understand my problem and that someone have some nice idea about how to do it in a clean nice way.
    best regards,
    Fredrik

    Might be better if I post the whole code, it aint that big.
    package tddc03;
    public class SecMan2 extends SecurityManager { 
        private static String separator = System.getProperty("file.separator");
        public SecMan2() {
             super();
        public void checkPermission(final Permission perm) {
         try {
             super.checkPermission(perm);
         catch (final SecurityException se) {
             System.out.println("Securityexception caught: " + se.getMessage());
             System.out.println("Would you like to: 1. Allow once, 2. Allow everytime, 3. Deny?");
             try {
              char res = (char)System.in.read();
              /*Read until end of line, or eof. to descard anything other then the first character*/
              char tmp;
              int readItem;
              do {
                  tmp = (char) (readItem = System.in.read());
              }  while ( tmp != '\n' && readItem != -1 );
              if ((res != '1') && (res != '2')) {
                  System.out.println("deny!");
                  throw se;
              else if (res == '2')
                   /*Well, we need to make the handleException() code to run as privileged code
                    * since it need access to resources that the caller shouldn't have access to.
                    * The code that runs marked as privileged only rely on its own permission, so
                    * we can give this package the permission to write to the policy file without giving
                    * it to the program that is running*/
                    try {
                        AccessController.doPrivileged(
                                       new PrivilegedExceptionAction() {
                                           public Object run() throws SecurityException {
                                                      handleException(se, perm);
                                                      return null;
                    } catch (PrivilegedActionException e) {
                        throw (SecurityException) e.getException();
             } catch (IOException ioe) {
                  System.out.println("IOException on input:" + ioe.getMessage());
                  throw se;
         catch (Exception e) {
             System.out.println("Exception caught :" + e.getMessage());
             e.printStackTrace();
        private void handleException(SecurityException e, final Permission perm) {
         String provider;
         Vector<String> codebase = new Vector();
         /*if you only using your own policy file, there will be one '=' infront of the
           searchpath which we have to remove*/
         provider = System.getProperty("java.security.policy");     
         provider = provider.replaceFirst("=","");     
         /*this means we have to use the default one.*/
         if (provider == null)
             provider = System.getProperty("java.home") + separator +"lib"
              + separator +"security"+separator+"java.policy";
         //codebase = "file:" + System.getProperty("user.dir") + separator + "-";
         Class[] classes = getClassContext();
         ProtectionDomain pd = null;
         for(int i=0; i < classes.length; i++) {
             pd = classes.getProtectionDomain();
         if (pd.implies(perm) == true) {
                        System.out.println(i + ". " + classes[i].toString());
         else {
                        System.out.print(i + ". " + classes[i].toString()+ "[");
                        System.out.println(pd.getCodeSource().getLocation().toString() + "]");
                        codebase.add(pd.getCodeSource().getLocation().toString());
         final File policy_file = new File(provider);
         final PolicyParser parser = new PolicyParser();
         PolicyParser.PermissionEntry perm_entry;
         PolicyParser.GrantEntry grant_entry;
         //Traverse the exception message to get the specs for the new permission
         String perm_type, perm_action, perm_param;
         try {
         //We need to get the data from the exception message, so we will split it up.
         String temp[] = e.getMessage().split("[()]",3);
         temp = temp[1].split("\\s",3);
         perm_type = temp[0];
         perm_param = temp[1];
         if (temp.length > 2)
              perm_action = temp[2];
         else
              perm_action = "";
         perm_entry = new PolicyParser.PermissionEntry(perm_type, perm_param, perm_action);
         FileReader p_reader = new FileReader(policy_file);
         parser.read(p_reader);
         p_reader.close();
         //Travers all grants, looking for the current codeBase
         PolicyParser.GrantEntry list_entry;
         Enumeration elements;
         for(Enumeration ec = codebase.elements(); ec.hasMoreElements();) {
              elements = parser.grantElements();
              grant_entry= new PolicyParser.GrantEntry();
              grant_entry.codeBase = (String) ec.nextElement();
              while(elements.hasMoreElements()) {
              list_entry = (PolicyParser.GrantEntry) elements.nextElement();
              //If null == null or codeBase == codeBase
              if (grant_entry.codeBase.equals(list_entry.codeBase)) {
                   list_entry.add(perm_entry);
                   //To mark that the entry was successfully found
                   grant_entry = null;
                   break;
              if (grant_entry != null) {
              grant_entry.add(perm_entry);
              parser.add(grant_entry);
         FileWriter p_writer = new FileWriter(policy_file);
         parser.write(p_writer);
         p_writer.close();
         Policy.getPolicy().refresh();
         } catch (IOException ioe) {
         System.out.println("IOException caught:" + ioe.getMessage());
         } catch (ParsingException pe) {
         System.out.println("ParsingException caught:" + pe.getMessage());
         } catch (Exception ex) {
         System.out.println("Exception caught:" + ex.getMessage());

  • How can I pass a file refnum into and out of external c++ code? What type does it convert to in c++?

    I am trying to write external c++ code that will read a file already opened by Labview and therefore assigned a refnum. (Unfortunately, I definately can't use the standard Labview vis.) However I am not sure what c++ type to use in order to manage the refnum.
    All help and thoughts appreciated. Thanks,
    Joanna

    You could do ALL your file handling in C or C++ (MFC CFile for
    example) and pass Microsoft file handles into and out of LabVIEW
    instead of LabVIEW file references into and out of C. This may be an
    easier way to attack the problem.
    You could create a DLL in MSVC that exports a FileOpen function, a
    FileClose function and a FileRead and/or FileWrite Function and then
    call that DLL from place to place as required in your code.
    It would help us if you would explain what kind of data you are trying
    to read or write and what the application is. Is it binary data?
    text files? Do you need some special Win32 file system feature like
    file mapped memory? I guess what I am asking is what is your
    motivation for doing file handling in C or C++?
    Douglas De Clue
    LabVIEW developer
    [email protected]
    "Rolf" wrote in message news:...
    > A LabVIEW file refnum is an internal Magic Cookie to LabVIEW and there is no
    > way to directly extract the actual information assigned to that Magic
    > Cookie.
    > However the CIN Reference Manual describes one function which allows to
    > retrieve a lower level "File" handle and at least on Windows 32 bit and
    > LabVIEW
    > from version 5 up to and including 6.1 this "File" LabVIEW datatype directly
    > maps
    > to the Win32 API "FILE" Handle.
    >
    > The function to use is
    >
    > MgErr FRefNumToFD(LVRefNum refNum, File *fdp);
    >
    > It is declared in extcode.h or one of its dependant headers and exported
    > from "labview.lib"
    > all located in the cintools directory and you can link this lib also to a
    > normal DLL project.
    > However calling this DLL then from any other process than LabVIEW or a
    > LabVIEW
    > executable will not initialize the DLL anymore correctly.
    >
    > Your best option if you need to write in C(++) should be to use the LabVIEW
    > file manager
    > functions described on the External Code Manual (manual/lvexcode.pdf) on
    > this File handle.
    > If you need to use directly some Win32 API functions with it please note
    > that although currently
    > the "File" in the LabVIEW file manager functions matches the FILE in Windows
    > 32 bit API
    > functions this is an undocumented and hence unsupported feature. The next
    > LabVIEW version
    > may actually use a different datatype for its "File" parameter to the
    > LabVIEW file manager calls
    > and your use of assuming File == FILE may simply crash.
    >
    > Also operating on a file refnum in LabVIEW which has been accessed directly
    > with Win API
    > functions may result in strange behaviour such as the file read/write mark
    > not being updated as
    > you would maybe expect it.
    >
    > "Jo" wrote in message
    > news:50650000000800000016520000-1023576873000@exch​ange.ni.com...
    > > How can I pass a file refnum into and out of external c++ code? What
    > > type does it convert to in c++?
    > >
    > > I am trying to write external c++ code that will read a file already
    > > opened by Labview and therefore assigned a refnum. (Unfortunately, I
    > > definately can't use the standard Labview vis.) However I am not sure
    > > what c++ type to use in order to manage the refnum.
    > > All help and thoughts appreciated. Thanks,
    > > Joanna

  • How to handle type safety when using com.sap.typeservices.IProposalList

    Hi,
    I have been testing out the new features in Web Dynpro Java CE EHP1 using a scenario with BPM and SAP MDM. One of the new features I tested is the Ajax feature of using suggestion values. I have an InputField UI element which have bound to a context attribute (CountriesView/Country) which is of type string. The UI element has the "suggestValues" value set to true. I then use the IProposalList to produce a valueset. This will make the InputField UI appear as a combo box and allow the users to type in a few characters and utilize the Ajax framework to automatically search in the list of values.
    The following code works perfectly ok but I don't understand how I should handle the compiler warning "IProposalList is a raw type. References to generic type IProposalList<T> should be parameterized"?
    IProposalList proposalsCountry = wdContext.nodeCountriesView().getNodeInfo().getAttribute(IPrivateComp1.ICountriesViewElement.COUNTRY).getModifiableSimpleType().getSVServices().getProposals();
    for(int i=0;i<bua.length;i++){
        IPrivateComp1.ICountriesViewElement buaelement=wdContext.createCountriesViewElement();
        buaelement.setCountry(bua<i>[0]);
        buaelement.setCode(bua<i>[1]);
        bualist.add(buaelement);
        proposalsCountry.add(bua<i>[0]);
    wdContext.nodeCountriesView().bind(bualist);
    I don't have any issues handling this for other types such as ArrayList. Using the syntax "IProposalList<String> proposalsCountry ...." will handle the "proposalsCountry.add .." part but I still have a warning "Type safety: The expression of type IProposalList needs unchecked conversion to conform to IProposalList<String>"
    Any ideas on how to handle this?
    Thanks,
    Johan

    Hi,
    Eventhough there are no replies to this thread I thought I should update with what I belive is an answer to my question. Excerpt from http://stackoverflow.com/questions/382/what-is-the-meaning-of-the-type-safety-warning-in-certain-java-generics-casts:
    "This warning is there because Java is not actually storing type information at runtime in an object that uses generics. Thus, if 'object' is actually a List<String>, there will be no ClassCastException at runtime except until an item is accessed from the list that doesn't match the generic type defined in the variable. This can cause further complications if items are added to the list with this incorrect generic type information. Any code still holding a reference to the list but with the correct generic type information will now have an inconsistent list. To remove the warning, try:
    List<?> list = (List<?>) object;However, note that you will not be able to use certain methods such as add because the compiler doesn't know if you are trying to add an object of incorrect type. The above will work in a lot of situations, but if you have to use add or some similarly restricted method, you will just have to suffer the yellow underline in Eclipse (or a SuppressWarning annotation)."
    The last line explain the reason for my issue and the lack of a solution when using add method.
    /Johan

  • How to handle the extended vo in the extended controller

    Hi,
    I want to know how to handle the extended vo attributes in the extended controller.
    I extended CompetenceElementsVO as 'CompetenceElementsEx' with 2 transient attributes called col1 and col2.
    Here i want to pass value according based on some condition. for this i want to know how to handle these attributes.
    I tried by using the extended vo name in the controller, if i use means then it is throwing error after the extended controller is implemented.
    Same time if i try to refer this attributes from the original vo definition, jdev itself showing error.
    please tell me how to handle this?
    Thanks in advance,
    SAN

    Hi San,
    You have to extend the controller where your region is associated with,
    And in that controller you get the AM(if there is more than one AM and your VO is associated with a child AM, first you have to get your required AM) and then
    get the ViewObject(standard).
    Then you should be able to get your newly added attributes.
    Please find the below sample code to get the AM handle and VO from there, update the code according to your requirement,
         Get all the VOs under the Root AM
         writeLog(pageContext, "Room AM"+ pageContext.getRootApplicationModule());
    String[] rootViewNames = pageContext.getRootApplicationModule().getViewObjectNames();
    /* writeLog(pageContext," Length of the VOs from Rootm AM "+rootViewNames.length);
    for (int j =0 ;j<rootViewNames.length ;j++ )
    writeLog(pageContext,j +" Value "+rootViewNames[j]);
         // Get requested AM from Root am
    public OAApplicationModule getRequestedAM(OAPageContext pageContext, String requestedAMName)
    writeLog(pageContext,"Requested AM called to check the AM "+requestedAMName );
    String amName = "";
    String objectivesAMName = requestedAMName;//"ObjectivesAM";
    String nestedAMArray[] = pageContext.getRootApplicationModule().getApplicationModuleNames();
    pageContext.writeDiagnostics(this,"Root AM=>"+pageContext.getRootApplicationModule().getName() + " Child AMs=>"+ nestedAMArray.length,1);
    OAApplicationModule currentAM = null;
    currentAM = (OAApplicationModule)pageContext.getRootApplicationModule();
    for(int i = 0; i < nestedAMArray.length; i++)
    amName = nestedAMArray;
    pageContext.writeDiagnostics(this,"Nested AM Name=>"+amName + "and amName.indexOf(objectivesAMName) "+amName.indexOf(objectivesAMName),1);
    currentAM = (OAApplicationModule)pageContext.getRootApplicationModule().findApplicationModule(amName);
                        //Get the view names
                   String[] viewNames = currentAM.getViewObjectNames();
    for (int i =0 ;i<viewNames.length ;i++ )
    writeLog(pageContext,i +" Value "+viewNames[i]);
    if(!(amName.indexOf(objectivesAMName)==-1))
    pageContext.writeDiagnostics(this,"Found Handle to My Nested AM " + amName ,1);
    break;
    return currentAM;
    Get the VO from the AM
    OAViewObject objAssessmentVO = (OAViewObject)yourAM.findViewObject("yourVO");
    Thanks.
    With Regards,
    Kali.
    OSSi.

  • How to post reason code/movement type from MM to FI document?

    Have had a request from our Finance guy here that when a movement is posted in MM (eg a scrapping), the reason code and movement type are to go onto the FI document when the movement is posted to the GL accounts. These values are to be viewed from FBL3N.
    He thinks it might need to be done with substitutions but I have had no experience in this area and he has no idea how to go about it. I have extended the COBL structure using OKX3 which has put the field into BSEG but have no idea how to go about doing the substitution or which exit to use. Inaddition in SAP standard, MSEG passes the movememnt type tyo COBL field BWART but then this seems to get voided.
    Can anyone help me?
    Regards
    Larissa Maryniuk

    Hi Larissa,
    Please go through with this below link. You can easily understand about Substitutions.
    http://techbays.files.wordpress.com/2008/08/sap-tip-how-to-use-substitutions-lakshman-tandra1.pdf
    Best Regards,
    Mohan.

Maybe you are looking for

  • Is iWork's 09 compatible with Maverick OS

    I recently upgraded to Maverick OS 10.9.  Now my iWorks 09 program does not work. I get an error message when trying to launch.  Anyone know a fix?

  • Vendor evaluation reports

    Hey Gurus, During the pre-study for implementation of the vendor evaluation tool in R/3 my business team has asked for reports showing the data/orders behind the evaluations. If, for instance, a low score is computed for the u201COn-time deliveryu201

  • Usage of MAX Function.

    Hi, One of our customers is facing an error while executing a PL/SQL block like, declare l_flag varchar2(30); begin select max('Y') into l_flag from v$database; -- Can use any table here end; however, when the select query is changed to as follows, n

  • Running custom packages within BPC 5.1

    Hi, Current Enviroment: BPC Ver: 5.1 SQL Server: SQL 2005 I have used earlier versions of BPC 5.1 which used SQL 2000 as a back end and was able to utlise functionailty within the EVMODIFYSCRIPT object to perform certian SQL based tasks such as creat

  • Webservice scenario required

    does any one has a webservice scenario step by step....I mean Enterprise service repository with PI 7.1 how to deal with ESR....Enterprise service bundels.....etc....