File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed
software/src/com/beer/business/service Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change
1
+ package com .user .business .service ;
2
+
3
+ import java .util .Collection ;
4
+ import com .user .business .data .UserDao ;
5
+ import com .user .business .data .UserDaoImpl ;
6
+ import com .user .business .domain .User ;
7
+ import java .util .Iterator ;
8
+
9
+ public class UserServiceImpl implements UserService {
10
+
11
+ public Collection findAll () {
12
+ UserDao userData = new UserDaoImpl ();
13
+ Collection users = userData .findAll (UserDao .ALL_BEER );
14
+ for (Iterator it =users .iterator (); it .hasNext (); ) {
15
+ User user = (User )it .next ();
16
+ System .out .println ("user.getName()=" + user .getName () + "user.getBrewer()=" + user .getBrewer ());
17
+ }
18
+ return users ;
19
+ }
20
+
21
+ public Collection findAllStates () {
22
+ UserDao userData = new UserDaoImpl ();
23
+ Collection states = userData .findAllStates (UserDao .ALL_STATES );
24
+ return states ;
25
+ }
26
+
27
+
28
+ public int create (User user ) {
29
+ UserDao userData = new UserDaoImpl ();
30
+ userData .create (UserDao .CREATE_BEER , user );
31
+ return 0 ;
32
+ }
33
+
34
+ public void runThisBranch () {
35
+ System .out .println ("test" );
36
+ }
37
+
38
+ }
You can’t perform that action at this time.
0 commit comments