org.simpleflatmapper.map.property.AutoGeneratedProperty Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sfm-map Show documentation
Show all versions of sfm-map Show documentation
Java library to map flat record - ResultSet, csv - to java object with minimum configuration and low footprint.
The newest version!
package org.simpleflatmapper.map.property;
public class AutoGeneratedProperty {
public static final AutoGeneratedProperty DEFAULT = new AutoGeneratedProperty(null);
private final String expression;
public AutoGeneratedProperty(String expression) {
this.expression = expression;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
AutoGeneratedProperty that = (AutoGeneratedProperty) o;
return expression != null ? expression.equals(that.expression) : that.expression == null;
}
@Override
public int hashCode() {
return expression != null ? expression.hashCode() : 0;
}
@Override
public String toString() {
return "AutoGeneratedProperty{" +
"expression='" + expression + '\'' +
'}';
}
public String getExpression() {
return expression;
}
public static AutoGeneratedProperty of(String expression) {
return new AutoGeneratedProperty(expression);
}
}