private void writeIndexKeys() {
        String mapperName = table.getDomName() + "Dao";
        StringBuilder sb = new StringBuilder();

        for ( IndexNode node : table.getIndexList() ) {
        	String methodName = "readByIndex" + toTitleCase( node.getIndexName());
            String param = "";
            for(Column col : node.getColumnList()){
            	param += col.getFldType() + " " + col.getFldName() + ", ";
            }
            param = param.substring( 0, param.length() - 2 );
            sb.append( TAB + "public " + table.getDomName() + " " + methodName + "( "  );
            sb.append( param + " ) throws BoException" );
            sb.append( "{\n" );

            sb.append( TAB + TAB + "SqlSession session = null;\n" );
            sb.append( TAB + TAB + table.getDomName() + " result;\n" );

            sb.append( TAB + TAB + "try {\n" );
            sb.append( TAB + TAB + TAB + "session = SessionFactory.getSession();\n" );
            sb.append( TAB + TAB + TAB + mapperName );
            sb.append( " mapper = session.getMapper( " + mapperName + ".class );\n" );
            param = "";
            for(Column col : node.getColumnList()){
            	param += col.getFldName() + ", ";
            }
            param = param.substring( 0, param.length() - 2 );
            sb.append( TAB + TAB + TAB + "result = mapper." + methodName +"( " + param + " );\n" );
            sb.append( TAB + TAB + TAB + "session.commit();\n\n" );
            sb.append( TAB + TAB + "} catch ( Exception e ) {\n" );
            sb.append( TAB + TAB + TAB + "session.rollback();\n" );
            sb.append( TAB + TAB + TAB + "throw new BoException( e );\n\n" );
            sb.append( TAB + TAB + "} finally { \n" );
            sb.append( TAB + TAB + TAB + "if ( session != null )\n" );
            sb.append( TAB + TAB + TAB + TAB + "session.close();\n" );
            sb.append( TAB + TAB + "}\n\n" );
            sb.append( TAB + TAB + "return result;\n" );
            sb.append( TAB + "}\n" );
        }

        write( sb.toString() );
    }