At line 314 removed 2 lines. |
import java.util.List; |
|
At line 317 removed 3 lines. |
|
public List getPeople(Person person); |
|
At line 321 changed 3 lines. |
|
public void savePerson(Object person); |
|
public void savePerson(Person person); |
At line 338 removed 3 lines. |
import org.apache.commons.logging.Log; |
import org.apache.commons.logging.LogFactory; |
|
At line 333 added 1 line. |
import org.springframework.orm.ObjectRetrievalFailureException; |
At line 344 removed 3 lines. |
import java.util.List; |
|
|
At line 349 changed 1 line. |
private Log log = LogFactory.getLog(PersonDaoHibernate.class); |
public Person getPerson(Long id) { |
Person person = (Person) getHibernateTemplate().get(Person.class, id); |
At line 351 changed 3 lines. |
public List getPeople(Person person) { |
return getHibernateTemplate().find("from Person"); |
} |
if (person == null) { |
throw new ObjectRetrievalFailureException(Person.class, id); |
} |
At line 355 changed 2 lines. |
public Person getPerson(Long id) { |
return (Person) getHibernateTemplate().get(Person.class, id); |
return person; |
At line 359 changed 1 line. |
public void savePerson(Object person) { |
public void savePerson(Person person) { |
At line 364 changed 2 lines. |
Object person = getHibernateTemplate().load(Person.class, id); |
getHibernateTemplate().delete(person); |
// object must be loaded before it can be deleted |
getHibernateTemplate().delete(getPerson(id)); |
At line 370 removed 1 line. |
|