| Sure, So here's the class with just the constraints - no references to groups:
public class A {
@NotNull
public String a1;
@NotNull
public String a2;
}
By default I want all constraints evaluated. In specific circumstances I want a subset of all constraints evaluated where that subset includes all notifications that are ungrouped. In fact I only have two sets of constraints - those to be evaluated always (either by default or in the specific relaxed circumstance) and those that I want only evaluated by default. So, to add some groups in:
public interface Compete extends Relaxed, Default {};
public interface Relaxed {};
@GroupSequence({Complete.class, A.class})
public class A {
@NotNull
public String a1;
@NotNull(groups=Complete.class}
public String a2;
}
Achieves the effect of causing all constraints to be evaluated by default. But I haven't found a way of getting just the constraint on a1 to be evaluated without putting it in a group. I can achieve the evaluation I want by putting a1's constraint in the Relaxed group but I want to avoid having to put every constraint in a group as having to do that is an error prone procedure. |