org.simpleflatmapper.jdbc.named.NamedParameter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sfm-jdbc Show documentation
Show all versions of sfm-jdbc Show documentation
Java library to map flat record - ResultSet, csv - to java object with minimum configuration and low footprint.
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;
}
}