/*
 * Copyright (C) 2012 Darth Affe <http://wyrez.org> and contributors
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
package org.wyrez.persij;

/**
 *
 * @author Darth Affe
 */
public final class PersiJParamMapping {

    private Class type;
    private Object[] params;
    private int paramMappingId;

    public PersiJParamMapping(Class type, Object... params) {
        this(-1, type, params);
    }

    public PersiJParamMapping(int paramMappingId, Class type, Object... params) {
        this.type = type;
        this.params = params;
        this.paramMappingId = paramMappingId;
    }

    /**
     * Returns the Type to which the ParamMapping belongs
     *
     * @return Type of the ParamMapping
     */
    public final Class getType() {
        return type;
    }

    /**
     * Returns the mapped parameters
     *
     * @return Array with mapped parameters
     */
    public final Object[] getParams() {
        return params;
    }

    /**
     * Returns the id of the mapping
     *
     * @return id of the mapping
     */
    public final int getParamMappingId() {
        return paramMappingId;
    }
}
