private void writeMethodBodyReadDelete( String type ) {
        String mapperName = table.getDomName() + "Dao";
        write( TAB + TAB + "SqlSession session = null;\n" );

        if ( type.equalsIgnoreCase( "read" ) ) {
            write( TAB + TAB + table.getDomName() + " result;\n" );
        }
        else {
            write( TAB + TAB + "int result = 0;\n" );
        }

        write( NEWLINE );
        write( TAB + TAB + "try {\n" );
        write( TAB + TAB + TAB + "session = SessionFactory.getSession();\n" );

        write( TAB + TAB + TAB + mapperName );
        write( " mapper = session.getMapper( " + mapperName + ".class );\n" );
        write( TAB + TAB + TAB + "result = mapper." + type + "( " );
        
        String param = "";
        for(Column col : keyColumns){
        	param += col.getFldName() + ", ";
        }
        param = param.substring( 0, param.length() - 2 );
        write( param + " );\n" );
        
        write( TAB + TAB + TAB + "session.commit();\n\n" );

        write( TAB + TAB + "} catch ( Exception e ) {\n" );
        write( TAB + TAB + TAB + "session.rollback();\n" );
        write( TAB + TAB + TAB + "throw new BoException( e );\n\n" );

        write( TAB + TAB + "} finally { \n" );
        write( TAB + TAB + TAB + "if ( session != null )\n" );
        write( TAB + TAB + TAB + TAB + "session.close();\n" );
        write( TAB + TAB + "}\n\n" );
        write( TAB + TAB + "return result;\n" );
        write( TAB + "}\n" );
    }