1 package org.apache.ojb.tutorial1; 2 3 17 18 import org.apache.ojb.broker.PersistenceBroker; 19 20 import java.io.BufferedReader ; 21 import java.io.InputStreamReader ; 22 23 26 public abstract class AbstractUseCase implements UseCase 27 { 28 29 protected PersistenceBroker broker; 30 31 37 public AbstractUseCase(PersistenceBroker broker) 38 { 39 this.broker = broker; 40 } 41 42 48 protected String readLineWithMessage(String message) 49 { 50 System.out.print(message + " "); 51 52 try 53 { 54 BufferedReader rin = new BufferedReader (new InputStreamReader (System.in)); 55 56 return rin.readLine(); 57 } 58 catch (Exception ex) 59 { 60 return ""; 61 } 62 } 63 } 64 | Popular Tags |