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

org.teamapps.pojo.template.UdbQuery.txt Maven / Gradle / Ivy

There is a newer version: 0.7.3
Show newest version
package {package};

import org.teamapps.universaldb.*;
import org.teamapps.universaldb.index.*;
import org.teamapps.universaldb.index.text.*;
import org.teamapps.universaldb.index.translation.*;
import org.teamapps.universaldb.index.bool.*;
import org.teamapps.universaldb.index.numeric.*;
import org.teamapps.universaldb.index.file.*;
import org.teamapps.universaldb.index.enumeration.*;
import org.teamapps.universaldb.index.reference.multi.*;
import org.teamapps.universaldb.index.reference.single.*;
import org.teamapps.universaldb.index.binary.*;
import org.teamapps.universaldb.pojo.*;
import org.teamapps.universaldb.pojo.template.*;
import org.teamapps.universaldb.transaction.*;
import org.teamapps.universaldb.record.*;
import org.teamapps.universaldb.query.*;

import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
{imports}

public class {udbQuery} extends AbstractUdbQuery<{type}> implements {query} {

    public {udbQuery}() {
        super({udbType}.table, {type}.getBuilder());
    }

	@Override
	public {query} fullTextFilter(TextFilter textFilter, String... fieldNames) {
    	and({udbType}.table.createFullTextFilter(textFilter, fieldNames));
		return this;
	}

	@Override
	public {query} parseFullTextFilter(String query, String... fieldNames) {
    	and({udbType}.table.createFullTextFilter(query, fieldNames));
		return this;
	}

{methods}
	@Override
	public {udbQuery} andOr({query} ... queries) {
	    AbstractUdbQuery[] abstractUdbQueries = Arrays.copyOf(queries, queries.length, AbstractUdbQuery[].class);
		andOr(abstractUdbQueries);
		return this;
	}

    @Override
    public {query} customFilter(Function<{type}, Boolean> customFilter) {
        Function filterFunction = id -> {
            return customFilter.apply({type}.getById(id));
        };
        and(new CustomEntityFilter(filterFunction));
        return this;
    }

}







© 2015 - 2025 Weber Informatics LLC | Privacy Policy