For this particular case, the annotations are driving the data comparison processing so we’re actually evaluating the annotations that we find on the mapped data bean and using those to direct the processing.As others pointed out, annotations are metadata about classes / properties / methods. Here’s an example from the ReconField )Īs you can see, we’ve designed quite of bit of flexibility into a data verification report for multiple databases by just using a couple of fairly simple annotations. To do that you’ll need to create a new type that uses the Java type that will contain the elements that specify the details of the metadata. If you’ve been doing Java programming for a while now you should be pretty familiar with their use, but maybe you’ve never had a need to create your own. In the simplest terms, an annotation is nothing more than a marker, metadata that provides information but has no direct effect on the operation of the code itself. Instead you’ll be able to look at the annotation associated with a field to know exactly how it will be processed. These annotations will be at the field level and I like the fact that the configuration won’t be hidden away in a file somewhere on the classpath. We needed something that was somewhat simple, yet highly flexible and extensible. Any row that doesn’t match according to the data verification rules should be highlighted in yellow.Īfter going over the requirements and knocking around a few ideas, I decided to use annotations to drive the configuration for the data comparison and reporting process.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |