Examples of Genre


Examples of genres.modele.Genre

            String thisLine;
            fis = new FileInputStream(fName);
            DataInputStream myInput = new DataInputStream(fis);
            Morceau m = null;
            Artiste a = null;
            Genre g = null;
            int counterInstrument = 0;
            while ((thisLine = myInput.readLine()) != null) {
                if (thisLine.startsWith("./")) {
                    String strar[] = thisLine.split("\\./");
                    String musique[] = strar[1].split(";");
View Full Code Here

Examples of genres.modele.Genre

    public Genre getGenre(String genre) {
        Query q = em.createQuery("select a from Genre a where a.nom='" + genre + "'");
        List results = q.getResultList();
        if (!results.isEmpty()) {
            Iterator stIterator = results.iterator();
            Genre a = (Genre) stIterator.next();
            return a;
        } else {
            return new Genre(genre);
        }
    }
View Full Code Here

Examples of jtrackbase.db.Genre

    public void actionPerformed(ActionEvent e) {
      log.finest("Starting for genre");
      InputDialog<Genre> ip = new InputDialog<Genre>(TrackbaseFrame.this,
          new GenrePanel());
      ip.setVisible(true);
      Genre g = ip.getData();
      log.finest("Persisting: " + g);
      if (g == null) {
        return;
      }
      EntityManager em = DBController.getEntityManager();
View Full Code Here

Examples of jtrackbase.db.Genre

    return columnIndex==0?"Name":null;
  }

  @Override
  public Object getValueAt(int rowIndex, int columnIndex) {
    Genre a=get(rowIndex);
    if (a==null) {
      return null;
    }
    switch (columnIndex) {
    case 0:{
      return a.getName();
    }
    }
    return null;
  }
View Full Code Here

Examples of jtrackbase.db.Genre

import jtrackbase.Constants;
import jtrackbase.db.Genre;

public class GenrePanel extends DataInputPanel<Genre> {
  public GenrePanel() {
    this(new Genre());
  }
View Full Code Here

Examples of model.Genre

    Book book = new Book();
    book.setAuthor("Margaret Mitchell");
    book.setTitle("Gone wyth the wind");

    // link the book with a new genre record
    Genre genre = new Genre();
    genre.setGenre("Clssic");
    genre.setBook(book); // create book genre link
   
    // add book and genre to the database
    book = linkController.add(book);
    genre = linkController.add(genre);
   
    // update the title of the book to correct spelling error
    book.setTitle("Gone with the wind");   
    book = linkController.update(book);

    genre.setGenre("Classic");
    genre = linkController.update(genre);
   
   
    linkController.delete(genre); // delete dependent child genre data first
    linkController.delete(book); // delete parent book record
View Full Code Here

Examples of models.Genre

     * @param year
     */
    public static void listByApi(String genre, String year) {
        List<Album> albums;
        if (genre != null) {
            Genre genreEnum = Genre.valueOf(genre.toString().toUpperCase());
            albums = Album.find("byGenre", genreEnum).fetch();
        } else {
            albums = Album.findAll();
        }
        if (year != null) {
View Full Code Here

Examples of models.Genre

        } catch (ParseException e) {
            Logger.error(e.getMessage());
        }
        //get the genre
        String genre = XPath.selectText("genre", albumNode);
        Genre genreEnum = Genre.valueOf(genre.toString().toUpperCase());
        album.genre = genreEnum;

        //save in db
        album.artist = artist;
        album.save();
View Full Code Here

Examples of org.blinkenlights.jid3.v1.ID3V1Tag.Genre

  public String getComment() {
    return guard(tag1.getComment());
  }

  public String getGenre() {
    Genre genre = tag1.getGenre();
    if(genre!=null) return genre.toString();
    return "";
  }
View Full Code Here

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
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.