Lifetime of a class

Please help me knowing the answer for this basic doubt.
I have written a class with static methods which basically do some common functionality for my module . For each client request to a webpage,im calling this class to execute some methods. My question is
1) Will the class be loaded in to memory by JVM only once since because the methods are static.
2) If yes,then each request to a webpage will result in calling this class from memory. Please correct me..
3) What is the lifetime of this class in the memory?
4) What will happen if a class itself is declared as static? What is its lifetime? Will the performance be improved by making the class static?
Performance here means for each client request to a particula page which call this class,instead of loading class everytime,if it is available in the memory, it will reduce the loading time of the page
4) Any reference to a doc which will explain this scenario would be of gr8 help
Thanks in advance

1) Will the class be loaded in to memory by JVM only
once since because the methods are static.As I understand it all classes are only loaded once (per class loader) .
4) What will happen if a class itself is declared as
static? (Ignoring inner classes, as I don't think that is what you mean) you can not declare classses as static.
Performance here means for each client request to a
memory, it will reduce the loading time of the page Are you sure this is a performance bottle neck. I bet it is not.
4) Any reference to a doc which will explain this
The Java Virtual Machine Specification
The Java Language Specification
Google: The Java Memory Model

Similar Messages

  • Lifetime of static classes in WebDynpro

    Hi,
    I have a question regarding static java classes in WebDynpro: Does anybody know details about their lifetime. I was searching for this information but I didn't find info.
    The background of this question is, that I would like to store configuration data (customizing) from the R/3 in a static class of my WebDynpro application, in order to minimize DB requests. Exists a static class for the whole WebDynpro session or is it destroyed after every user interaction?
    Thanks in advance,
    Martin

    Hi
    If  I have understood you
             You  want to create a static class,  you are expecting the values will remain same for the lifetime of the
    webdynpro app.
    In order to understand the use of the static keyword in class declaration, we need to understand the class
    declaration itself. You can declare two kinds of classes: top-level classes and inner classes.
    Top-level classes
    You declare a top-level class at the top level as a member of a package. Each top-level class corresponds to
    its own java file sporting the same name as the class name.
    A top-level class is by definition already top-level, so there is no point in declaring it static; it is an error to do
    so. The compiler will detect and report this error.
    you cant write a code like
    public static class hello {
    it gives an error like
    Illegal modifier for the class hello; only public, abstract & final are permitted
    Regards
    Abhijith YS

  • When do subcontroller classes die?

    I have a question concerning the lifetime of controller class instances.
    I have a view called root.bsp, where I create one out of two subcontrollers depending on a variable.
    <% IF controller->myVar = 1.%>
        <bsp:call url="c1.do" comp_id = "c1" />
    <% ELSE. %>
        <bsp:call url="c2.do" comp_id = "c2" />
    <% ENDIF.%>
    c1.do has a controller class called CL_1.
    At first, myVar is 1, so c1 is called. Now, in CL_1 I set myVar to 2, so in the next request, c2 will be called. I would assume that the instance of CL_1 now will be destroyed because it is not used anymore. However, when I call c1.do later, CL_1 will still have the attribute values from the previous time.
    Why is the controller class instance not removed after the corresponding controller/view is not shown anymore?

    sorry daniel, my fault. I meant statefull actually... I was quite sure you used statefull for an MVC application.
    sorry for the confusion!
    In my opinion, it's not a page change an long as there is no change of the supercontroller.
    You could destroy the subcontrollers manually...
    cheers
    daniel 2

  • How to create Sequence Diagrams in Jdev 10.1.3?

    Hi there,
    I´m migrating (trying) from Eclipse to JDeveloper and I´m having several dificulties....
    I´m creating a new project in JDeveloper:
    0) create an application workspace [ok]
    1) create a web application project [ok]
    2) create some packages and Java classes [ok]
    3) create a class diagram related to the
    above classes [ok]
    4) create a sequence diagram [ok]
    5) use the classes into the sequence
    diagram [more and less]
    6) use the methods of the classes into
    the message lines of the sequence
    diagram [no]
    Some observations that are messing me:
    1) Do I need to create an "Object Lifetime" for
    every class and after that select "Attach Classifier" ?? Why I can´t just drag the classes into the diagram (like Jude) ?
    2) Can I use the methods already defined in the classes to create messages in the sequence diagram?
    3) The sequence diagram od JDeveloper is disconnected from the project classes? i.e., is it just a draw ?
    best regards,
    Felipe Gaúcho

    Hi,
    I am glad to find that you are working on the sequence diagram. I take your point about selecting the methods and assigning them to the messages. Unfortunately this feature is gated by some architecture changes and it something I will be actively pursuing as soon as it is possible.
    In reply to your other points:
    1) Do I need to create an "Object Lifetime" for
    every class and after that select "Attach Classifier" ?? > Why I can´t just drag the classes into the diagram (like > Jude) ?The reason for this is that the sequence modeler is simply a view onto a single diagram type that can contain any object. This allows the mingling of different UML type on the same diagram. It can be usefull to mix usecase and seqeunce for example.
    For that reason the default action for java class is to model a java class, and you do indeed need to create a lifeline first. Did you know you could drag and drop the classifier, in your case a java class, from the navigator onto the lifeline. This might be quicker in your case.
    2) Can I use the methods already defined in the classes > to create messages in the sequence diagram?As noted before in the preview you can't select existing messages. This is something we would like to add as soon as it is possible.
    3) The sequence diagram od JDeveloper is disconnected
    from the project classes? i.e., is it just a draw ?The sequence modeler isn't totally disconnected from the project classes; but it wont update as you edit the code if this is what you mean.
    Could you perhaps expand on this point a little bit?
    Thanks,
    Gerard Davison
    UML Modelers

  • How to deployee phonegap application in Mobilizer 5.1.3

    Hi,
    I developed phone Gap application, MOBILIZER server configuration is done. now i need to deploy my phone gap application using "Mobilizer 5.1.3".
    what is the process for deployment application using mobilizer 5.1.3

    Hi,
    I am glad to find that you are working on the sequence diagram. I take your point about selecting the methods and assigning them to the messages. Unfortunately this feature is gated by some architecture changes and it something I will be actively pursuing as soon as it is possible.
    In reply to your other points:
    1) Do I need to create an "Object Lifetime" for
    every class and after that select "Attach Classifier" ?? > Why I can´t just drag the classes into the diagram (like > Jude) ?The reason for this is that the sequence modeler is simply a view onto a single diagram type that can contain any object. This allows the mingling of different UML type on the same diagram. It can be usefull to mix usecase and seqeunce for example.
    For that reason the default action for java class is to model a java class, and you do indeed need to create a lifeline first. Did you know you could drag and drop the classifier, in your case a java class, from the navigator onto the lifeline. This might be quicker in your case.
    2) Can I use the methods already defined in the classes > to create messages in the sequence diagram?As noted before in the preview you can't select existing messages. This is something we would like to add as soon as it is possible.
    3) The sequence diagram od JDeveloper is disconnected
    from the project classes? i.e., is it just a draw ?The sequence modeler isn't totally disconnected from the project classes; but it wont update as you edit the code if this is what you mean.
    Could you perhaps expand on this point a little bit?
    Thanks,
    Gerard Davison
    UML Modelers

  • Do static classes persist for the lifetime of the applet or the JRE in 1.4

    I have an application that runs in a web browser and uses several applets that share data between each other using a static class. This method works fine for version 1.3 but not in 1.4.x. Do static classes now only exist for the lifetime of the applet?

    I had a similar problem and solved it by setting the codebase attribute on the applet tags. The only documentation I have been able to find about this issue is here: http://java.sun.com/products/plugin/1.3.1_01a/new.html#classloader

  • Control problem in trees using class

    Hi all i am creating tree structure using class method in that when i am creating only one node it is working properly but when i try to crate multiple nodes it is giving me dump my program is as follow.
    I search these on sdn and try the things but it still giving me same error.
    *& Report  ZIRPT_HR_TEST_SPLITTER_01
    report  zirpt_hr_test_splitter_01.
    tables : pa0001,t582s.
    select-options : p_pernr for pa0001-pernr no intervals.
    *       CLASS screen_init DEFINITION
    class screen_init definition create private.
      public section.
        class-methods init_screen.
        methods constructor.
      private section.
        data: splitter_h type ref to cl_gui_splitter_container,
        splitter_v type ref to cl_gui_splitter_container,
        picture type ref to cl_gui_picture,
        tree type ref to cl_gui_simple_tree,
         it_pa0001 type table of pa0001,
         it_pa0000 type table of pa0000.
        methods: fill_tree,
        fill_picture.
    endclass.                    "screen_init DEFINITION
    *       CLASS screen_handler DEFINITION
    class screen_handler definition.
      public section.
        methods: constructor importing container
        type ref to cl_gui_container,
        handle_node_double_click
        for event node_double_click
        of cl_gui_simple_tree
        importing node_key.
      private section.
        data: html_viewer type ref to cl_gui_html_viewer,
               it_pa0001 type table of pa0001,
               it_pa0000 type table of pa0000,
        list_viewer type ref to cl_gui_alv_grid.
        methods:
        fill_list importing pernr type pa0001-pernr
                           infty type t582s-infty.
    endclass.                    "screen_handler DEFINITION
    *       CLASS screen_init IMPLEMENTATION
    class screen_init implementation.
      method init_screen.
        data screen type ref to screen_init.
        create object screen.
      endmethod.                    "init_screen
      method constructor.
        data: events type cntl_simple_events,
        event like line of events,
        event_handler type ref to screen_handler,
        container_left type ref to cl_gui_container,
        container_right type ref to cl_gui_container,
        container_top type ref to cl_gui_container,
        container_bottom type ref to cl_gui_container.
        create object splitter_h
        exporting
        parent = cl_gui_container=>screen0
        rows = 1
        columns = 2.
        call method splitter_h->set_border
          exporting
            border = cl_gui_cfw=>false.
        call method splitter_h->set_column_mode
          exporting
            mode = splitter_h->mode_absolute.
        call method splitter_h->set_column_width
          exporting
            id    = 1
            width = 110.
        container_left = splitter_h->get_container( row = 1 column = 1 ).
        container_right = splitter_h->get_container( row = 1 column = 2 ).
        create object splitter_v
        exporting
        parent = container_left
        rows = 2
        columns = 1.
        call method splitter_v->set_border
          exporting
            border = cl_gui_cfw=>false.
        call method splitter_v->set_row_mode
          exporting
            mode = splitter_v->mode_absolute.
        call method splitter_v->set_row_height
          exporting
            id     = 1
            height = 160.
        container_top = splitter_v->get_container( row = 1 column = 1 ).
        container_bottom = splitter_v->get_container( row = 2 column = 1 ).
        create object picture
        exporting parent = container_top.
        create object tree
        exporting parent = container_bottom
        node_selection_mode =
        cl_gui_simple_tree=>node_sel_mode_single.
        create object event_handler
        exporting container = container_right.
        event-eventid = cl_gui_simple_tree=>eventid_node_double_click.
        event-appl_event = ' '.
        append event to events.
        call method tree->set_registered_events
          exporting
            events = events.
        set handler event_handler->handle_node_double_click for tree.
        call method: me->fill_tree,
                     me->fill_picture.
         call method cl_gui_cfw=>flush.
      endmethod.                    "constructor
      method fill_picture.
        types pict_line(256) type c.
        data pict_tab type table of pict_line.
        data url(255) type c.
        data : file type rlgrap-filename value 'C:\Documents and Settings\sapgroup.NITCOWRL\My Documents\nitco.gif'.
        translate file to upper case.
    *CALL FUNCTION 'WS_UPLOAD'
    *EXPORTING
    *filename = file
    *filetype = 'BIN'
    *TABLES
    *data_tab = pict_tab.
        data query_table_wa type w3query.
        data query_table type table of w3query." OF like w3query occurs 1 with header line.
        data html_table type table of w3html."  like w3html occurs 1.
        data return_code type  w3param-ret_code.
        data content_type type  w3param-cont_type.
        data content_length type  w3param-cont_len.
        data pic_data type table of w3mime."  like w3mime occurs 0.
        data pic_size type i.
        refresh query_table.
        query_table_wa-name = '_OBJECT_ID'.
        query_table_wa-value = 'ENJOYSAP_LOGO'.
        append query_table_wa to query_table.
        call function 'WWW_GET_MIME_OBJECT'
          tables
            query_string        = query_table
            html                = html_table
            mime                = pic_data
          changing
            return_code         = return_code
            content_type        = content_type
            content_length      = content_length
          exceptions
            object_not_found    = 1
            parameter_not_found = 2
            others              = 3.
        if sy-subrc = 0.
          pic_size = content_length.
        endif.
        call function 'DP_CREATE_URL'
          exporting
            type     = 'image'
            subtype  = cndp_sap_tab_unknown
            size     = pic_size
            lifetime = cndp_lifetime_transaction
          tables
            data     = pic_data
          changing
            url      = url
          exceptions
            others   = 1.
    *IMPORT pict_tab = pict_tab FROM DATABASE abtree(pi) ID 'FLIGHTS'.
    *CALL FUNCTION 'DP_CREATE_URL'
    *EXPORTING
    *type = 'IMAGE'
    *subtype = 'GIF'
    *TABLES
    *data = pict_tab
    *CHANGING
    *url = url.
        call method picture->load_picture_from_url
          exporting
            url = url.
        call method picture->set_display_mode
          exporting
            display_mode = picture->display_mode_fit_center.
    *     CALL METHOD cl_gui_cfw=>flush.
      endmethod.                    "fill_picture
      method fill_tree.
        data: node_table type table of abdemonode,
        node type abdemonode.
    *data : it_pa0001 TYPE TABLE OF p0001,
        data :wa_pa0001 type pa0001,
              wa_pa0000 type pa0000,
              it_t582s type table of t582s,
              wa_t582s type t582s.
        types : begin of ttab,
                 itext type t582s-itext,
                 infty type t582s-infty,
                 pernr type p0001-pernr,
                 end of ttab.
        data : itab type table of ttab,
               wa_tab type ttab.
          field-symbols : <fs> like p_pernr.
          data : text1 type c.
        node-hidden = ' '.
        node-disabled = ' '.
        node-isfolder = 'X'.
        node-expander = ' '.
        select * from t582s
                 into corresponding fields of table it_t582s
                 where sprsl = sy-langu
                   and infty in ('0001','0000')."'0002','0006',
    *                         '0008','0015','0019').
        loop at it_t582s into wa_t582s .
          move-corresponding wa_t582s to wa_tab.
          node-node_key = wa_t582s-infty.
          clear node-relatkey.
          clear node-relatship.
          node-text = wa_t582s-itext.
          node-n_image = ' '.
          node-exp_image = ' '.
          append node to node_table.
          loop at p_pernr assigning <fs>.
            wa_tab-pernr = <fs>-low.
            append wa_tab to itab.
            clear p_pernr-low.
            node-node_key = <fs>-low.
            node-relatkey = wa_tab-infty.
            node-relatship = cl_gui_simple_tree=>relat_last_child.
            node-text = <fs>-low.
            node-n_image = '@AV@'.
            append node to node_table.
          endloop.
    *        SELECT SINGLE * FROM pa0001 INTO wa_pa0001 WHERE pernr in p_pernr.
    *     WHEN '0000'.
    *        SELECT SINGLE * FROM pa0000 INTO wa_pa0000 WHERE pernr = p_pernr.
    *    wa_tab-pernr = wa_pa0000-pernr.
    *    endcase.
          clear : wa_tab,wa_pa0001,wa_pa0000.
        endloop.
    *node-hidden = ' '.
    *node-disabled = ' '.
    *node-isfolder = 'X'.
    *node-expander = ' '.
    *LOOP AT itab INTO wa_tab.
    *AT NEW infty.
    *node-node_key = wa_tab-infty.
    *CLEAR node-relatkey.
    *CLEAR node-relatship.
    *node-text = wa_tab-itext.
    *node-n_image = ' '.
    *node-exp_image = ' '.
    *APPEND node TO node_table.
    *ENDAT.
    *AT NEW pernr.
    * node-node_key = wa_tab-pernr.
    *node-relatkey = wa_tab-infty.
    *node-relatship = cl_gui_simple_tree=>relat_last_child.
    *node-text = wa_tab-pernr.
    *node-n_image = '@AV@'.
    *node-exp_image = '@AV@'.
    *ENDAT.
    *APPEND node TO node_table.
    *ENDLOOP.
        call method tree->add_nodes
          exporting
            table_structure_name = 'ABDEMONODE'
            node_table           = node_table.
    *    CALL METHOD cl_gui_cfw=>flush.
      endmethod.                    "fill_tree
    endclass.                    "screen_init IMPLEMENTATION
    *       CLASS screen_handler IMPLEMENTATION
    class screen_handler implementation.
      method constructor.
        create object: html_viewer exporting parent = container,
        list_viewer exporting i_parent = container.
      endmethod.                    "constructor
      method handle_node_double_click.
        data: infty type t582s-infty,
              pernr type pa0001-pernr.
        infty = node_key(4).
        pernr = node_key+4(8).
    *IF pernr IS INITIAL.
    *CALL METHOD: fill_html EXPORTING infty = infty,
    *html_viewer->set_visible EXPORTING visible = 'X',
    *list_viewer->set_visible EXPORTING visible = ' '.
    *ELSE.
        call method: fill_list exporting infty = infty
                                         pernr = pernr,
        list_viewer->set_visible exporting visible = 'X',
        html_viewer->set_visible exporting visible = ' '.
    *ENDIF.
    *    CALL METHOD cl_gui_cfw=>flush.
      endmethod.                    "handle_node_double_click
    *METHOD fill_html.
    *DATA url TYPE scarr-url.
    *SELECT SINGLE url
    *FROM scarr
    *INTO url
    *WHERE infty = infty.
    *CALL METHOD html_viewer->show_url EXPORTING url = url.
    *ENDMETHOD.
      method fill_list.
        data: flight_tab type table of demofli,
        begin of flight_title,
        carrname type scarr-carrname,
        cityfrom type spfli-cityfrom,
        cityto type spfli-cityto,
        end of flight_title,
        list_layout type lvc_s_layo.
    *DATA : it_pa0001 TYPE TABLE OF p0001.
        if infty = '0001'.
          select * from pa0001 into table it_pa0001 where pernr = pernr.
        elseif infty = '0000'.
          select * from pa0001 into table it_pa0001 where pernr = pernr.
        endif.
    *SELECT SINGLE c~carrname p~cityfrom p~cityto
    *INTO CORRESPONDING FIELDS OF flight_title
    *FROM ( scarr AS c
    *INNER JOIN spfli AS p ON c~carrid = p~carrid )
    *WHERE p~carrid = carrid AND
    *p~connid = connid.
    *SELECT fldate seatsmax seatsocc
    *INTO CORRESPONDING FIELDS OF TABLE flight_tab
    *FROM sflight
    *WHERE carrid = carrid AND connid = connid
    *  ORDER BY fldate.
    *CONCATENATE flight_title-carrname
    *connid
    *flight_title-cityfrom
    *flight_title-cityto
        list_layout-grid_title = 'TEST'.
        list_layout-smalltitle = 'X'.
        list_layout-cwidth_opt = 'X'.
        list_layout-no_toolbar = 'X'.
    *if infty = '0001'.
        call method list_viewer->set_table_for_first_display
          exporting
            i_structure_name = 'PA0001'
            is_layout        = list_layout
          changing
            it_outtab        = it_pa0001.
    * CALL METHOD cl_gui_cfw=>flush.
    *ELSEIF infty = '0001'.
    *CALL METHOD list_viewer->set_table_for_first_display
    *EXPORTING i_structure_name = 'PA0000'
    *is_layout = list_layout
    *CHANGING it_outtab = it_pa0000.
    *endif.
      endmethod.                    "fill_list
    endclass.                    "screen_handler IMPLEMENTATION
    start-of-selection.
      data : it_pa0001 type table of p0001.
      call screen 100.
    *  MODULE status_0100 OUTPUT
    module status_0100 output.
      set pf-status 'SCREEN_100'.
      set titlebar 'TIT_100'.
      call method screen_init=>init_screen.
    *   CALL METHOD cl_gui_cfw=>flush.
    endmodule.                    "status_0100 OUTPUT
    *  MODULE cancel INPUT
    module cancel input.
      set screen 0.
      leave program.
    endmodule.                    "cancel INPUT
    Plz Suggest ,
    Regards ,
    Paresh G.

    METHOD fill_tree.
        DATA: node_table TYPE TABLE OF abdemonode,
        node TYPE abdemonode.
    *data : it_pa0001 TYPE TABLE OF p0001,
        DATA :wa_pa0001 TYPE pa0001,
              wa_pa0000 TYPE pa0000,
              it_t582s TYPE TABLE OF t582s,
              wa_t582s TYPE t582s.
        TYPES : BEGIN OF ttab,
                 itext TYPE t582s-itext,
                 infty TYPE t582s-infty,
                 pernr TYPE p0001-pernr,
                 END OF ttab.
        DATA : itab TYPE TABLE OF ttab,
               wa_tab TYPE ttab.
          FIELD-SYMBOLS : <fs> LIKE p_pernr.
          DATA : text1 TYPE c.
        node-hidden = ' '.
        node-disabled = ' '.
        node-isfolder = 'X'.
        node-expander = ' '.
        SELECT * FROM t582s
                 INTO CORRESPONDING FIELDS OF TABLE it_t582s
                 WHERE sprsl = sy-langu
                   AND infty IN ('0001','0000')."'0002','0006',
                            '0008','0015','0019').
        LOOP AT it_t582s INTO wa_t582s .
          MOVE-CORRESPONDING wa_t582s TO wa_tab.
          node-node_key = wa_t582s-infty.
          CLEAR node-relatkey.
          CLEAR node-relatship.
          node-text = wa_t582s-itext.
          node-n_image = ' '.
          node-exp_image = ' '.
          APPEND node TO node_table.
          LOOP AT p_pernr ASSIGNING <fs>.
            wa_tab-pernr = <fs>-low.
            APPEND wa_tab TO itab.
            CLEAR p_pernr-low.
            node-node_key = <fs>-low.
            node-relatkey = wa_tab-infty.
            node-relatship = cl_gui_simple_tree=>relat_last_child.
            node-text = <fs>-low.
            node-n_image = '@AV@'.
            APPEND node TO node_table.
          ENDLOOP.
    CLEAR : wa_tab,wa_pa0001,wa_pa0000.
        ENDLOOP.
    CALL METHOD tree->add_nodes
          EXPORTING
            table_structure_name = 'ABDEMONODE'
            node_table           = node_table.
       CALL METHOD cl_gui_cfw=>flush.
      ENDMETHOD.                    "fill_tree

  • Updating linked fields in a persistent class

    Hi all,
    If a field of a persistent class is updated, what is the best way to update a related field?
    Scenario:
    A persistent class with public GET/SET access to a table field STUFF, and public GET access to a field CATEGORY.
    Whenever SET_STUFF is called from the outside, the class should also re-evaluate and update CATEGORY.
    The easiest is to modify the SET_STUFF method to determine the new category and update it if necessary. However GET/SET methods are always overwritten whenever the class is regenerated, which happens all too easily. Can this be done a bit more elegantly?
    Most modifications can be done by redefinitions of the agent class and do not get overwritten each time the class it regenerated. e.g. I have done something similar by redefining the DB access methods to update various fields, but for my current requirement the update needs to be immediate, not during save.
    Any input appreciated,
    MIke
    Edited by: Mike Pokraka on Sep 15, 2009 4:12 PM

    Hi Naimesh,
    >
    Naimesh Patel wrote:
    > Updating the field CATEGORY immediatly would lead to some problems while working with Persistent class because of the COMMIT WORK. As soon as COMMIT WORK after the CATEGORY's "save" hits, all pending save request would execute and may update some fields which you don't want to update at that point of time.
    No COMMITs should be performed, that's part of what I'm trying to accomplish. STUFF may change several times during the lifetime of the process and CATEGORY must change with it. When the application finally does a COMMIT WORK then both are written to the DB. (In fact my real scenario involves both transient and persistent instances and multiple callers).
    My objectives are to have a readonly attribute in the persistent class that changes in response to other fields changing. It should behave as though the app is calling a SET_STUFF and a SET_CATEGORY, but the persistent class must retain control of the CATEGORY field as several applications can modify STUFF.
    My current workaround is an UPDATE_CATEGORY method that must be implemented by each caller, so it works. Layering another class above it an option but is a bit of overkill which also makes it a workaround.
    I have found that EXT_HANDLER_WRITE_ACCESS seems to provide something, but the comments in there seem to indicate I shouldn't modify the object info. Unfortunately I have run out of time to experiment this week so the workaround will have to stay for now, but I'd still be interested in a more elegant solution.
    Thanks for the input,
    MIke

  • How to set the lifetime properties of a document

    Hi Experts,
    Do somebody know how to set the lifetime attributes "valid from" and "valid to" via java of the lifetime properties?
    Which java class should I use?
    Do somebody have an example for this issue maybe?
    Thanks in advanced!
    Best Regards,
    Markus

    Hi Markus,
    Below is a sample method which i am using for setting expiry date for a KM Doc...
    public void setTimeBasedPublish(IResource resource) throws WcmException {
              IRepositoryServiceFactory repServiceFactory =
                   ResourceFactory.getInstance().getServiceFactory();
              IRepositoryService repositoryService =
                   repServiceFactory.getRepositoryService(
                        resource,
                        IWcmConst.TIMEBASED_PUBLISH_SERVICE);
              ITimebasedPublishServiceManager tpbService =
                   (ITimebasedPublishServiceManager) repositoryService;
              java.util.Date startDate = new java.util.Date();
              java.util.Date endDate = new java.util.Date();
              endDate.setMinutes(
                   startDate.getMinutes()
                        + Integer
                             .valueOf(getproperty("LIFETIME_MINUTES_FOR_LATEST_REPORTS"))
                             .intValue());
              endDate.setDate(
                   startDate.getDate()
                        + Integer
                             .valueOf(getproperty("LIFETIME_DAYS_FOR_LATEST_REPORTS"))
                             .intValue());
              tpbService.saveValidDate(resource, startDate);
              tpbService.saveInvalidDate(resource, endDate);
    Regards
    BP

  • Creating a class in a report (URGENT)

    Hi !!
      Do we create Local/Global classes in real time? or we use standard classes !!
    if so Please mail me a complete real time scenario of a class utilized in report... please
    it should be for resume point of view.
    points will be definitely given
    Thanks a lot in advance
    regards
    babu

    Hi Rambabu,
    We create local / global classesdepending upon the situation. As you seem to be new to abap objects best thing to claim is OO ALV. we use some standard classes here.
    Here is the simple program on oo alv.
    *& Report  ZGS_SIMPLE_ALV
    REPORT  zgs_simple_alv.
    DATA : it_mara TYPE TABLE OF mara.
    DATA : container TYPE REF TO cl_gui_custom_container,
           grid TYPE REF TO cl_gui_alv_grid.
    SELECT * FROM mara INTO TABLE it_mara UP TO 10 ROWS.
    CREATE OBJECT container
       EXPORTING
    *     PARENT                      =
         container_name              =  'CONTAINER'
    *     STYLE                       =
    *     LIFETIME                    = lifetime_default
    *     REPID                       =
    *     DYNNR                       =
    *     NO_AUTODEF_PROGID_DYNNR     =
    *   EXCEPTIONS
    *     CNTL_ERROR                  = 1
    *     CNTL_SYSTEM_ERROR           = 2
    *     CREATE_ERROR                = 3
    *     LIFETIME_ERROR              = 4
    *     LIFETIME_DYNPRO_DYNPRO_LINK = 5
    *     others                      = 6
    IF sy-subrc <> 0.
    *  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CREATE OBJECT grid
      EXPORTING
    *    I_SHELLSTYLE      = 0
    *    I_LIFETIME        =
        i_parent          = container
    *    I_APPL_EVENTS     = space
    *    I_PARENTDBG       =
    *    I_APPLOGPARENT    =
    *    I_GRAPHICSPARENT  =
    *    I_NAME            =
    *    I_FCAT_COMPLETE   = SPACE
    *  EXCEPTIONS
    *    ERROR_CNTL_CREATE = 1
    *    ERROR_CNTL_INIT   = 2
    *    ERROR_CNTL_LINK   = 3
    *    ERROR_DP_CREATE   = 4
    *    others            = 5
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL METHOD grid->set_table_for_first_display
      EXPORTING
    *    I_BUFFER_ACTIVE               =
    *    I_BYPASSING_BUFFER            =
    *    I_CONSISTENCY_CHECK           =
        i_structure_name              = 'MARA'
    *    IS_VARIANT                    =
    *    I_SAVE                        =
    *    I_DEFAULT                     = 'X'
    *    IS_LAYOUT                     =
    *    IS_PRINT                      =
    *    IT_SPECIAL_GROUPS             =
    *    IT_TOOLBAR_EXCLUDING          =
    *    IT_HYPERLINK                  =
    *    IT_ALV_GRAPHICS               =
    *    IT_EXCEPT_QINFO               =
    *    IR_SALV_ADAPTER               =
      CHANGING
        it_outtab                     = it_mara
    *    IT_FIELDCATALOG               =
    *    IT_SORT                       =
    *    IT_FILTER                     =
    *  EXCEPTIONS
    *    INVALID_PARAMETER_COMBINATION = 1
    *    PROGRAM_ERROR                 = 2
    *    TOO_MANY_LINES                = 3
    *    others                        = 4
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL SCREEN 100.
    Pleasse reward points and keep going .. all the best in your trials.
    Thanks & Regards,
    Aleem.

  • I need a tutor in order to pass my class in Java Programming!

    I'm having a lot of trouble keeping up in my online course. Because there is no class room, I find it difficult to ask questions. The time lap between question and answer makes it extra difficult to concentrate and stay focused on the problem. I would really like someone to be my tutor. Corresponde via email so that I can get help quicker and stay on track.
    I'm suppose to write an array in order to keep inventory. I have no idea where to even start. Here is the assignment, if you can help me and point me in the right direction, or show an example of codes I can use, it would be greatly appreciated.
    1) Create a product class that holds the item number, the name of the product, the number of unites in stock, and the price of each unit.
    Item # 1, Red Hanging Candle Holder, 24, $12.00
    Item # 2, Blue Hanging Candle Holder, 24, $12.00
    Item # 3, Green Hanging Candle Holder, 24, $12.00
    Item # 4, Yellow Hanging Candle Holder, 24, $12.00
    2) Create a Java application that displays the product number, the name of the product, the number of units in stock, the price of each unit, and the value of the inventory (the number of units in stock multiplied by the price of each unit).

    God bless, Darryl. My time is more valuable to me.
    Maybe this arrangement works because you need the
    instruction as much as the OP does. The only
    question is: who will provide it? If neither person
    knows more than a month's worth of Java, how is new
    information brought in?
    Thanks duffymo for your blessing. As programming is just a hobby for me -- since 1983 -- I agree that my time is (much much) less valuable than yours. And yes, I expect the learning process to be mutually beneficial. And while I don't plan to make my living off java, I believe in doing things correctly or not at all. My one month experience in Java is backed up by programming in more languages than most professionals use in a lifetime, on platforms starting from pre-DOS systems with CTDs and a single-line display through DOS, xenix, PDP-11, MicroVAX and every version of Windows from 95 onwards.
    In any case, don't you think it would help if the simplest of questions were kept off these forums and solved in mutual self-help groups? some of whose members had nore time than others to spend on Googling and searching the forums? The first benefit would be to those who have progressed beyond the obvious, as you seniors would have more time to answer their pleas for help instead of getting bogged down in badly or unformatted code with all the trappings of cut-n-paste, meaningless comments that seem to be intended more for the teachers than the learners -- I could go on and on.
    I apologise for what I'm about to do; I do really agree with the general feeling on the forums that OPs benefit much more from being guided towards their goal than from being spoonfed a code that works. But I would really appreciate your critique of this code, which is my first console application. It took about half an hour, including Googling. I am aware that there are absolutely no comments, and the output columns don't line up, due to my as yet inadequate knowledge of output formatting. Anything else you can point out would help me in my learning process.
    Thanks for your time, Darryl
    File Inventory.javapublic class Inventory
        public static void main (String args [])
            int[] itemNumbers   = { 1,
                                    2,
                                    3,
                                    4
            String[] itemNames  = { "Red Hanging Candle Holder",
                                    "Blue Hanging Candle Holder",
                                    "Green Hanging Candle Holder",
                                    "Yellow Hanging Candle Holder"
            int[] unitsInStocks = { 24,
                                    24,
                                    24,
                                    24
            double[] unitPrices = { 12.0,
                                    12.0,
                                    12.0,
                                    12.0
            Product[] products = new Product[4];
            for ( int i = 0; i < products.length; i++)
                products[i] = new Product(itemNumbers,
    itemNames[i],
    unitsInStocks[i],
    unitPrices[i]);
    double productValue = 0.0;
    double totalValue = 0.0;
    System.out.println("Item #\t" +
    "Name\t" +
    "Units in stock\t" +
    "Unit price\t" +
    "Total Cost");
    for ( int i = 0; i < products.length; i++)
    productValue = products[i].get_productValue();
    totalValue = totalValue + productValue;
    System.out.println(products[i].get_productDetails() + "\t" +
    Double.toString(productValue));
    System.out.println("");
    System.out.println("\t" +
    "\t" +
    "\t" +
    "Grand Total\t" +
    Double.toString(totalValue));
    File Product.javapublic class Product {
        private int itemNumber;
        private String itemName;
        private int unitsInStock;
        private double unitPrice;
        private Product()
        public Product(int    itemNumberIn,
                       String itemNameIn,
                       int    unitsInStockIn,
                       double unitPriceIn)
            itemNumber   = itemNumberIn;
            itemName     = itemNameIn;
            unitsInStock = unitsInStockIn;
            unitPrice    = unitPriceIn;
        public double get_productValue()
            double unitValue = (double) unitsInStock * unitPrice;
            return unitValue;
        public String get_productDetails()
            String productDetails = Integer.toString(itemNumber) + "\t" +
                                    itemName + "\t" +
                                    Integer.toString(unitsInStock) + "\t" +
                                    Double.toString(unitPrice);
            return productDetails;
    }The forum software seems to have reduced my indentation by 1 space in many lines, they line up correctly in Notepad.
    Message was edited by:
    Darryl.Burke

  • ALV with classes for selected fields

    Hi ALL,
            Please can anybody will give the example code for
    <b>ALV with classes for selected fields</b> from database table .

    Hi,
    *& Report  YR_TANS_ALVTEST                                             *
    REPORT  yr_tans_alvtest                         .
    INCLUDE ya_yr_tans_alvtest_top.
    TABLES yttans_test.
    DATA itab LIKE yttans_test OCCURS 0.
    DATA gr_alvgrid TYPE REF TO cl_gui_alv_grid .
    DATA gc_custom_control_name TYPE scrfname.
    gc_custom_control_name = 'CC_ALV'.
    DATA gr_ccontainer TYPE REF TO cl_gui_custom_container .
    DATA gt_fieldcat TYPE lvc_t_fcat .
    DATA gs_layout TYPE lvc_s_layo .
    data wa_itab like line of itab.
    TYPES : BEGIN OF ty_help,
              roll_no LIKE yttans_test-roll_no,
              name LIKE yttans_test-name,
            END OF ty_help.
    DATA: git_returntab TYPE TABLE OF ddshretval INITIAL SIZE 0.
          CLASS lcl_event_handler DEFINITION
    CLASS lcl_event_handler DEFINITION .
      PUBLIC SECTION .
        METHODS:
    handle_double_click FOR EVENT double_click OF cl_gui_alv_grid IMPORTING
        e_row e_column es_row_no.
      PRIVATE SECTION.
    ENDCLASS.                    "lcl_event_handler DEFINITION
    DATA gr_event_handler TYPE REF TO lcl_event_handler .
    *&      Form  handle_double_click
          text
         -->I_ROW      text
         -->I_COLUMN   text
         -->IS_ROW_NO  text
    FORM handle_double_click USING i_row TYPE lvc_s_row i_column TYPE
    lvc_s_col is_row_no TYPE lvc_s_roid.
    leave to list-processing.
    read table itab index is_row_no-row_id into wa_itab.
    write:/ 'Roll no: ', wa_itab-roll_no, /'Name: ', wa_itab-name,
    /'Marks: ', wa_itab-marks.
    LEAVE SCREEN.
    ENDFORM .                    "handle_double_click
          CLASS lcl_event_handler IMPLEMENTATION
    CLASS lcl_event_handler IMPLEMENTATION .
    *--Handle Double Click
      METHOD handle_double_click .
        PERFORM handle_double_click USING e_row e_column es_row_no .
      ENDMETHOD .                    "lcl_event_handler
    ENDCLASS .                    "lcl_event_handler IMPLEMENTATION
    SELECT-OPTIONS roll FOR yttans_test-roll_no .
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR roll-low.
      DATA: lit_help TYPE TABLE OF ty_help.
      DATA: wa_returntab LIKE LINE OF git_returntab.
      SELECT roll_no name INTO TABLE lit_help FROM yttans_test.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'ROLL_NO'
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          dynprofield     = 'roll-low'
          value_org       = 'S'
        TABLES
          value_tab       = lit_help
          return_tab      = git_returntab
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      READ TABLE git_returntab INTO wa_returntab INDEX 1.
      roll-low = wa_returntab-fieldval.
    AT SELECTION-SCREEN.
      SELECT * FROM yttans_test INTO TABLE itab WHERE roll_no IN roll.
    START-OF-SELECTION.
      CREATE OBJECT gr_event_handler .
      CALL SCREEN '9000'.
    *&      Module  STATUS_9000  OUTPUT
          text
    MODULE status_9000 OUTPUT.
      SET PF-STATUS 'STATUS_9000'.
      SET TITLEBAR 'TITLE_9000'.
    ENDMODULE.                 " STATUS_9000  OUTPUT
    *&      Module  USER_COMMAND_9000  INPUT
          text
    MODULE user_command_9000 INPUT.
      DATA: ok_code TYPE sy-ucomm,
            save_ok TYPE sy-ucomm.
      save_ok = ok_code.
      CLEAR ok_code.
      CASE save_ok.
        WHEN 'BACK' OR '%EX' OR 'RW'.
          CALL METHOD gr_ccontainer->free.
         CALL METHOD cl_gui_cfw=>flush.
          LEAVE TO SCREEN 0.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_9000  INPUT
    *&      Module  alv_display_9000  OUTPUT
          text
    MODULE alv_display_9000 OUTPUT.
      PERFORM display_alv .
    ENDMODULE.                 " alv_display_9000  OUTPUT
    *&      Form  display_alv
          text
    FORM display_alv .
      IF gr_alvgrid IS INITIAL .
        CREATE OBJECT gr_ccontainer
          EXPORTING
       PARENT                      =
            container_name              = gc_custom_control_name
       STYLE                       =
       LIFETIME                    = lifetime_default
       REPID                       =
       DYNNR                       =
       NO_AUTODEF_PROGID_DYNNR     =
          EXCEPTIONS
            cntl_error                  = 1
            cntl_system_error           = 2
            create_error                = 3
            lifetime_error              = 4
            lifetime_dynpro_dynpro_link = 5
            OTHERS                      = 6
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        CREATE OBJECT gr_alvgrid
          EXPORTING
       I_SHELLSTYLE      = 0
       I_LIFETIME        =
            i_parent          = gr_ccontainer
       I_APPL_EVENTS     = space
       I_PARENTDBG       =
       I_APPLOGPARENT    =
       I_GRAPHICSPARENT  =
       I_NAME            =
          EXCEPTIONS
            error_cntl_create = 1
            error_cntl_init   = 2
            error_cntl_link   = 3
            error_dp_create   = 4
            OTHERS            = 5
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        SET HANDLER gr_event_handler->handle_double_click FOR gr_alvgrid .
        PERFORM prepare_field_catalog CHANGING gt_fieldcat .
        PERFORM prepare_layout CHANGING gs_layout .
        CALL METHOD gr_alvgrid->set_table_for_first_display
          EXPORTING
       I_BUFFER_ACTIVE               =
       I_BYPASSING_BUFFER            =
       I_CONSISTENCY_CHECK           =
       I_STRUCTURE_NAME              =
       IS_VARIANT                    =
       I_SAVE                        =
       I_DEFAULT                     = 'X'
             is_layout                     = gs_layout
       IS_PRINT                      =
       IT_SPECIAL_GROUPS             =
       IT_TOOLBAR_EXCLUDING          =
       IT_HYPERLINK                  =
       IT_ALV_GRAPHICS               =
       IT_EXCEPT_QINFO               =
          CHANGING
            it_outtab                     = itab[]
            it_fieldcatalog               = gt_fieldcat
       IT_SORT                       =
       IT_FILTER                     =
          EXCEPTIONS
            invalid_parameter_combination = 1
            program_error                 = 2
            too_many_lines                = 3
            OTHERS                        = 4
        IF sy-subrc <> 0.
          LEAVE TO LIST-PROCESSING.
          WRITE 'error'.
        ENDIF.
      ELSE.
        CALL METHOD gr_alvgrid->refresh_table_display
    EXPORTING
       IS_STABLE      =
       I_SOFT_REFRESH =
          EXCEPTIONS
            finished       = 1
            OTHERS         = 2
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDIF.
    ENDFORM.                    "display_alv
    *&      Form  prepare_field_catalog
          text
         <--P_GT_FIELDCAT  text
    FORM prepare_field_catalog  CHANGING p_gt_fieldcat TYPE lvc_t_fcat .
      DATA ls_fcat TYPE lvc_s_fcat .
      ls_fcat-fieldname = 'ROLL_NO'.
      ls_fcat-coltext = 'ROLL No.'.
      APPEND ls_fcat TO p_gt_fieldcat.
      ls_fcat-fieldname = 'NAME'.
      ls_fcat-coltext = 'NAME'.
      APPEND ls_fcat TO p_gt_fieldcat.
      ls_fcat-fieldname = 'MARKS'.
      ls_fcat-coltext = 'MARKS'.
      APPEND ls_fcat TO p_gt_fieldcat.
    ENDFORM.                    " prepare_field_catalog
    *&      Form  prepare_layout
          text
         <--P_GS_LAYOUT  text
    FORM prepare_layout  CHANGING ps_layout TYPE lvc_s_layo.
      ps_layout-zebra = 'X' .
      ps_layout-grid_title = 'Students Details'.
      ps_layout-smalltitle = 'X' .
    ENDFORM.                    " prepare_layout
    Regards,
    Tanveer.
    Mark helpful answers
    Message was edited by: Tanveer Shaikh

  • How to use protected method of a class in application

    Hi,
      will u please tell me how to use protected method of class in application. (class:cl_gui_textcontrol, method:limit_text)
    Thanks in advance,
    Praba.

    Hi Prabha,
    You can set the maximum number of characters in a textedit control in the CREATE OBJECT statement itself.
    Just see the first parameter in the method . I mean MAX_NUMBER_CHARS. Just set that value to the required number.
    Eg:
    data: edit type ref to CL_GUI_TEXTEDIT.
    create object edit
      exporting
        MAX_NUMBER_CHARS       = 10
       STYLE                  = 0
       WORDWRAP_MODE          = WORDWRAP_AT_WINDOWBORDER
       WORDWRAP_POSITION      = -1
       WORDWRAP_TO_LINEBREAK_MODE = FALSE
       FILEDROP_MODE          = DROPFILE_EVENT_OFF
        parent                 = OBJ_CUSTOM_CONTAINER
       LIFETIME               =
       NAME                   =
      EXCEPTIONS
        ERROR_CNTL_CREATE      = 1
        ERROR_CNTL_INIT        = 2
        ERROR_CNTL_LINK        = 3
        ERROR_DP_CREATE        = 4
        GUI_TYPE_NOT_SUPPORTED = 5
        others                 = 6
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    In this case, the max: number of characters will be set to 10.
    I hope your query is solved.
    Regards,
    SP.

  • Inner Classes - when to use with Swing?

    Hi again,
    I was creating a GUI with JTabbedPane as content pane, while doing the single panes in the different tabs i started wondering about some design issues.
    Let�s say you have a pane that is composed of 3 "subpanes" ( containing all the interaction components ). Should i write "normal" classes for each of the subpanes or is it more reasonable to define them as inner classes of the "main" panel - that�s at least what i thought because those 3 smaller panels are bound to the main panel for their lifetime...
    Any design tips about inner classes and swing or even inner classes in general, i�d really appreciate.
    Thx

    The concept of inner classes design in java is (I hope) they provide 'composite aggregation' relation with the contained class.
    Means that the (inner) class cannot exists alone and provide functionalities like other classes. Inner classes refer to the "contains" relationship in the UML.
    The other regular associations say, having a value oject model to an UI are Structural Aggregation, means that the value object can be used in the UI and also separately.
    For your case the inner classes are not suitable. You may have to find a suitable mechanism to get the individual tab panes. Probably use an interface to bridge the three tab panes and use an manager class, pass and id to the manager class and get the required Tabbed pane.
    Thanks,
    ananth
    Hi again,
    I was creating a GUI with JTabbedPane as content pane,
    while doing the single panes in the different tabs i
    started wondering about some design issues.
    Let�s say you have a pane that is composed of 3
    "subpanes" ( containing all the interaction components
    ). Should i write "normal" classes for each of the
    subpanes or is it more reasonable to define them as
    inner classes of the "main" panel - that�s at least
    what i thought because those 3 smaller panels are
    bound to the main panel for their lifetime...
    Any design tips about inner classes and swing or even
    inner classes in general, i�d really appreciate.
    Thx

  • Request.setAttribute between classes

    Hi I'm trying to keep a userid from a class call ActionLogin to then use it to select products bought by that user
    request.setAttribute("userid", login);Then I realize that userid isn't keeping anything when I'm tryin got access it with
    request.getParameter("userid") or
    request.getAttribute("userid") I just get a null string when I do this from another class or that same class.. am I supposed to use something else?

    Attributes which are set in the ServletRequest have a lifetime of one request. In your case, rather use session instead.
    And there is a certain difference between parameters and attributes.

Maybe you are looking for

  • Moved to a new computer, and can't load iCal events

    Hi all, I just bought a new computer and used Migration Assistant to move over all of the files, which included my iCal database. I no longer have the other computer, but I do have a backup of my user account folder from the old computer (including t

  • Popularity trends for a document always shows zero

    Hello Friends, When I select a document in a library, and I select Popularity trends from the activated ribbon for that library, in the excel report I see zero always, even though I worked on that particular document so many times. I would like to ha

  • Can anybody send me some docs on ESS/MSS and Adobe Forms.

    Hi all, Can anybody please send me some doc/materials/link on how to coonfigure/develop/work with ESS/MSS and Adobe forms. Its very urgent requirement. Thanks n Regards A.M.Rao

  • What type of control is this?

    Hi, I'm new to OS X Development. I'm trying to find out how to create a particular control, as displayed in this image.. http://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/A ppleHIGuidelines/art/ct_ellipsisinpushbutton.jpg

  • What does the GB mean?

    I am not familiar with iPods and the like but I would like to purchase one as a gift, and I have a question. Is there any difference between the 8GB, 32GB and 64GB iPods apart from how many things you can save to it? Does getting more compromise anyt