com.github.rkmk.mapper.AnnotatedField Maven / Gradle / Ivy
package com.github.rkmk.mapper;
import com.github.rkmk.annotations.OneToMany;
import com.github.rkmk.annotations.OneToOne;
import com.github.rkmk.annotations.PrimaryKey;
import java.lang.reflect.Field;
import java.util.*;
public class AnnotatedField {
private Field field;
private Class> annotationType;
private Class> type;
private String nameSpace;
public AnnotatedField(Field field, Class> annotationType, Class> type) {
this.field = field;
this.annotationType = annotationType;
this.type = type;
this.nameSpace = nameSpace();
}
public void set(Object object, Object value) {
if(isOneToOne()) {
FieldHelper.set(field, object, value);
}else if(isOneToMany()) {
FieldHelper.set(field, object, getContainerValue(value));
}
}
private Collection
© 2015 - 2025 Weber Informatics LLC | Privacy Policy