view geo-backend/src/main/java/de/intevation/gnv/geobackend/base/DefaultResultDescriptor.java @ 141:b02310d7ffee

Make Classes Serializable for Storing in ArtifactDatabase geo-backend/trunk@131 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Thu, 24 Sep 2009 15:24:11 +0000
parents 5a583cff97ea
children 8aad9d098b08
line wrap: on
line source
/**
 *
 */
package de.intevation.gnv.geobackend.base;

import java.util.ArrayList;
import java.util.List;

/**
 * This Class is the DefaultImplementation of the
 * Interface ResultDescriptor
 * @author Tim Englich <tim.englich@intevation.de>
 *
 */
public class DefaultResultDescriptor implements ResultDescriptor {

    /**
     *The Uid of this Class
     */
    private static final long serialVersionUID = 7016889733270716130L;

    /**
     * The Names of the Columns of one Result
     */
    private List<String> columnNames = new ArrayList<String>();
    
    /**
     * The Name of the Classes of the Values of one Result.
     */
    private List<String> columnClassNames = new ArrayList<String>();
    
    
    
    /**
     * Constructor
     */
    public DefaultResultDescriptor() {
        super();
    }

    /**
     * @see de.intevation.gnv.geobackend.base.ResultDescriptor#getColumnClassName(int)
     */
    public String getColumnClassName(int column) {
        return this.columnClassNames.get(column);
    }

    /**
     * @see de.intevation.gnv.geobackend.base.ResultDescriptor#getColumnCount()
     */
    public int getColumnCount() {
        return this.columnClassNames.size();
    }

    /**
     * @see de.intevation.gnv.geobackend.base.ResultDescriptor#getColumnName(int)
     */
    public String getColumnName(int column) {
        return this.columnNames.get(column);
    }

    /**
     * @see de.intevation.gnv.geobackend.base.ResultDescriptor#addColumn(java.lang.String, java.lang.String)
     */
    public void addColumn(String name, String className) {
        this.columnClassNames.add(className);
        this.columnNames.add(name);
    }

}

http://dive4elements.wald.intevation.org