package ordering.common.model;
import ordering.common.vo.*;
import ordering.common.exceptions.*;
import java.util.Collection;
import java.util.Properties;
import ordering.custom.Constants;
import java.io.*;
public class OrderingModelFactory
{
public
final static OrderingModel create()
throws NotFoundException
{
try {
String
className = "ordering.custom.OrderingModelEJBImpl";
Properties props = new Properties();
props.load(OrderingModelFactory.class.getClassLoader().getResourceAsStream(Constants.SERVICEPROPERTIESFILE));
className =
props.getProperty("OrderingModelImpl");
Class cls = Class.forName(className);
return (OrderingModel)cls.newInstance();
}
catch (Exception e) {
System.out.println(e.getMessage());
throw new NotFoundException();
}
}
}