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