Created
December 12, 2014 18:42
-
-
Save bytekast/038323353e196eb05178 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List<ModelAnnotation<?>> annotations = new ArrayList<ModelAnnotation<?>>(); | |
annotations.add( new ModelAnnotation<Measure>( "field1", new Measure() ) ); | |
annotations.add( new ModelAnnotation<Attribute>( "field2", new Attribute() ) ); | |
annotations.add( new ModelAnnotation<Dimension>( "field2", new Dimension() ) ); | |
annotations.add( new ModelAnnotation<HierarchyLevel>( "field3", new HierarchyLevel() ) ); | |
annotations.add( new ModelAnnotation<Measure>( "field4", new Measure() ) ); | |
for ( ModelAnnotation<?> modelAnnotation : annotations ) { | |
// do something with modelAnnotation - what is it? a measure, dimension, etc.... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@kurtwalker not sure that would satisfy every scenario. some external logic may need to know what type it is and does not want the model annotation itself to act. for example: UI-related stuff....