ItEr35S15CUAdministracionCategoriaCosteItEr34S15: style/indentation revision

This commit is contained in:
Jacobo Aragunde Pérez 2009-12-02 20:58:25 +01:00 committed by Javier Moran Rua
parent 68335cf0e9
commit 4f2cfbb243
6 changed files with 10 additions and 10 deletions

View file

@ -33,7 +33,7 @@ import org.springframework.stereotype.Repository;
@Repository
@Scope(BeanDefinition.SCOPE_SINGLETON)
public class HourCostDAO extends GenericDAOHibernate<HourCost, Long> implements
IHourCostDAO {
IHourCostDAO {
@Override
public void remove(Long id) throws InstanceNotFoundException {

View file

@ -42,7 +42,7 @@ public class TypeOfWorkHoursDAO extends GenericDAOHibernate<TypeOfWorkHours, Lon
@Override
public TypeOfWorkHours findUniqueByCode(TypeOfWorkHours typeOfWorkHours)
throws InstanceNotFoundException {
throws InstanceNotFoundException {
Validate.notNull(typeOfWorkHours);
return findUniqueByCode(typeOfWorkHours.getCode());

View file

@ -33,10 +33,10 @@ import org.navalplanner.business.common.BaseEntity;
*/
public class CostCategory extends BaseEntity {
@NotEmpty
@NotEmpty
private String name;
private Set<HourCost> hourCosts = new HashSet<HourCost>();
private Set<HourCost> hourCosts = new HashSet<HourCost>();
// Default constructor, needed by Hibernate
protected CostCategory() {
@ -80,8 +80,10 @@ public class CostCategory extends BaseEntity {
LocalDate initDate = hourCost.getInitDate();
LocalDate endDate = hourCost.getEndDate();
for(HourCost listElement:hourCosts) {
if((listElement.getEndDate().compareTo(initDate)>=0 && listElement.getEndDate().compareTo(endDate)<=0) ||
(listElement.getInitDate().compareTo(initDate)>=0 && listElement.getInitDate().compareTo(endDate)<=0))
if((listElement.getEndDate().compareTo(initDate)>=0 &&
listElement.getEndDate().compareTo(endDate)<=0) ||
(listElement.getInitDate().compareTo(initDate)>=0 &&
listElement.getInitDate().compareTo(endDate)<=0))
overlap = true;
}
return !overlap;

View file

@ -42,7 +42,7 @@ public class TypeOfWorkHours extends BaseEntity {
private BigDecimal defaultPrice;
boolean enabled = true;
boolean enabled = true;
// Default constructor, needed by Hibernate
protected TypeOfWorkHours() {

View file

@ -24,7 +24,6 @@ import static org.navalplanner.web.I18nHelper._;
import java.util.List;
import org.hibernate.validator.InvalidValue;
import org.navalplanner.business.common.exceptions.ValidationException;
import org.navalplanner.business.costcategories.entities.TypeOfWorkHours;
import org.navalplanner.web.common.IMessagesForUser;
@ -44,6 +43,7 @@ import org.zkoss.zul.api.Window;
*
* @author Jacobo Aragunde Perez <jaragunde@igalia.com>
*/
@SuppressWarnings("serial")
public class TypeOfWorkHoursCRUDController extends GenericForwardComposer implements
ITypeOfWorkHoursCRUDController {

View file

@ -22,8 +22,6 @@ package org.navalplanner.web.costcategories;
import java.util.List;
import org.apache.commons.lang.Validate;
import org.navalplanner.business.common.exceptions.InstanceNotFoundException;
import org.navalplanner.business.common.exceptions.ValidationException;
import org.navalplanner.business.costcategories.daos.ITypeOfWorkHoursDAO;
import org.navalplanner.business.costcategories.entities.TypeOfWorkHours;