1 24 25 package org.objectweb.cjdbc.console.text.commands.sqlconsole; 26 27 import java.io.IOException ; 28 29 import org.objectweb.cjdbc.common.i18n.ConsoleTranslate; 30 import org.objectweb.cjdbc.console.text.ConsoleException; 31 import org.objectweb.cjdbc.console.text.commands.ConsoleCommand; 32 import org.objectweb.cjdbc.console.text.module.VirtualDatabaseConsole; 33 34 39 public class SetMaxRows extends ConsoleCommand 40 { 41 42 47 public SetMaxRows(VirtualDatabaseConsole module) 48 { 49 super(module); 50 } 51 52 55 public void parse(String commandText) throws IOException , ConsoleException 56 { 57 try 58 { 59 int maxrows = new Integer (commandText.trim()).intValue(); 60 ((VirtualDatabaseConsole)module).setMaxrows(maxrows); 61 console.println(ConsoleTranslate.get("sql.command.maxrows.value", 62 maxrows)); 63 } 64 catch (NumberFormatException e) 65 { 66 console.printError(getUsage()); 67 } 68 } 69 70 73 public String getCommandName() 74 { 75 return "maxrows"; 76 } 77 78 81 public String getCommandParameters() 82 { 83 return ConsoleTranslate.get("sql.command.maxrows.params"); 84 } 85 86 89 public String getCommandDescription() 90 { 91 return ConsoleTranslate.get("sql.command.maxrows.description"); 92 } 93 } | Popular Tags |