/*
 * blanco Framework
 * Copyright (C) 2004-2005 IGA Tosiki
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 */
package blanco.db.expander.query.caller;

import blanco.db.util.BlancoDbObjectStorageDotNet;
import blanco.ig.expander.implementor.Implementor;
import blanco.ig.expander.method.MethodExpander;

/**
 * @author IGA Tosiki
 */
public class PrepareCallMethodDotNet extends MethodExpander {
    public PrepareCallMethodDotNet(final BlancoDbObjectStorageDotNet storage) {
        super("PrepareCall");
    }

    public void setupSignature() {
        getJavaDoc().addLine("クエリのプリコンパイルを実施します。");
        getJavaDoc().addLine("内部的には SqlCommandオブジェクトを新規作成します。");
        getJavaDoc().addLine("あらかじめ与えられていたクエリ(SQL文)を利用します。");
    }

    public void implement() {
        final Implementor implementor = new Implementor(getData());
        implementor.addStatement("Close()");
        implementor.addStatement("PrepareCall(GetQuery())");
    }
}