ItEr36S07ValidacionEProbasFuncionaisItEr35S08: [Bug #106] Method name refactorization and comment removal.
This commit is contained in:
parent
93c81733ba
commit
b48d2c3f8c
4 changed files with 3 additions and 8 deletions
|
|
@ -93,5 +93,5 @@ public interface IMachineDAO extends IGenericDAO<Machine, Long> {
|
|||
* Check in a new transaction if there is a machine with the same
|
||||
* code as the one passed as parameter
|
||||
*/
|
||||
boolean existsMachineWithCode(String code);
|
||||
boolean existsMachineWithCodeInAnotherTransaction(String code);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ public class MachineDAO extends GenericDAOHibernate<Machine, Long>
|
|||
|
||||
@Override
|
||||
@Transactional(readOnly= true, propagation = Propagation.REQUIRES_NEW)
|
||||
public boolean existsMachineWithCode(String code) {
|
||||
public boolean existsMachineWithCodeInAnotherTransaction(String code) {
|
||||
try {
|
||||
findUniqueByCode(code);
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ public class Machine extends Resource {
|
|||
|
||||
private boolean existsMachineWithTheCode() {
|
||||
IMachineDAO machineDAO = Registry.getMachineDAO();
|
||||
return machineDAO.existsMachineWithCode(code);
|
||||
return machineDAO.existsMachineWithCodeInAnotherTransaction(code);
|
||||
}
|
||||
|
||||
private boolean isIfExistsTheExistentMachineThisOne() {
|
||||
|
|
|
|||
|
|
@ -243,12 +243,7 @@ public class MachineModel implements IMachineModel {
|
|||
@Override
|
||||
@Transactional
|
||||
public void confirmSave() throws ValidationException {
|
||||
/*if (machine.getCalendar() != null) {
|
||||
baseCalendarModel.checkInvalidValuesCalendar(machine.getCalendar());
|
||||
}*/
|
||||
System.out.println("Version antes:"+ machine.getVersion());
|
||||
resourceDAO.save(machine);
|
||||
System.out.println("Version:" + machine.getVersion());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue