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

io.github.fsixteen.data.jpa.base.generator.plugins.SplitNotInBuilderPlugin Maven / Gradle / Ivy

The newest version!
package io.github.fsixteen.data.jpa.base.generator.plugins;

import java.util.Arrays;

import io.github.fsixteen.data.jpa.base.generator.annotations.plugins.SplitNotIn;
import io.github.fsixteen.data.jpa.base.generator.plugins.constant.ComparableType;
import io.github.fsixteen.data.jpa.base.generator.plugins.descriptors.AnnotationDescriptor;

/**
 * 有关{@link io.github.fsixteen.data.jpa.base.generator.annotations.plugins.SplitNotIn}注解解释器.
* * @author FSixteen * @since 1.0.0 */ public class SplitNotInBuilderPlugin extends InBuilderPlugin { public SplitNotInBuilderPlugin() { super(ComparableType.SPLIT_NOT_IN); } @Override Object transition(AnnotationDescriptor ad, Object fieldValue) { if (null != fieldValue && String.class.isInstance(fieldValue)) { return Arrays.asList(String.class.cast(fieldValue).split(ad.getAnno().decollator())); } return fieldValue; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy