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

com.github.magrifle.data.searchapi.SearchOperation Maven / Gradle / Ivy

Go to download

A library that helps you instantly turn your Spring powered endpoints into a query engine. It makes use of AOP to intercept the calls to your Controller or RestController endpoints and then builds a Specification from the provided query parameters

There is a newer version: 2.0.13
Show newest version
package com.github.magrifle.data.searchapi;

import java.util.HashMap;
import java.util.Map;

public enum SearchOperation {
    EQUALITY, NEGATION, GREATER_THAN, LESS_THAN, LIKE, STARTS_WITH, ENDS_WITH, CONTAINS;

    public static final Map SIMPLE_OPERATION_SET;

    static {
        SIMPLE_OPERATION_SET = new HashMap<>();
        SIMPLE_OPERATION_SET.put(':', EQUALITY);
        SIMPLE_OPERATION_SET.put('!', NEGATION);
        SIMPLE_OPERATION_SET.put('>', GREATER_THAN);
        SIMPLE_OPERATION_SET.put('<', LESS_THAN);
        SIMPLE_OPERATION_SET.put('~', LIKE);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy