Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void guardar(ObjectContainer db) {
- Persona p = null;
- ObjectSet<Persona> set =
- db.queryByExample(new Persona(null, this.dni, 0));
- if(set.hasNext()){
- p = set.next();
- p.dni = this.dni;
- p.edat = this.edat; p.nom = this.nom;
- db.store(p);
- }
- else { db.store(this); }
- db.commit();
Advertisement
Add Comment
Please, Sign In to add comment