org.catools.etl.model.CEtlVersions Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of etl Show documentation
Show all versions of etl Show documentation
The base ETL to be used in other CATools project as a base contract.
package org.catools.etl.model;
import org.catools.common.collections.CSet;
import org.catools.common.text.CStringUtil;
import java.util.Objects;
import java.util.stream.Stream;
public class CEtlVersions extends CSet {
public CEtlVersions() {
}
public CEtlVersions(CEtlVersion... c) {
super(c);
}
public CEtlVersions(Stream stream) {
super(stream);
}
public CEtlVersions(Iterable iterable) {
super(iterable);
}
public CEtlVersion getById(String id) {
return getFirstOrNull(v -> CStringUtil.equals(v.getId(), id));
}
public CEtlVersion getByNameForProject(String name) {
return getFirst(v -> CStringUtil.equalsIgnoreCase(name, v.getName()));
}
public CEtlVersion getByNameForProject(String name, CEtlProject project) {
Objects.requireNonNull(project);
return getFirst(v -> CStringUtil.equalsIgnoreCase(name, v.getName()) && v.getProject().equals(project));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy