I encountered this during object-relational mapping while creating a line mapper (in line> gt; = 1 To map objects) I was playing with, and you have to implement the This method has the method signature for row mapping (only 1 method) : DBUtilal method in the object based reflection based immediately and much more Type casting also excludes items Find out The meaning of spring is straightforward (easy by comparison). The question is because of the flexibility of the design that the style is better and when do you look at the latter reflection (in the form of the above)? I was just curious, so I thought I had put it to bring it to some ideas. In fact, why do you think that the DBUITLs have taken reflection based approach? Any advantages? In this case, the image of reflection (or huge switch statement, or whatever) has the advantage But covering the type of discontent. Callers tell what they are doing and that's what they get back. After this, they can continue to work with etc without any interference. You only need to manually check the type of protection in one place, the compiler will check it elsewhere. The returning object shows that there are many callers who can come up with each roproprocessor interface to keep your "self" row mapper. This method is a signature (1 out of 4 such methods, an object, list, map, and array are returning)
public & lt; T & gt; T. Toben (ResultText, Class & Lt; T & gt; type) throws SQL Consecitation {// conversion logic}
ClassCastException and should be checked manually.
Comments
Post a Comment