1 24 25 package org.objectweb.cjdbc.controller.requestmanager; 26 27 import java.sql.SQLException ; 28 29 import org.objectweb.cjdbc.common.sql.AbstractRequest; 30 import org.objectweb.cjdbc.common.sql.schema.DatabaseSchema; 31 32 38 public class ParserThread extends Thread 39 { 40 private boolean isCaseSensitive; 41 private AbstractRequest request; 42 private DatabaseSchema dbs; 43 private int granularity; 44 45 53 public ParserThread( 54 AbstractRequest request, 55 DatabaseSchema dbs, 56 int granularity, 57 boolean isCaseSensitive) 58 { 59 this.request = request; 60 this.dbs = dbs; 61 this.granularity = granularity; 62 this.isCaseSensitive = isCaseSensitive; 63 start(); 64 } 65 66 69 public void run() 70 { 71 try 72 { 73 if (!request.isParsed()) 74 request.parse(dbs, granularity, isCaseSensitive); 75 } 76 catch (SQLException e) 77 { 78 System.err.println("Error while parsing request (" + e + ")"); 79 } 80 } 81 82 } 83 | Popular Tags |