All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jpattern.orm.annotation.column.ColumnInfoFactory Maven / Gradle / Ivy

There is a newer version: 6.3.0
Show newest version
package com.jpattern.orm.annotation.column;

import java.lang.reflect.Field;

import com.jpattern.orm.annotation.Column;

/**
 * 
 * @author cinafr
 *
 */
public class ColumnInfoFactory {

	private ColumnInfoFactory() {}

	public static ColumnInfo getColumnInfo(final Field field) {
		Column column = field.getAnnotation(Column.class);
		if (column!=null) {
			return new AnnotationColumnInfo(column.name());
		}
		return new InferedColumnName(field.getName());
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy