ItEr13S15ProbasModuloRecursosItEr12S10: Improving Criterion#toString method.

This commit is contained in:
Óscar González Fernández 2009-06-25 17:20:29 +02:00 committed by Javier Moran Rua
parent f5d9b8395e
commit 62baa4d37f

View file

@ -60,9 +60,8 @@ public class Criterion implements ICriterion {
} }
public boolean isSatisfiedBy(Resource resource, Date start, Date end) { public boolean isSatisfiedBy(Resource resource, Date start, Date end) {
return !resource.query().from(this) return !resource.query().from(this).enforcedInAll(
.enforcedInAll(Interval.range(start, end)).result() Interval.range(start, end)).result().isEmpty();
.isEmpty();
} }
public String getName() { public String getName() {
@ -96,6 +95,6 @@ public class Criterion implements ICriterion {
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this).getStringBuffer().toString(); return ToStringBuilder.reflectionToString(this);
} }
} }