Advertisement
Guest User

factory

a guest
Feb 22nd, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. package fachkonzept;
  2.  
  3. import java.io.IOException;
  4. import java.sql.SQLException;
  5.  
  6. import datenhaltung.IDatenhaltung;
  7.  
  8. public class FachkonzeptFactory {
  9.  
  10. public IFachkonzept getFachkonzept(String fkType, IDatenhaltung db) throws SQLException, IOException{
  11. if(fkType == null){
  12. return null;
  13. }
  14. if(fkType.equalsIgnoreCase("ASCENDING")){
  15. return new Fachkonzept1(db);
  16. } else if(fkType.equalsIgnoreCase("DESCENDING")){
  17. return new Fachkonzept2(db);
  18. }
  19. return null;
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement