
org.sfm.reflect.meta.JpaAliasProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of simpleFlatMapper Show documentation
Show all versions of simpleFlatMapper Show documentation
Java library to map flat record - ResultSet, csv - to java object with minimum configuration and low footprint.
package org.sfm.reflect.meta;
import javax.persistence.Column;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
public class JpaAliasProvider implements AliasProvider {
@Override
public String getAliasForMethod(Method method) {
String alias = null;
Column col = method.getAnnotation(Column.class);
if (col != null) {
alias = col.name();
}
return alias;
}
@Override
public String getAliasForField(Field field) {
String alias = null;
Column col = field.getAnnotation(Column.class);
if (col != null) {
alias = col.name();
}
return alias;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy