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

gorm.tools.mango.jpql.JpqlQueryInfo.groovy Maven / Gradle / Ivy

There is a newer version: 7.3.74
Show newest version
/*
* Copyright 2022 Yak.Works - Licensed under the Apache License, Version 2.0 (the "License")
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
package gorm.tools.mango.jpql

import groovy.transform.CompileStatic

/**
 * The result of the JpqlQueryBuilder
 */
@CompileStatic
@SuppressWarnings("rawtypes")
class JpqlQueryInfo {

    String query
    List parameters

    JpqlQueryInfo(String query, List parameters) {
        this.query = query
        this.parameters = parameters
    }

    String getQuery() {
        return query
    }

    List getParameters() {
        return parameters
    }
    Map getParamMap() {
        Map pmap = [:]
        parameters.eachWithIndex{ v, i ->
            pmap["p${i+1}"] = v
        }
        return pmap
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy