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

org.simpleflatmapper.map.property.AutoGeneratedProperty 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.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);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy