Examples of Genre


Examples of org.jboss.errai.demo.jpa.client.shared.Genre

   * persists a selection of music from the 1960's.
   */
  private void preFillDatabaseIfEmpty() {
    TypedQuery<Album> albums = em.createNamedQuery("allAlbums", Album.class);
    if (albums.getResultList().isEmpty()) {
      Genre rock = new Genre("Rock");
      Genre soul = new Genre("Soul");
      Genre rnb = new Genre("R&B");

      Artist beatles = new Artist();
      beatles.setName("The Beatles");
      beatles.addGenre(rock);

      Artist samNDave = new Artist();
      samNDave.setName("Sam & Dave");
      samNDave.addGenre(rock);
      samNDave.addGenre(soul);
      samNDave.addGenre(rnb);

      Album album = new Album();
      album.setArtist(beatles);
      album.setFormat(Format.LP);
      album.setName("Let It Be");
      album.setReleaseDate(new Date(11012400000L));
      em.persist(album);

      album = new Album();
      album.setArtist(beatles);
      album.setFormat(Format.LP);
      album.setName("Abbey Road");
      album.setReleaseDate(new Date(-8366400000L));
      em.persist(album);

      album = new Album();
      album.setArtist(beatles);
      album.setFormat(Format.LP);
      album.setName("Yellow Submarine");
      album.setReleaseDate(new Date(-30481200000L));
      em.persist(album);

      album = new Album();
      album.setArtist(beatles);
      album.setFormat(Format.LP);
      album.setName("The Beatles");
      album.setReleaseDate(new Date(-34974000000L));
      em.persist(album);

      album = new Album();
      album.setArtist(beatles);
      album.setFormat(Format.LP);
      album.setName("Magical Mystery Tour");
      album.setReleaseDate(new Date(-66164400000L));
      em.persist(album);

      album = new Album();
      album.setArtist(beatles);
      album.setFormat(Format.LP);
      album.setName("Sgt. Pepper's Lonely Hearts Club Band");
      album.setReleaseDate(new Date(-81633600000L));
      em.persist(album);

      album = new Album();
      album.setArtist(beatles);
      album.setFormat(Format.LP);
      album.setName("Revolver");
      album.setReleaseDate(new Date(-107553600000L));
      em.persist(album);

      album = new Album();
      album.setArtist(beatles);
      album.setFormat(Format.LP);
      album.setName("Rubber Soul");
      album.setReleaseDate(new Date(-128718000000L));
      em.persist(album);

      album = new Album();
      album.setArtist(samNDave);
      album.setFormat(Format.LP);
      album.setName("Hold On, I'm Comin'");
      album.setReleaseDate(new Date(-121114800000L));
      em.persist(album);

      album = new Album();
      album.setArtist(samNDave);
      album.setFormat(Format.LP);
      album.setName("Double Dynamite");
      album.setReleaseDate(new Date(-97354800000L));
      em.persist(album);

      album = new Album();
      album.setArtist(samNDave);
      album.setFormat(Format.LP);
      album.setName("Soul Men");
      album.setReleaseDate(new Date(-71092800000L));
      em.persist(album);

      // Some extra genres to play with
      em.persist(new Genre("Classical"));
      em.persist(new Genre("Country"));
      em.persist(new Genre("Folk"));
      em.persist(new Genre("Funk"));
      em.persist(new Genre("Pop"));

      // store them
      em.flush();
    }
  }
View Full Code Here

Examples of org.jboss.errai.demo.jpa.client.shared.Genre

     * If there are no Album instances in the database, this method creates and persists a selection of music from the 1960's.
     */
    private void preFillDatabaseIfEmpty() {
        TypedQuery<Album> albums = em.createNamedQuery("allAlbums", Album.class);
        if (albums.getResultList().isEmpty()) {
            Genre rock = new Genre("Rock");
            Genre soul = new Genre("Soul");
            Genre rnb = new Genre("R&B");

            Artist beatles = new Artist();
            beatles.setName("The Beatles");
            beatles.addGenre(rock);

            Artist samNDave = new Artist();
            samNDave.setName("Sam & Dave");
            samNDave.addGenre(rock);
            samNDave.addGenre(soul);
            samNDave.addGenre(rnb);

            Album album = new Album();
            album.setArtist(beatles);
            album.setFormat(Format.LP);
            album.setName("Let It Be");
            album.setReleaseDate(new Date(11012400000L));
            em.persist(album);

            album = new Album();
            album.setArtist(beatles);
            album.setFormat(Format.LP);
            album.setName("Abbey Road");
            album.setReleaseDate(new Date(-8366400000L));
            em.persist(album);

            album = new Album();
            album.setArtist(beatles);
            album.setFormat(Format.LP);
            album.setName("Yellow Submarine");
            album.setReleaseDate(new Date(-30481200000L));
            em.persist(album);

            album = new Album();
            album.setArtist(beatles);
            album.setFormat(Format.LP);
            album.setName("The Beatles");
            album.setReleaseDate(new Date(-34974000000L));
            em.persist(album);

            album = new Album();
            album.setArtist(beatles);
            album.setFormat(Format.LP);
            album.setName("Magical Mystery Tour");
            album.setReleaseDate(new Date(-66164400000L));
            em.persist(album);

            album = new Album();
            album.setArtist(beatles);
            album.setFormat(Format.LP);
            album.setName("Sgt. Pepper's Lonely Hearts Club Band");
            album.setReleaseDate(new Date(-81633600000L));
            em.persist(album);

            album = new Album();
            album.setArtist(beatles);
            album.setFormat(Format.LP);
            album.setName("Revolver");
            album.setReleaseDate(new Date(-107553600000L));
            em.persist(album);

            album = new Album();
            album.setArtist(beatles);
            album.setFormat(Format.LP);
            album.setName("Rubber Soul");
            album.setReleaseDate(new Date(-128718000000L));
            em.persist(album);

            album = new Album();
            album.setArtist(samNDave);
            album.setFormat(Format.LP);
            album.setName("Hold On, I'm Comin'");
            album.setReleaseDate(new Date(-121114800000L));
            em.persist(album);

            album = new Album();
            album.setArtist(samNDave);
            album.setFormat(Format.LP);
            album.setName("Double Dynamite");
            album.setReleaseDate(new Date(-97354800000L));
            em.persist(album);

            album = new Album();
            album.setArtist(samNDave);
            album.setFormat(Format.LP);
            album.setName("Soul Men");
            album.setReleaseDate(new Date(-71092800000L));
            em.persist(album);

            // Some extra genres to play with
            em.persist(new Genre("Classical"));
            em.persist(new Genre("Country"));
            em.persist(new Genre("Folk"));
            em.persist(new Genre("Funk"));
            em.persist(new Genre("Pop"));

            // store them
            em.flush();
        }
    }
View Full Code Here

Examples of org.opensolaris.opengrok.analysis.FileAnalyzer.Genre

    /**
     * Get a writer to which the xref can be written, or null if no xref
     * should be produced for files of this type.
     */
    private Writer getXrefWriter(FileAnalyzer fa, String path) throws IOException {
        Genre g = fa.getFactory().getGenre();
        if (xrefDir != null && (g == Genre.PLAIN || g == Genre.XREFABLE)) {
            File xrefFile = new File(xrefDir, path);
            // If mkdirs() returns false, the failure is most likely
            // because the file already exists. But to check for the
            // file first and only add it if it doesn't exists would
View Full Code Here

Examples of org.opensolaris.opengrok.analysis.FileAnalyzer.Genre

            boolean hasContext = false;
            try {
                Document doc = docs.get(ii);
                String filename = doc.get(QueryBuilder.PATH);

                Genre genre = Genre.get(doc.get(QueryBuilder.T));
                Definitions tags = null;
                IndexableField tagsField = doc.getField(QueryBuilder.TAGS);
                if (tagsField != null) {
                    tags = Definitions.deserialize(tagsField.binaryValue().bytes);
                }
View Full Code Here

Examples of org.opensolaris.opengrok.analysis.FileAnalyzer.Genre

                out.write(rpathE);
                out.write("\">");
                out.write(rpath.substring(rpath.lastIndexOf('/') + 1)); // htmlize ???
                out.write("</a></td><td><tt class=\"con\">");
                if (sh.sourceContext != null) {
                    Genre genre = Genre.get(doc.get("t"));
                    Definitions tags = null;
                    IndexableField tagsField = doc.getField("tags");
                    if (tagsField != null) {
                        tags = Definitions.deserialize(tagsField.binaryValue().bytes);
                    }
View Full Code Here

Examples of org.opensolaris.opengrok.analysis.FileAnalyzer.Genre

                doc.add(new TextField(QueryBuilder.PROJECT, project.getPath(), Store.YES));
            }
        }

        if (fa != null) {
            Genre g = fa.getGenre();
            if (g == Genre.PLAIN || g == Genre.XREFABLE || g == Genre.HTML) {
                doc.add(new Field(QueryBuilder.T, g.typeName(), string_ft_stored_nanalyzed_norms
                    ));
            }                  
            fa.analyze(doc, StreamSource.fromFile(file), xrefOut);
           
            String type = fa.getFileTypeName();
View Full Code Here

Examples of org.watermint.sourcecolon.org.opensolaris.opengrok.analysis.FileAnalyzer.Genre

                out.write(rpathE);
                out.write("\">");
                out.write(rpath.substring(rpath.lastIndexOf('/') + 1)); // htmlize ???
                out.write("</a></td><td>");
                if (sh.sourceContext != null) {
                    Genre genre = Genre.get(doc.get("t"));
                    Definitions tags = null;
                    Fieldable tagsField = doc.getFieldable("tags");
                    if (tagsField != null) {
                        tags = Definitions.deserialize(tagsField.getBinaryValue());
                    }
View Full Code Here

Examples of su.litvak.moviedb.entity.Genre

            subscribe();
        }

        GenreDesc() {
            this.genre = new Genre();

            subscribe();
        }
View Full Code Here

Examples of us.jyg.freshet.dao.model.Genre

    }

    public Song saveSong(SongData songData) {
      Album album = albumDao.getAlbum(songData.getAlbum());
      Artist artist = artistDao.getArtist(songData.getArtist());
      Genre genre = genreDao.getGenre(songData.getGenre());
      Song song = new Song(songData.getName(), songData.getPath(), songData
          .getTrack(), album, artist, genre);
      saveSong(song);
      return song;
  }
View Full Code Here

Examples of us.jyg.freshet.dao.model.Genre

      try {
        if (f.getName().matches(".*[mM][pP]3")) {
          SongData songData = new SongData(f);
          Album album = albumDao.getAlbum(songData.getAlbum());
          Artist artist = artistDao.getArtist(songData.getArtist());
          Genre genre = genreDao.getGenre(songData.getGenre());
          Song song = new Song(songData.getName(), songData.getPath(), songData
              .getTrack(), album, artist, genre);
          songDao.saveSong(song);
//          log.debug("Saved: " + song.getName() + " ("+song.getId() +")"+
//              ", " + song.getAlbum().getName() +
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.