Created
October 22, 2013 13:01
-
-
Save stalep/7100327 to your computer and use it in GitHub Desktop.
reduce the number of reflection calls from EntityTuplizer in hibernate
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
public interface HibernateValueMapper { | |
void $hibernate_setValue(Object value, String fieldName); | |
} | |
bytecode impl in entities: | |
... | |
public void $hibernate_setValue(Object value, String fieldName) { | |
if(fieldName == "name") | |
name = (String) value; | |
else if(fieldName == "address"; | |
address = (Address) value; | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment