ItEr20S04ArquitecturaServidorItEr19S04: Removing unused methods and variables.
This commit is contained in:
parent
b0b60433cf
commit
d9aa8fa13f
15 changed files with 11 additions and 49 deletions
|
|
@ -41,8 +41,6 @@ public abstract class Resource extends BaseEntity {
|
|||
public class Query {
|
||||
|
||||
private List<IPredicate> predicates = new ArrayList<IPredicate>();
|
||||
private boolean sort = false;
|
||||
|
||||
private Query() {
|
||||
|
||||
}
|
||||
|
|
@ -101,7 +99,6 @@ public abstract class Resource extends BaseEntity {
|
|||
}
|
||||
|
||||
public Query sortByStartDate() {
|
||||
sort = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,9 +30,6 @@ public class ResourceServiceImpl implements IResourceService {
|
|||
@Autowired
|
||||
private IResourceDAO resourceDao;
|
||||
|
||||
@Autowired
|
||||
private ICriterionsBootstrap criterionsBootstrap;
|
||||
|
||||
@Autowired
|
||||
private ICriterionTypeService criterionTypeService;
|
||||
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ public class PartialDateTest {
|
|||
PartialDate partialDate = PartialDate.createFrom(now).with(g);
|
||||
assertFalse(partialDate.canBeConvertedToLocalDate());
|
||||
try {
|
||||
LocalDate converted = partialDate.tryToConvertToLocalDate();
|
||||
partialDate.tryToConvertToLocalDate();
|
||||
fail("the partial date cannot be converted to a LocalDate");
|
||||
} catch (IllegalArgumentException e) {
|
||||
// ok
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ public class TaskElementTest {
|
|||
Task origin = new Task();
|
||||
Task destination = new Task();
|
||||
Type type = Type.START_END;
|
||||
Dependency dependency = Dependency.createDependency(origin,
|
||||
Dependency.createDependency(origin,
|
||||
destination, type);
|
||||
assertThat(origin.getDependenciesWithThisOrigin().size(), equalTo(1));
|
||||
assertThat(destination.getDependenciesWithThisDestination().size(),
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ public class TaskElementServiceTest {
|
|||
Task oldChild2 = child2;
|
||||
flushAndEvict(child2);
|
||||
child2 = (Task) taskElementService.findById(child2.getId());
|
||||
Dependency dependency = Dependency.createDependency(child1, oldChild2,
|
||||
Dependency.createDependency(child1, oldChild2,
|
||||
Type.START_END);
|
||||
taskElementService.save(child1);
|
||||
flushAndEvict(child1);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ import org.junit.runner.RunWith;
|
|||
import org.navalplanner.business.common.exceptions.InstanceNotFoundException;
|
||||
import org.navalplanner.business.resources.daos.ICriterionTypeDAO;
|
||||
import org.navalplanner.business.resources.entities.CriterionType;
|
||||
import org.navalplanner.business.resources.entities.ResourceEnum;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,12 @@
|
|||
package org.navalplanner.business.test.resources.entities;
|
||||
|
||||
import static junit.framework.Assert.assertEquals;
|
||||
import static org.hamcrest.CoreMatchers.equalTo;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertThat;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.navalplanner.business.test.resources.daos.CriterionSatisfactionDAOTest.year;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
|
|
@ -12,13 +19,6 @@ import org.navalplanner.business.resources.entities.Interval;
|
|||
import org.navalplanner.business.resources.entities.Worker;
|
||||
import org.navalplanner.business.test.resources.daos.CriterionDAOTest;
|
||||
|
||||
import static junit.framework.Assert.assertEquals;
|
||||
import static org.hamcrest.CoreMatchers.equalTo;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertThat;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.navalplanner.business.test.resources.daos.CriterionSatisfactionDAOTest.year;
|
||||
|
||||
/**
|
||||
* Tests for {@link CriterionSatisfaction} <br />
|
||||
* @author Óscar González Fernández <ogonzalez@igalia.com>
|
||||
|
|
@ -131,7 +131,6 @@ public class CriterionSatisfactionTest {
|
|||
@Test
|
||||
public void testGoesBeforeWithoutOverlapping() {
|
||||
final Criterion criterion = CriterionDAOTest.createValidCriterion();
|
||||
Worker worker = new Worker("firstName", "surName", "2333232", 10);
|
||||
CriterionSatisfaction posterior = new CriterionSatisfaction();
|
||||
posterior.setCriterion(criterion);
|
||||
posterior.setStartDate(year(2000));
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package org.navalplanner.business.test.resources.entities;
|
|||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.navalplanner.business.resources.entities.CriterionCompounder.atom;
|
||||
import static org.navalplanner.business.resources.entities.CriterionCompounder.buildAnd;
|
||||
import static org.navalplanner.business.resources.entities.CriterionCompounder.build;
|
||||
import static org.navalplanner.business.resources.entities.CriterionCompounder.not;
|
||||
|
||||
|
|
|
|||
|
|
@ -253,7 +253,7 @@ public class CriterionServiceTest {
|
|||
resourceService.saveResource(worker1);
|
||||
Criterion criterion = CriterionDAOTest.createValidCriterion();
|
||||
criterionService.save(criterion);
|
||||
ICriterionType<?> type = createTypeThatMatches(criterion);
|
||||
createTypeThatMatches(criterion);
|
||||
worker1.addSatisfaction(new CriterionWithItsType(criterion.getType(), criterion));
|
||||
resourceService.saveResource(worker1);
|
||||
Resource workerReloaded = adHocTransactionService
|
||||
|
|
|
|||
|
|
@ -314,13 +314,6 @@ public class LeftTasksTree extends HtmlMacroComponent {
|
|||
tasksTreeModel.remove(taskRemoved);
|
||||
}
|
||||
|
||||
private static Date threeMonthsLater(Date now) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(now);
|
||||
calendar.add(Calendar.MONTH, 3);
|
||||
return calendar.getTime();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterCompose() {
|
||||
setClass("listdetails");
|
||||
|
|
|
|||
|
|
@ -77,8 +77,6 @@ public class MutableTreeModel<T> extends AbstractTreeModel {
|
|||
|
||||
}
|
||||
|
||||
private final Class<T> type;
|
||||
|
||||
private final Node<T> root;
|
||||
|
||||
private Map<T, Node<T>> nodesByDomainObject = new WeakHashMap<T, Node<T>>();
|
||||
|
|
@ -120,7 +118,6 @@ public class MutableTreeModel<T> extends AbstractTreeModel {
|
|||
if (type == null)
|
||||
throw new IllegalArgumentException("type cannot be null");
|
||||
nodesByDomainObject.put(unwrap(root), root);
|
||||
this.type = type;
|
||||
this.root = root;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,12 +35,6 @@ public class OrderElementModel implements IOrderElementModel {
|
|||
@Autowired
|
||||
private ICriterionTypeDAO criterionTypeDao;
|
||||
|
||||
@Autowired
|
||||
private ICriterionsBootstrap criterionsBootstrap;
|
||||
|
||||
@Autowired
|
||||
private ICriterionService criterionService;
|
||||
|
||||
@Autowired
|
||||
private ICriterionTypeService criterionTypeService;
|
||||
|
||||
|
|
|
|||
|
|
@ -171,14 +171,6 @@ public class DataForPlanner {
|
|||
}, navigator, list);
|
||||
}
|
||||
|
||||
private TaskContainer createContainer(String name, Date start, Date end) {
|
||||
TaskContainer container = new TaskContainer();
|
||||
container.setBeginDate(start);
|
||||
container.setEndDate(end);
|
||||
container.setName(name);
|
||||
return container;
|
||||
}
|
||||
|
||||
private DefaultFundamentalProperties createTask(String name, Date now,
|
||||
Date end) {
|
||||
return new DefaultFundamentalProperties(name, end, end.getTime()
|
||||
|
|
|
|||
|
|
@ -40,9 +40,6 @@ public class CriterionsModel implements ICriterionsModel {
|
|||
private ClassValidator<Criterion> criterionValidator = new ClassValidator<Criterion>(
|
||||
Criterion.class);
|
||||
|
||||
@Autowired
|
||||
private ICriterionsBootstrap criterionsBootstrap;
|
||||
|
||||
@Autowired
|
||||
private ICriterionService criterionService;
|
||||
|
||||
|
|
|
|||
|
|
@ -53,8 +53,6 @@ public class WorkerCRUDController extends GenericForwardComposer implements
|
|||
|
||||
private LocalizationsController localizationsForCreationController;
|
||||
|
||||
private ICriterionService criterionService;
|
||||
|
||||
private WorkRelationshipsController editWorkRelationship;
|
||||
|
||||
private IWorkerCRUDControllerEntryPoints workerCRUD;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue