HHH-7038 - Define sources for filters, filter-defs, type-defs, fetch-profiles

This commit is contained in:
Steve Ebersole 2012-02-08 16:03:26 -06:00
parent dc8afc67ce
commit a93dc7e59e
2 changed files with 9 additions and 9 deletions

View File

@ -39,15 +39,15 @@ public class FilterDefSourceImpl implements FilterDefSource {
private final String condition;
private List<FilterParameterSource> parameterSources;
public FilterDefSourceImpl(AnnotationInstance filerDefAnnotation) {
this.name = JandexHelper.getValue( filerDefAnnotation, "name", String.class );
this.condition = JandexHelper.getValue( filerDefAnnotation, "defaultCondition", String.class );
this.parameterSources = buildParameterSources( filerDefAnnotation );
public FilterDefSourceImpl(AnnotationInstance filterDefAnnotation) {
this.name = JandexHelper.getValue( filterDefAnnotation, "name", String.class );
this.condition = JandexHelper.getValue( filterDefAnnotation, "defaultCondition", String.class );
this.parameterSources = buildParameterSources( filterDefAnnotation );
}
private List<FilterParameterSource> buildParameterSources(AnnotationInstance filerDefAnnotation) {
private List<FilterParameterSource> buildParameterSources(AnnotationInstance filterDefAnnotation) {
final List<FilterParameterSource> parameterSources = new ArrayList<FilterParameterSource>();
for ( AnnotationInstance paramAnnotation : JandexHelper.getValue( filerDefAnnotation, "parameters", AnnotationInstance[].class ) ) {
for ( AnnotationInstance paramAnnotation : JandexHelper.getValue( filterDefAnnotation, "parameters", AnnotationInstance[].class ) ) {
parameterSources.add( new FilterParameterSourceImpl( paramAnnotation ) );
}
return parameterSources;

View File

@ -34,9 +34,9 @@ public class FilterSourceImpl implements FilterSource {
private final String name;
private final String condition;
public FilterSourceImpl(AnnotationInstance filerDefAnnotation) {
this.name = JandexHelper.getValue( filerDefAnnotation, "name", String.class );
this.condition = JandexHelper.getValue( filerDefAnnotation, "condition", String.class );
public FilterSourceImpl(AnnotationInstance filterAnnotation) {
this.name = JandexHelper.getValue( filterAnnotation, "name", String.class );
this.condition = JandexHelper.getValue( filterAnnotation, "condition", String.class );
}
@Override