How to find and delete matching row in ADF BC

Hi,
I have a table with simple fields and I have created the java class for this entity also
Person
     - Person_Id (PK)
     - Person_NameI wanted to create an application module method to search for the entity that matches certain name
but I cant find the code to do this.
public class AppModuleImpl{
  public boolean deletePersonByName(String personName)
    EntityDefImpl personDef = PersonImpl.getDefinitionObject();
    //How to get all rows and find the matching name then delete the row
    return false;
}Thanks
Jdev 11.1.1.5

Ramandeep Nanda wrote:
getfilteredRows does that, you can iterate and delete the rows after filtering on any attribute in view object it does not have to be a primary key.Hi Ramandeep,
I got the idea and I somehow was able to do what I want.
  public boolean deletePersonByName(String personName)
    PersonViewImpl personView = this.getPersonView();
    Row[] matchingRows = personView.getFilteredRows("PersonName", personName);
    if(matchingRows!=null)
      for(Row rowTemp : matchingRows)
        PersonViewRowImpl personRow = (PersonViewRowImpl) rowTemp;
        personRow.remove();
        try
          getDBTransaction().commit();
        }catch(JboException ex)
          throw ex;
    return true;
  }But somehow I got this idea, supposed I have this data
PersonId          PersonName
1               MANDER
2               MANDERRY
3               JERRYThe code getFilteredRows somehow only perform an 'exact' match but what if I want to delete both of the data
with PersonName 'MANDER' above.
My current code only removes the person with name 'MANDER' and not the 'MANDERRY'
Thanks

Similar Messages

  • How to find and delete duplicate photos in photo app

    how to find and delete duplicate photos in photo app

    Photos has no built-in tools to screen the library for duplicates. It relies on the warning on import, that should prevent you from importing duplicates.
    Once duplicate shave been imported, delete them manually, or use third-party tools.
    For example, these new apps claim to work with Photos:
    Power photos:  Fat Cat Software
    Duplicate annihilator: Brattoo Propaganda Software - Products
    PhotoSweeper: http://overmacs.com/photosweeper.html

  • How to Find and delete Duplicated Files

    When i bought my iMac 18 months ago, most of the files from my old G5 where transfer in this iMac.
    Also, at this time, the G5 was connect in target mode to the iMac and I was copying files to my iMac when ever a files was needed.
    I now realise I have lots of duplicted files.
    How can I find and delete all thosew duplicates items? Is there a fast solution? Automator?
    How about mail import, I also have lots of duplicate email. Is there a solution to all this?
    Than you for your help.
    BigBlaze

    You can find programs to do what you want by going to Google and post the same question you did on here.  One I noticed was GEMINI by MacPaw.  Good Luck.

  • How to find and delete duplicate photos

    I have combined photos from various sources, friends, family, etc. and have found that there are many photos that are the same. I have been trying to find a way to find and delete all the duplicates but am unable to do so.
    Anyone have any ideas please?
    Many thanks
    Roger

    There is no automated may to find and delete duplicates, but importing using iPhoto will report duplicates if you attempt to import the same photo twice. I'm not sure if you have photos that are exact duplicates or photos taken on the same occasion but, in any case, it may be a matter of viewing the photos in date order and deleting duplicates as you scroll through. These will stay in the iPhoto trash until emptied.
    It may be that this would help, though I haven't used it: http://www.ironicsoftware.com/deep/ (With acknowledgements to Terence Devlin).
    Message was edited by: Jim Calderwood

  • 25GB of not-visible files on bootdisk after backup-how to find and delete?

    After backing up my iMac G5 internal HD to an external Firewire HD, the internal HD has accumulated an extra 25 Gigabytes of hidden/invisible files.
    ** How can I locate and delete presumably unnecessary hidden files?
    iMac HD had 100GB used. I used Carbon Copy Cloner to clone iMacHD to iMac backup, which had been zeroed with Disk Utility. After several failed partial clones using CCC, I erased iMac Backup -without zeroing- MacOS Extended (not journaled), and successfully made a bootable clone, excluding only .Spotlight-V100
    Did the failed clone attempts create hidden temporary files? Each time I tried, I would get more folders cloned, including the files at which it had hung, without error messages (mostly).
    Visible folders total 95 GB -exactly the same on Imac HD and iMac backup
    Using
    sudo ls alh /.Spotlight-V100
    .Spotlight-V100 totals 185 MB on IMac HD
    Just before the above history, iMac HD had been zeroed, Tiger reinstalled, updates taken, and other data restored using Migration assistant, from iMac Backup, which had been the boot disk because iMacHD had twice, in the last 6 months, developed bad disk sectors ( invalid leaf count in Disk Utility, surface scan errors in Techtool Deluxe. iMac HD has just passed both those tests, for now.)
    If this happens again, Applecare promised me I get a new HD.
    (Applecare Australia works the same hours I do M-F, so I get to talk to them only on Saturdays)
    IMac G5, MacBook, iMac 233 (R.I.P.)   Mac OS X (10.4.8)  

    Wrong forum. You should be visiting the CCC Troubleshooting forum, wherein you'll find the solution Remove FALSE clone.
    G4 450 MP Gigabit Mac OS X (10.4.8)

  • How to insert and delete a row after filter applied

    I thought I had figured out the solution to this problem but apparently not...
    How do you insert a new row into a JTable after a filter has been applied? The problem is once the data is filtered when I add a row, I'm getting an ArrayIndexOutOfBoundsException : 182 which is the number of rows for the entire dataset.
    The first line in the exception is: DefaultRowSorter.setModelToViewFromViewToModel
    I've tried to use, getRowSorter().convertRowIndexToView(int) but I can't get it to work. Can anyone offer any assistance?
    Thanks

    I also got that problem recently and after debuging for a while I figured out, that it was resulting from an error in my table's model: When the model received new items to display I
    1.) Fired an delete event for the old items
    2.) Fired an insert event for the new items
    Problem was that when firing the delete event I didn't already assigned the new items to the model. Therefore it had still the old row count.
    Maybe you have also a faulty table model?...

  • How to find and delete duplicate photos in iPhoto

    How do I fins and delete duplicate photos in iPhoto?

    There are two apps, actually one app and one Applescript script, for finding and removing duplicate photos from iPhoto. They are:
    Duplicate Annihilator
    iPhoto AppleScript to Remove Duplicates (free)
    HOWEVER, only try the above if you are seeing the duplicates in the iPhoto window.  If you are seeing duplicate images via the Finder then you probably do not have duplicates.  That's because at a minimum iPhoto will have two separate image files of each photo, the original and the thumbnail file. If the photo is a portrait oriented photo from a camera with the auto-rotate feature there will be a 3rd, modified image file in iPhoto, the rotated version.
    So be sure where you're seeing these duplicates.
    OT

  • How to find and delete multiple overlapping cut contour paths?

    Help!
    Background: My job requires that I print vinyl cut letters and shapes. I do this by creating a cut contour path in illustrator with a spot color as a stroke, so that once printed, there will be instructions on the print showing where to cut and the cutter will recognize the marks.
    My problem is that, for some reason, the cutter is going back over the cut path a 2nd time, as if there is more than one cut contour path in the file. But looking at the eps file in Illustrator, I don't see any extra overlapping paths with another stroke. It just looks like there is one pink line so it's very frustrating to know that there are actually extra cut paths that the cutter is reading that I don't know about. Is there a way for me to either A) find all of the paths and turn off the spot color swatch on all of them and just apply it to the one I need or B) find all paths and delete overlapping ones that I don't need?
    Someone also suggested that I might be getting extra overlapping cut paths in different Layers(?) I'm just really not sure what to do or how to find these and weed them out. Any help would be appreciated. I am relatively new to Illustrator and haven't found it a very intuitive program to learn, but maybe I just need a lot more practice.
    Thank you!

    You need to rebuild the file, as there is no way to fix any overalapping or duplicate paths.
    I make a layer for every color of vinyl, and then drag the selection square to the proper color layer. When done you can use the pathfinder command to unite each layer, to get rid of duplicate shapes.
    You alwasy want to proof before you send to cut, by doing a command Y to view your work in outline mode.

  • How to Add and delete a row while using Abstract Table Model

    Hi,
    I need to do the following functionalities in JTable.I've done tht but a small problem.
    1. Adding a row (Using addRow() method from DefaultTableModel).
    2. Deleting a row(Using setRowCount() method from Default Table Model).
    3. Sorting the table based on the selection of column(Using TableSorter which is using AbstracTableModel).
    As the sorting is mandatory i've to change my model to Abtract Table Model
    The problem is this Abstract Table Model doesn't have any methods to Add a row or deleting a row (setRowCount()).If anybody has written any utility method for this using Abstract Table Model help me.

    Using TableSorter which is using AbstracTableModel).If your talking about the TableSorter class from the Swing tutorial, then you create the TableSorter class by passing it a TableModel. There is no reason you can't use the DefaltTableModel.
    I changed the code in TableSorterDemo as follows:
            String[] columnNames = {"First Name",
                                            "Last Name",
                                            "Sport",
                                            "# of Years",
                                            "Vegetarian"};
            Object[][] data = {
                {"Mary", "Campione",
                 "Snowboarding", new BigDecimal(1), new Boolean(false)},
                {"Alison", "Huml",
                 "Rowing", new BigDecimal(3), new Boolean(true)},
                {"Kathy", "Walrath",
                 "Knitting", new BigDecimal(2), new Boolean(false)},
                {"Sharon", "Zakhour",
                 "Speed reading", new BigDecimal(20), new Boolean(true)},
                {"Philip", "Milne",
                 "Pool", new BigDecimal(10), new Boolean(false)}
              DefaultTableModel model = new DefaultTableModel(data, columnNames)
                   public Class getColumnClass(int c)
                        return getValueAt(0, c).getClass();
            TableSorter sorter = new TableSorter(model);
    //        TableSorter sorter = new TableSorter(new MyTableModel()); //ADDED THIS

  • Web Dynpro for ABAP:How to insert and delete a row in a table

    I have a table.
    My requirement is to insert a row into the table and i want to delete a particular row also.
    How can i do it.
    Plz reply me..

    Try the Web Dynpro for ABAP forum:
    Web Dynpro ABAP
    Kind Regards
    Stefanie

  • How To Find and Delete duplicates in Itunes 11

    Since the new update (Itunes 11), file, show duplicates is no longer there. I have just wiped my computer and all of my music resynced to my library twice and so now i have doubles of everything... I would like to know how I can view them all to delete them. if you could tell me what the new ability/directory it is under it would be much appreciated.

    The show duplicates/show exact duplicates features have been left out of iTunes 11. Rumor suggests they will be restored in the next build. In the meantime I have written two Windows scripts to make playlists of Duplicates and Exact Duplicates, either from a selection of tracks or the entire library. Note that, as with the iTunes feature, this list makes no distinction between "originals" and "dupes", you have to decide which is which.
    There is also my DeDuper script for automatically removing duplicates copies but keeping one remaining copy of each set. This can preserve ratings, play counts, playlist membership, etc. which are lost in a manual clean up. Please take note of the warning to backup your library before deduping. See this thread for background on deduping and the script.
    If you want to manually remove duplicate tracks use shift-delete to remove selected tracks from the library as well as the playlist. Keep one of each repeated group of files and don't send the others to the recycle bin unless you are sure that there are multiple files on the disc as opposed to multiple entries to the same file.
    tt2

  • How to find and delete duplicate files?

    Is it possible to have duplicate programs too.  I think I downloaded Picassa two times.  If so how do I delete them?
    thanks,

    Search with spotlight (command-option-space) then select the result and press command-r and it will take you to the file location.

  • How to find and delete files

    hi,
      I am facing a strange issue. I am having sp 2013, sql , vs 2012,sp d 2013,  caml designer  etc. for the first few weeks , the SP and VS debuggingetc etc everything worked fine. now suddenly i am seeing that my C drive
    is consumed some 235 GB+ space!!! Its strange, as I am not using any extra s/ws for consuming this much of space.
    Can anyone help, where / how should i delete the unwanted space.
    in my sql server 2012 DATA folder, i am  able to see the below files with huge size.

    Sometimes the drive get full because Volume shadow service.
    You can use tool like Tree view.
    To see the space has occupied by what and you deleted the unwanted data.
    Thanks and Regards Rahul Dagar

  • HT2905 How do I find and delete Duplicate songs in iTunes v11.0 (163)

    The steps for previous versions seem to no longer apply to the latest iTunes v11.0 (163). Any suggestions on how to find and delete MANY duplicated songs using the recently updated iTunes (Friday Nov 30th 2012) Thank you for your time.

    hi dear kil it happend the same to me in itunes 11.0 version, what i did is click on  Songs veiw mode then below where it says Name, Time, Artits, Album, Genre Etc  click on ARTIST and automaticly it will organize your artist with the duplicates songs, take a look in this picture, basiclly it is the same, thats a easy way to do it, till the come up with and update.. good luck
    com

  • My start up disk is almost full, but I have deleted everything I can find - I think that when I upgraded my software it has saved the old one - anyone know how I can find and delete it?

    Hi All,
    Late last year I upgraded from tiger to leopard (very out of date I know) but ever since I have been getting warnings that my startup disk is full.  I have deleted loads including pictures and itunes but still get the same mesage.  I think when I upgraded the old version was stored somewhere and this might be causing the problem.  Does anyone know where I would be able to find and delete - or alternatively have any other suggestions for what the problem may be?
    Many thanks

    WOW
    80GB is a very small drive. 
    Sorry Noondaywitch, but omni disk sweeper isn't going to install in the space remaining, without more problems. 
    My Suggestions
    1.  Get a large (400GB+) USB hard drive
    2.  Copy all the contents of your home directory to the USB drive.
    3.  Delete all your files from your home directory on your computer after making sure everything transferred ok.
    4.  Perform a clean (destructive) install of Mac OSX and then the applications you need.
    5.  Check how much space you have left.
    6.  If there is less than 50% of the HDD space left (35GB or so), then consider replacing the HDD with a new larger one.  If it's a white intel mac book, then this is very easy, and instructions how to do it are included in your 'everything else' wallet with your OSX DVDs etc.
    7.  If you can't replace the HDD, then it's time to consider a new machine i'm afraid.
    Hope this helps
    Justin

Maybe you are looking for