Package instruments.modele

Examples of instruments.modele.Instrument


                        counterInstrument += 1;
                        String instrumental[] = thisLine.split(";");
                        String instrument = instrumental[0];
                        int difficulte = Integer.parseInt(instrumental[1]);
                        String piste = instrumental[2];
                        Instrument i = getInstrument(instrument);
                        Piste p = new Piste(piste,i,difficulte);
                        em.persist(p);
                        m.addPiste(p);
                    }
                }
View Full Code Here


    private Instrument getInstrument(String instrument) {
        Query q = em.createQuery("select i from Instrument i where i.nom='" + instrument + "'");
        List results = q.getResultList();
        if (!results.isEmpty()) {
            Iterator stIterator = results.iterator();
            Instrument a = (Instrument) stIterator.next();
            return a;
        } else {
            Instrument i = new Instrument(instrument);
            em.persist(i);
            return i;
        }
    }
View Full Code Here

TOP

Related Classes of instruments.modele.Instrument

Copyright © 2018 www.massapicom. 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.