Y G Ysdf SDF SDF SF S Aw Fghghjef Esf Sef Fseaefasef F Ef SF F E Fe S F Esf Es Fe Ef Af W Ad WD Awd WD E Q W
Y G Ysdf SDF SDF SF S Aw Fghghjef Esf Sef Fseaefasef F Ef SF F E Fe S F Esf Es Fe Ef Af W Ad WD Awd WD E Q W
Y G Ysdf SDF SDF SF S Aw Fghghjef Esf Sef Fseaefasef F Ef SF F E Fe S F Esf Es Fe Ef Af W Ad WD Awd WD E Q W
G
Ysdf
Sdf
Sdf
Sf
S
Aw
Fghghjef
Esf
Sef
Fseaefasef
F
Ef
Sf
F
E
Fe
S
F
Esf
Es
fe
Ef
Af
W
Ad
Wd
Awd
Wd
E
Q
W
R
E
4
R
4
Gh
Mh
Mh
M
M
Gm
M
G
Mg
Fh
F
H
F
D
G
D
Gd
Gd
r
A
W
dad
Yg
9g
99asdf
Sadfcassdf
As
Fzxvzxvzv
Zv
Zv
Z
Xv
Zv
Zv
V
Z
vz
Sadasdf
As
Df
Asf
Asf
saf
Fds
Af
dasf
Sds
Af
das
gpackage mibase;
asdf
asdfQWERqas
sad
f
asfdas
fas
fsaf
sf
safsf
as
dsfa
sf
asdf
saf
sa
f
f
sad
f
QW
RQR
QWERasf
Asf
As
Fas
F
Asf
As
fa
Q
RWQR
WR
Q
REW
a
sfd
dasfd
af
as
fas
3
33
232
f
dcsa
/**
*asfa
Fa
Fas
Fa
Sf
as
* @author avemar71asdf
Asf
Asdf
Ds
Fd
Sfds
Af
Sdaf
Safas
Fd
assa
*/
import com.db4o.*;
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
ObjectContainer db = Db4o.openFile("C:\\baseDB40\\base.yap");
//crearBD(db);
consultarLibros(db);
//consultarAutor(db,"Carlos Sánchez Vera");
//consultarLibrosAutor(db,"Alvaro Vega Díaz");
//actualizar(db);
eliminar(db);
consultarLibros(db);
db.close();
}
a1.addLibro(l1); l1.setAutor(a1);
a1.addLibro(l2); l2.setAutor(a1);
a1.addLibro(l3); l3.setAutor(a1);
a1.addLibro(l4); l4.setAutor(a1);
a2.addLibro(l5); l5.setAutor(a2);
a2.addLibro(l6); l6.setAutor(a2);
a2.addLibro(l7); l7.setAutor(a2);
a2.addLibro(l8); l8.setAutor(a2);
base.set(a1);
base.set(a2);
}
private static void consultarLibros(ObjectContainer base){
Libro l = new Libro(null);
ObjectSet result = base.get(l);
package mibase;
/**
*
* @author avemar71
*/
import java.util.List;
import java.util.ArrayList;
/**
* @author avemar71
*/
public class Libro {
protected String titulo;
protected Autor autor;