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

com.jaregu.database.queries.ext.OrderableSearch Maven / Gradle / Ivy

Go to download

Java based SQL templating project. Store your queries in *.sql files and build queries for execution. Supports simple expressions and conditional clauses and interface proxying for java-sql bridge.

There is a newer version: 1.4.1
Show newest version
package com.jaregu.database.queries.ext;

import java.util.List;

import com.jaregu.database.queries.dialect.Orderable;

public interface OrderableSearch> extends Orderable {

	T withOrderBy(List orderBy);

	default boolean hasSortProperties() {
		return getOrderBy() != null && !getOrderBy().isEmpty();
	}

	default T withAsc(String property) {
		return withOrderBy(OrderBy.of(getOrderBy()).asc(property));
	}

	default T withDesc(String property) {
		return withOrderBy(OrderBy.of(getOrderBy()).desc(property));
	}

	default T asc(String property) {
		return withOrderBy(OrderBy.asc(property));
	}

	default T desc(String property) {
		return withOrderBy(OrderBy.desc(property));
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy