org.simpleflatmapper.map.property.DiscriminatorColumnProperty Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sfm-map Show documentation
Show all versions of sfm-map Show documentation
Java library to map flat record - ResultSet, csv - to java object with minimum configuration and low footprint.
package org.simpleflatmapper.map.property;
import org.simpleflatmapper.reflect.property.EligibleAsNonMappedProperty;
import org.simpleflatmapper.util.Predicate;
import org.simpleflatmapper.util.TypeHelper;
import java.lang.reflect.Type;
public class DiscriminatorColumnProperty implements Predicate, EligibleAsNonMappedProperty {
private final Type commonType;
public DiscriminatorColumnProperty(Type commonType) {
this.commonType = commonType;
}
@Override
public boolean test(Type type) {
return TypeHelper.isAssignable(commonType, type);
}
}