Subversion Repositories SmartDukaan

Rev

Rev 3858 | Rev 4321 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3858 Rev 4211
Line 44... Line 44...
44
        try:
44
        try:
45
            cart = create_cart(-1)
45
            cart = create_cart(-1)
46
            return to_t_user(create_anonymous_user(jsessionId, cart))
46
            return to_t_user(create_anonymous_user(jsessionId, cart))
47
        finally:
47
        finally:
48
            UserDataAccessors.close_session()
48
            UserDataAccessors.close_session()
-
 
49
            CartDataAccessors.close_session()
-
 
50
 
49
    def getUserById(self, userId):
51
    def getUserById(self, userId):
50
        """
52
        """
51
        Parameters:
53
        Parameters:
52
        - userId
54
        - userId
53
        """
55
        """
Line 84... Line 86...
84
        """
86
        """
85
        try:
87
        try:
86
            cart = create_cart(-1)
88
            cart = create_cart(-1)
87
            return to_t_user(create_user(user, cart))
89
            return to_t_user(create_user(user, cart))
88
        finally:
90
        finally:
-
 
91
            CartDataAccessors.close_session()
89
            UserDataAccessors.close_session()
92
            UserDataAccessors.close_session()
90
            
93
            
91
    def updateUser(self, user):
94
    def updateUser(self, user):
92
        """
95
        """
93
        Parameters:
96
        Parameters:
Line 277... Line 280...
277
        - userId
280
        - userId
278
        """
281
        """
279
        try:
282
        try:
280
            return create_cart(userId).id
283
            return create_cart(userId).id
281
        finally:
284
        finally:
282
            UserDataAccessors.close_session()
285
            CartDataAccessors.close_session()
283
            
286
            
284
    def getCurrentCart(self, userId):
287
    def getCurrentCart(self, userId):
285
        """
288
        """
286
        Parameters:
289
        Parameters:
287
         - userId
290
         - userId