How to find out which object has a specific attribute value

Hi all,
which is the easiest way to check in a collection of objects which object has an attribute with a specific value?
i.e. I have n objects of classA and they all have an attribute "String value;".
How can I check which object has that attribute set to "myvalue"?
Thanks,
A.

hi,
i don't know if this would be the best way to do it, but i would add all the instances of the objects to a hashtable with the key as the attribute with which you want to search them. You would then retrieve the object using the value.
Cath

Similar Messages

  • How to find out which node has a specific word in xml query

    hi
    I have to query xml file. My xml file has items like this.
    <item>
      <product_code>SVUF2640</product_code>
      <site_name />
      <group>XDC</group>
      <description>towerxxx1 aaaa</description>
      <vf_no>44000077777</vf_no>
      <serial_no />
      <vendor>AAA</vendor>
      </item>
    <item>
      <product_code>SXXX</product_code>
      <site_name />
      <group>SXS</group>
      <description>xx1</description>
      <vf_no>4xxx7777</vf_no>
      <serial_no />
      <vendor>BBA</vendor>
      </item>I want to get item node which has a "tower" word in description tag. I'm looking something "like" word in sql. Thanks in advace.

    XPath has a contains() function.

  • How to find out which objects are at the end of the datafiles

    My Scenario is having a tablespace of 65G but the data is 5G and that is at the end of datafile for that we are not able to resize the datafile our though is to find out what are the objects at that end of datafiles and will either alter move <owner.tablename> move or alter index <owner.index> rebuld online.
    For that how to find out which objects are at the end of the datafiles.

    >
    My Scenario is having a tablespace of 65G but the data is 5G and that is at the end of datafile for that we are not able to resize the datafile our though is to find out what are the objects at that end of datafiles and will either alter move <owner.tablename> move or alter index <owner.index> rebuld online.
    For that how to find out which objects are at the end of the datafiles.
    >
    You may want to copy this and add it to your toolkit
    See 'What's at the End of the File?' in this Tom Kyte article from the Sept 2004 Oracle Magazine
    http://www.oracle.com/technetwork/issue-archive/o54asktom-086284.html
    And this AskTom blog shows you how to generate a script containing ALTER statements toresize your datafiles to the smallest possible. You can 'pick and choose' from the ALTER statements to do what you want.
    Then of course, you can use techniques from this article by Oracle ACE, and noted author, Jonathan Lewis
    http://jonathanlewis.wordpress.com/2010/02/06/shrink-tablespace/

  • How to find out which user has the permission to execute startsap ?

    Hi All
    How do I find out which user has the permission to execute the startsap and stopsap? Do I control the permission on those script using windows standard authorization? For example: only allow certain user have the read and write permission?
    Thank you.!
    Vincent Lo

    Well to me this is really weird question..
    <b>noone un-authorized should have access to OS on your system</b>
    If this is valid you do not need to solve problems who can and who cannot start/stop SAP, because if you want to prevent some users from shutting down the SAP you have really hard job to do - there are many ways how to kill the SAP (for example killing relevant process from task manager, killing of database, messing with services etc.) - yes, this is harmful way of stopping SAP, but we are talking about attack, right? I would contact some Windows specialist to help you disable all the ways how to harm the running SAP. But still after that - there are many files that can be modified/deleted so SAP will crash after restart - you need to protect them too, etc.
    In case you take the first assumption as granted (and you really limit access to this server) you do not need to worry who can stop or start SAP - at the other hand it may be handy to be able to start/stop SAP from other users - for this you can run the stop/start script "under different user".
    But to answer the question - to me this is question just of access control (but really never tried that myself):
    <a href="http://technet2.microsoft.com/WindowsServer/en/library/c6413717-511e-42bd-bd81-82431afe4b2a1033.mspx">Permit or restrict access to a snap-in for a domain</a> (or see other related links down there on this page)
    Please award points for useful answers.
    Thanks

  • ADF: How to find out which query has taken what time?

    Hi,
    I have an ADF application which has many SQL queried running on each button click/page load, so how to find out which query is taking what amount of time? So that i can identify the long running queries and modify them to improve the application performance.
    Thanks in advance.

    Hi,
    As suggested by Timo,you need to start tracing on oracle.jbo package for getting the SQL queries.But I think the second option suggested by him would be better.You will have to override executeQueryForCollection method in VO Impl class .Pseudo code would be
    @Override
    Take start time
    super.executeQueryForCollection
    Take end time

  • How to find out which object on a JPanel was clicked...

    I have a JPanel that contains about 200 other small JPanels(only 8 are visible at any one time), and a JButton(with Visible set to false).
    When one of the small JPanels is rightclicked i want to know which one was clicked so I can add the JButton to it (set theJButton Visible on the JPanel that was rightclicked). When the JButton is clicked, it will hide the JPanel it was on and hide itself again.
    I added a MouseListener(MousePressed) to the main Jpanel but I dont know how to find out which of the smaller JPanels was clicked. I would Also need to know how (in the ActionEvent for the JButton) the JButton knows which JPanel it is on so it knows which one to delete.
    ------------------------------------------------------------------CODE
    void JPanel1_mousePressed(MouseEvent e) {
    if ((e.getModifiers() & e.BUTTON3_MASK)!=0){
    ------------------------------------------------------------------CODE
    void JButton1_actionPerformed(ActionEvent e) {
    ------------------------------------------------------------------CODE
    Can this be done or should I add a MousePressed Listener to each of the 200 small JPanels and create a JButton for each of them??
    Any Info Appreciated... Thanks....

    Here you get a hint, hope have added all mouseListener as well and registered....addMouseLi...etc
    // many JPanels here...
    JPanel clickedPanel;  // a reference only
    // In mouse Click..
    public void mouseClicked( MouseEvent e ){
              clickedPanel = e.getSource( );
              clickedPanel.add(new JButton("Look, I am Added") );
    }  // it is Only HINT, a working HINT

  • How to find out which page contains a specific ITextFrame

    Hi all,<br /><br />I would like to ask if it is possible to find out which page contains a specific text frame?<br /><br />I used the following code to find the ITextFrame that contains the caret<br />ISelectionManager* mgr = activeContext->GetContextSelection();<br />InterfacePtr<ITextEditSuite> esuite(mgr, UseDefaultIID());<br />InterfacePtr<ITextTrackerAccess> tracker(esuite, UseDefaultIID());<br />ITextFocus* focus = tracker->QueryTextFocus();<br />ITextModel* model = focus->QueryTextModel();<br />IFrameList* flist = model->QueryFrameList();<br />RangeData range = textFocus->GetCurrentRange();<br />TextIndex cposition = range.Start(0);<br />int32 fidx;<br />ITextFrame* frm = flist->QueryFrameContaining(cposition, &fidx);<br />UIDRef frmUIDRef = ::GetUIDRef(frm);<br /><br />However, when I use the following code to iterate through the pages, I cannot find any UID that matches the ITextFrame<br />for (int32 sIdx = 0; sIdx < spreadList->GetSpreadCount(); sIdx++) {<br />  UIDRef spreadUIDRef(database, spreadList->GetNthSpreadUID(sIdx));<br />  InterfacePtr<ISpread> spread(spreadUIDRef, UseDefaultIID());<br />  for (int32 pIdx = 0; pIdx < spread->GetNumPages(); pIdx++) {<br />    spread->GetItemsOnPage(pageIndex, &uidList);<br />    if (uidList.Contains(frmUIDRef.GetUID()) == kTrue) {<br />      ...<br />    }<br />  }<br />}<br /><br />Any help is appreciate. Thank you.<br /><br />Ikki

    I think your frmUIDRef is too far down the hierarchy to show up in GetItemsOnPage(). Try getting the IHierarchy interface from frmUIDRef and calling QueryParent(). That should get you from the kFrameItemBoss to the kMultiColumnItemBoss. Do the same again and you'll get to the kSplineItemBoss, which should appear in GetItemsOnPage().
    If you're running the debug version of InDesign, you can use the Test menu to run the Diagnostics > Document Structure > Trace Content Hierarchy command, which will print out the UIDs of all the items on a page and let you see what's happening.
    Charles

  • How to find out WHICH object throws an Event

    Hi, javaWorld
    I want to change f.e. the backkground-Colour of a Checkbox, when it has Focus. So in "myEventhandler"
    ( to which all my Checkboxes are "added") I can find out, that a Checkbox got focus
    public void focusGained(java.awt.event.FocusEvent e) {
              if (e.getSource() instanceof java.awt.Checkbox) {
         /* this does not work :          java.awt.Checkbox box = e.getSource();
         box.setbackground(java.awt.Color.pink);
    So I know,that a checkbox is involved, but how can I find out, which one it is ?
    Thanks for reading and helping
    Hanns

    You're right. You must cast your class so the compiler could recognize the method. You must type something like this:
    public void focusGained(FocusEvent fe) {
    if (fe.getSource() instanceof Component)
    ((Component)fe.getSource()).setBackground(new Color(255, 0, 0));
    public void focusLost(FocusEvent fe) {
    if (fe.getSource() instanceof Component)
    ((Component)fe.getSource()).setBackground(new Color(255, 255, 255));

  • How to find out which vendor has PO text

    I would like to pull out info about vendors and need to know which vendor has PO text, without of course having to check them one by one.
    is there any way i can see that? tables? text id??
    thanks
    Alisa

    Go to SE75 and Select EKKO or EKPO
    and Double click the EKKO or EKPO and Note the Text id..
    Then go to SE16 > STXH and enter Text ID..
    then execute , you will see the PO numbers for which the text id is maintained in 'Text Name' Column
    From EKKO table you can find the Vendor for the above PO's.

  • How to find out which GR has been invoiced?

    Hello,
    I am working on one scenario in which I am making a sales order through which automatic Purchase order is getting generated. I am doing a MIGO(GR) for lesser quantity on this PO. lets say I am creating 4 GRs of 10 quantity for a PO of 50. Now, I am making direct invoice for this through VF01 with reference to sales order. An invoice of 40 will be created.
    Now, I am doing creating one more GR of 10 for the rest of the amount. I have 5 GR's now.
    How can I get to know which GR has been invoiced (table relation) and which is yet to be invoiced?

    Amrish,
    RSEG is the "Document Item: Incoming Invoice" table. In this table, Look for the field LFBNR , LFGJA, LFPOS.
    LFBNR - Refernced GR Number
    LFGJA - Year
    LFPOS - Ref Doc Item
    Hope this helps
    Vinodh Balakrishnan

  • How to find out which user has locked a particular record of a table

    Hi
    Is it possible to know - which user has locked a particular record (I know the primary key of the record) of a table
    Regards

    select     OS_USER_NAME os_user,
         PROCESS os_pid,
         ORACLE_USERNAME oracle_user,
         l.SID oracle_id,
         decode(TYPE,
              'MR', 'Media Recovery',
              'RT', 'Redo Thread',
              'UN', 'User Name',
              'TX', 'Transaction',
              'TM', 'DML',
              'UL', 'PL/SQL User Lock',
              'DX', 'Distributed Xaction',
              'CF', 'Control File',
              'IS', 'Instance State',
              'FS', 'File Set',
              'IR', 'Instance Recovery',
              'ST', 'Disk Space Transaction',
              'TS', 'Temp Segment',
              'IV', 'Library Cache Invalidation',
              'LS', 'Log Start or Switch',
              'RW', 'Row Wait',
              'SQ', 'Sequence Number',
              'TE', 'Extend Table',
              'TT', 'Temp Table', type) lock_type,
         decode(LMODE,
              0, 'None',
              1, 'Null',
              2, 'Row-S (SS)',
              3, 'Row-X (SX)',
              4, 'Share',
              5, 'S/Row-X (SSX)',
              6, 'Exclusive', lmode) lock_held,
         decode(REQUEST,
              0, 'None',
              1, 'Null',
              2, 'Row-S (SS)',
              3, 'Row-X (SX)',
              4, 'Share',
              5, 'S/Row-X (SSX)',
              6, 'Exclusive', request) lock_requested,
         decode(BLOCK,
              0, 'Not Blocking',
              1, 'Blocking',
              2, 'Global', block) status,
         OWNER,
         OBJECT_NAME
    from     v$locked_object lo,
         dba_objects do,
         v$lock l
    where      lo.OBJECT_ID = do.OBJECT_ID
    AND l.SID = lo.SESSION_ID
    hope this helps
    Zekeriya

  • How to find out which plugin is missing ( embed width="100%" height="100%" messagecallback="parent.frames.MANIPULATIONS.AppendMessage" spinfps="15" spiny="30")?

    How to find out which plugin is missing fro mthe website: http://web.it.nctu.edu.tw/~twli/interactive/scr_tutf.htm?
    After looking at one similar question found in mozilla support and answered by jscher2000 (https://support.mozilla.org/en-US/questions/957655), I have found out I have to look for either &lt;object or &lt;embed. What I found is : &lt;embed width="100%" height="100%" messagecallback="parent.frames.MANIPULATIONS.AppendMessage" spinfps="15" spiny="30"
    What do I have to do now?

    This big1.mol (and possibly big2.mol) file is loaded in the embed plugin object that is opened in a iframe, so you can right-click the plugin area to check the embed code.
    *http://web.it.nctu.edu.tw/%7Etwli/interactive/big1.mol
    *http://web.it.nctu.edu.tw/%7Etwli/interactive/big2.mol

  • How to find out Which SAP programs are affecting Which Z programs?

    Do we have a program/tool that can tell us the following:
    How to find out Which SAP programs are affecting Which Z programs in the entire development server?  
    We have a list of SAP programs and a list of custom u2018zu2019 programs, which ones impact each other?   I know we have a u201Cwhere usedu201D functionality, however that is at the object by object level. 
    We need are looking for something a little larger u2013
    thanks in advance
    Vishnu

    Do we have a program/tool that can tell us the following:
    How to find out Which SAP programs are affecting Which Z programs in the entire development server?  
    We have a list of SAP programs and a list of custom u2018zu2019 programs, which ones impact each other?   I know we have a u201Cwhere usedu201D functionality, however that is at the object by object level. 
    We need are looking for something a little larger u2013
    thanks in advance
    Vishnu

  • How to find out the object and tables that belong to it

    Do you know how to find out which tables belong to which object in trans. BD66, I have a CABN table but i donot the object name so how i can find out that??

    Hi,
    Wht object u r taking about .if it's a transport object,
    Go to Utilities -> Versions -> Version Mgt ->
    The latest one which is active, is the one u have to transport .
    Rgds ,
    J
    Do Award pts by cliking the left-hand side of this info.

  • How to find out which lists are using email enabled feature in my SP 2010? Any script? Anything else?

    Hi there,
    How to find out which lists are email enabled in my SP 2010?
    Any script? Anything else?
    Thank you.

    Hi frob,
    check this script that is stated on this link
    $SPwebApp = Get-SPWebApplication "http://migration.Company.com"
    <# If it is MOSS 2007, You can use:
    $SPWebApp = [Microsoft.SharePoint.Administration.SPWebApplication]::Lookup(http://sharepoint.com)
    To get SPWebApplication Object
    #>
    #create a CSV file
    "E-Mail,List,Site" > "EMail-Enabled.txt" #Write the Headers in to a text file
    foreach ($SPsite in $SPwebApp.Sites) # get the collection of site collections
    foreach($SPweb in $SPsite.AllWebs) # get the collection of sub sites
    foreach ($SPList list in $SPweb.Lists)
    if ( ($splist.CanReceiveEmail) -and ($SPlist.EmailAlias) )
    # WRITE-HOST "E-Mail -" $SPList.EmailAlias "is configured for the list "$SPlist.Title "in "$SPweb.Url
    $SPList.EmailAlias + "," + $SPlist.Title +"," + $SPweb.Url >> EMail-Enabled.txt #append the data
    http://www.sharepointdiary.com/2011/06/find-all-incoming-email-enabled-lists.html
    Kind Regards, John Naguib Technical Consultant/Architect MCITP, MCPD, MCTS, MCT, TOGAF 9 Foundation. Please remember to mark the reply as answer if it helps.

Maybe you are looking for

  • I want to buy a 13" Mac, but I have already a 7200 rpm HD, what can I do??

    First of all, I want to ask some apologize for my english, but I'm italian, so... Now, this is the matter: I'd like to buy a Macbook, or a Macbook pro, the 13" version of both, but I read in the specification page that I can order a 7200 rpm HD only

  • Numbers switches sheets when I select cell.

    I've have a problem with Numbers '08, ver 1.0.3 that has persisted across the last two OSX upgrades.  I have a multi-sheet file, and when I select a sheet using the Sheets sidebar, it changes to the selected sheet without a problem.  But when I click

  • Invoice idoc cannot be processed

    Hi All, i hope you can help me out with this. The problem is that we cannot process an invoice idoc because the condition type is not allowed on the idoc. Can you please explain to me why idoc do not allow this condition type? This only happening in

  • IPhoto '11 Event Discrepancies

    I have been having issues with my iPhoto app as a result of moving my pictures from the hard drive to an external.  I had to re-import most of my pictures.  When I was almost done, iPhoto crashed (which it has done twice in less than 24hrs).  When I

  • Beginner in SDK Programming

    Hi,   I am a fresher in SDK-Programming. I want to know the initial steps for programming in SDK. How to set the project references and all. I am using VB editor. Regards, Muni