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

net.sf.jett.jdbc.ResultSetRow Maven / Gradle / Ivy

Go to download

JETT is a Java API that reads an Excel spreadsheet as a template, takes your data, and creates a new Excel spreadsheet that contains your data, formatted as in the template. It works with .xls and .xlsx template spreadsheets.

The newest version!
package net.sf.jett.jdbc;

import java.util.HashMap;
import java.util.Map;

/**
 * A ResultSetRow contains data from one row of a
 * ResultSet.  Its {@link #get get} and
 * {@link #set set} methods allow easy property manipulation.
 * Plus, the get method allows dynamic properties to be accessed
 * in JETT via JEXL Expressions, e.g ${employee.first_name} is
 * accessed via a call to employee.get("first_name"), since the
 * getFirstName() method would not be found.
 *
 * @author Randy Gettman
 * @since 0.6.0
 */
public class ResultSetRow
{
    private Map myValues;

    /**
     * Constructs an empty ResultSetRow.
     */
    public ResultSetRow()
    {
        myValues = new HashMap<>();
    }

    /**
     * Sets the given property string name to the given value.
     * @param property The property string name.
     * @param value The value.
     */
    public void set(String property, Object value)
    {
        myValues.put(property.toLowerCase(), value);
    }

    /**
     * Returns the value for a given property string name.
     * @param property A property string name.
     * @return The value, or null if the property string name did
     *    not exist.
     */
    public Object get(String property)
    {
        return myValues.get(property.toLowerCase());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy