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

org.simpleflatmapper.jdbc.named.NamedParameter Maven / Gradle / Ivy

Go to download

Java library to map flat record - ResultSet, csv - to java object with minimum configuration and low footprint.

The newest version!
package org.simpleflatmapper.jdbc.named;

public class NamedParameter extends Symbol {
    private final String name;

    public NamedParameter(String name, Position position) {
        super(position);
        this.name = stripQuotes(name);
    }

    private String stripQuotes(String name) {
        if (name.startsWith("\"")) {
            if (name.endsWith("\"")) {
                return name.substring(1, name.length() -1);
            }
        }
        if (name.startsWith("`")) {
            if (name.endsWith("`")) {
                return name.substring(1, name.length() -1);
            }
        }
        return name;
    }

    public String getName() {
        return name;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy