Lazy loading with Hibernate
Lazy load is an implementation of design pattern proxy. Here it is used to reduce memory consumation when we load collection of object. For example when we have two relational class Impiegato and Dipartimento Impiegato.java package org.intellynet.com.model; import java.io.Serializable; @Entity @Table(name = "Impiegato") public class Impiegato implements Serializable { private static final long serialVersionUID = 1L; public Impiegato() { } @Id private long id; private String nome; @OneToOne private Dipartimento dipartimento; public long getId() { return id; } public void setId(long id) { this.id = id; } public String getNome() { return nome; } public void setNome(String param) { this.nome = param; } public Dipartimento getDipartimento() { return dipartimento; } public void setDipartimento(Dipartimento param) { this.dipartimento = param; } } Dipartimento.java package org.intellynet.com.model; import java.io.Se...