devutility.internal.lang.models.EntityFieldUtils Maven / Gradle / Ivy
package devutility.internal.lang.models;
import java.util.List;
import devutility.internal.util.CollectionUtils;
public class EntityFieldUtils {
public static List includeEntityFields(List entityFields, List includeFields) {
if (CollectionUtils.isNullOrEmpty(entityFields) || CollectionUtils.isNullOrEmpty(includeFields)) {
return entityFields;
}
return CollectionUtils.list(entityFields, i -> i.getField() != null && includeFields.contains(i.getField().getName()));
}
public static List excludeEntityFields(List entityFields, List excludeFields) {
if (CollectionUtils.isNullOrEmpty(entityFields) || CollectionUtils.isNullOrEmpty(excludeFields)) {
return entityFields;
}
return CollectionUtils.list(entityFields, i -> i.getField() != null && !excludeFields.contains(i.getField().getName()));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy