/*
 * 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;

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

/**
 * @author Yasuo Nakanishi
 */
public class PrepareStatementMethodDotNet extends MethodExpander {
    public PrepareStatementMethodDotNet(
            final BlancoDbObjectStorageDotNet storage) {
        super("PrepareStatement");
    }

    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("PrepareStatement(GetQuery())");
    }
}