Created
January 11, 2018 22:52
-
-
Save drewbrokke/c39d8160b947567f117f1fbc8245cd90 to your computer and use it in GitHub Desktop.
Entity Validator
This file contains hidden or 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
protected <T extends UADEntity> T validate( | |
UADEntity uadEntity, Class<T> clazz) throws UADEntityException { | |
if (!(clazz.isAssignableFrom(uadEntity.getClass()))) { | |
throw new UADEntityException(); | |
} | |
return (T)uadEntity; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment