/* Generated by Together */

package cobalt.deployment.descriptor.dist;

import java.util.ArrayList;

/**
 * Title:        WebLogic 6.x finder descriptor
 * Description:  Represents WebLogic 6.x-specific finder of dbms configuration
 * Copyright:    Copyright (c) 2001
 * Company:      ETRI
 * @author Yeon Jun Choi
 * @version 1.0
 */

public class Weblogic60Finder {
    public Weblogic60Finder() {
        params = new ArrayList();
    }
    public String getName(){
            return name;
        }

    public void setName(String name){
            this.name = name;
        }

    public ArrayList getParams(){
            return params;
        }

    public void setParams(ArrayList params){
            this.params = params;
        }

    public void setParams(String[] params){
            for ( int i=0 ; i<params.length; i++)
                this.params.add(params[i]);
        }

    public String getQuery(){
            return query;
        }

    public void setQuery(String query){
            this.query = query;
        }

    public String isUpdateString(){
            return update;
        }

    public boolean isUpdate(){
            return Boolean.getBoolean(update);
        }

    public void setUpdate(String update){
            this.update = update;
        }

    public String getFinderString() {
        return name + '(' + getParamsString() + ')';
    }
    public String getParamsString() {
        String ret = "";
        for ( int i=0 ; i<params.size(); i++) {
            ret += params.get(i);
            if ( i < params.size() - 1)
                ret += ',';
        }
        return ret;
    }

    private String name;
    private String query;
    private String update;
    private ArrayList params;
}
