Examples of ArtistLocal


Examples of org.apache.openejb.test.entity.cmr.onetomany.ArtistLocal

    public void test00_AGetBExistingAB() throws Exception {
        resetDB();
        beginTransaction();
        try {
            ArtistLocal artist = findArtist(1);
            Set bSet = artist.getPerformed();
            assertEquals(2, bSet.size());
            for (Object value : bSet) {
                SongLocal song = (SongLocal) value;
                if (song.getId().equals(11)) {
                    assertEquals("value11", song.getName());
View Full Code Here

Examples of org.apache.openejb.test.entity.cmr.onetomany.ArtistLocal

    public void test01_BGetAExistingAB() throws Exception {
        resetDB();
        beginTransaction();
        try {
            SongLocal song = findSong(11);
            ArtistLocal artist = song.getPerformer();
            assertNotNull(artist);
            assertEquals(new Integer(1), artist.getId());
            assertEquals("value1", artist.getName());

            song = findSong(22);
            artist = song.getPerformer();
            assertNotNull(artist);
            assertEquals(new Integer(1), artist.getId());
            assertEquals("value1", artist.getName());
        } finally {
            completeTransaction();
        }
    }
View Full Code Here

Examples of org.apache.openejb.test.entity.cmr.onetomany.ArtistLocal

    public void test02_ASetBDropExisting() throws Exception {
        resetDB();
        beginTransaction();
        try {
            ArtistLocal artist = findArtist(1);
            artist.setPerformed(new HashSet<SongLocal>());
        } finally {
            completeTransaction();
        }
        assertUnlinked(1);
    }
View Full Code Here

Examples of org.apache.openejb.test.entity.cmr.onetomany.ArtistLocal

    public void test04_ASetBNewAB() throws Exception {
        resetDB();
        beginTransaction();
        try {
            ArtistLocal artist = findArtist(2);
            SongLocal song = findSong(22);
            Set<SongLocal> songSets = new HashSet<SongLocal>();
            songSets.add(song);
            artist.setPerformed(songSets);
        } finally {
            completeTransaction();
        }

        assertLinked(2, 22);
View Full Code Here

Examples of org.apache.openejb.test.entity.cmr.onetomany.ArtistLocal

    public void test05_BSetANewAB() throws Exception {
        resetDB();
        beginTransaction();
        try {
            ArtistLocal artist = findArtist(2);
            SongLocal song = findSong(22);
            song.setPerformer(artist);
        } finally {
            completeTransaction();
        }
View Full Code Here

Examples of org.apache.openejb.test.entity.cmr.onetomany.ArtistLocal

    public void test06_ASetBExistingBNewA() throws Exception {
        resetDB();
        beginTransaction();
        try {
            ArtistLocal artist = findArtist(2);
            SongLocal song = findSong(11);
            Set<SongLocal> songSets = artist.getPerformed();
            songSets.add(song);
        } finally {
            completeTransaction();
        }
View Full Code Here

Examples of org.apache.openejb.test.entity.cmr.onetomany.ArtistLocal

    public void test07_BSetAExistingBNewA() throws Exception {
        resetDB();
        beginTransaction();
        try {
            ArtistLocal artist = findArtist(2);
            SongLocal song = findSong(11);
            song.setPerformer(artist);
        } finally {
            completeTransaction();
        }
View Full Code Here

Examples of org.apache.openejb.test.entity.cmr.onetomany.ArtistLocal

    public void test08_ASetBExistingANewB() throws Exception {
        resetDB();
        beginTransaction();
        try {
            ArtistLocal artist = findArtist(1);
            SongLocal song = createSong(33);
            Set<SongLocal> songSets = artist.getPerformed();
            songSets.add(song);
        } finally {
            completeTransaction();
        }
        assertLinked(1, 11, 22, 33);
View Full Code Here

Examples of org.apache.openejb.test.entity.cmr.onetomany.ArtistLocal

    public void test09_BSetAExistingANewB() throws Exception {
        resetDB();
        beginTransaction();
        try {
            ArtistLocal artist = findArtist(1);
            SongLocal song = createSong(33);
            song.setPerformer(artist);
        } finally {
            completeTransaction();
        }
View Full Code Here

Examples of org.apache.openejb.test.entity.cmr.onetomany.ArtistLocal

    public void test10_RemoveRelationships() throws Exception {
        resetDB();
        beginTransaction();
        try {
            SongLocal song = findSong(11);
            ArtistLocal artist = song.getPerformer();
            Set<SongLocal> songs = artist.getPerformed();
            assertTrue(songs.contains(song));
            song.remove();
            assertFalse(songs.contains(song));
        } finally {
            completeTransaction();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.