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

org.catools.etl.model.CEtlVersions Maven / Gradle / Ivy

There is a newer version: 0.1.25
Show newest version
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