aspose file tools*
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Question about Part 2 assignment. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Question about Part 2 assignment." Watch "Question about Part 2 assignment." New topic
Author

Question about Part 2 assignment.

Robert Hoffman Jr.
Greenhorn

Joined: Mar 22, 2011
Posts: 1
Hi All,

I am doing part 2 assignment (Big Cigar) and have a question:
1. So far I have never seen Payment to be an entity, where as this is part of the Domain Model in assignment. I am having hard time imagining how to picture that as an entity.
To me it is more of a transactional attribute, which doesn't or shouldn't have any existence outside the transaction.

What you all suggest?

Thanks in advance.
Robert
Claudiu Dumitrescu
Greenhorn

Joined: Sep 09, 2008
Posts: 29
Well, perhaps you want to capture more details about the payments of the orders (cc or paypal or check, date, owner of the cc if it is the case etc).
I think it can be (0,1)-(1,1) with Orders entity, if there is such entity.
Sharma Ashutosh
Bartender

Joined: Apr 06, 2001
Posts: 346
It can be an entity-why not? Payment(One to One) is having relationship with Order as well as with Customer(One Customer many Payments). Like many eCommerce systems, you would also like to store/persist the details of payment-don't you think so?
Payment Transaction Request or Payment Transaction response could be transactional in nature.


Ashutosh Sharma
SCJP 1.2, SCEA 5, Brainbench certified J2EE Developer, Documentum Certified Professional
Blog : http://scea5-passingpart2and3.blogspot.com/
Yegor Bugayenko
Ranch Hand

Joined: Feb 11, 2011
Posts: 66
What is the difference between Payment and Transaction? It's the same entity, but a different name. I recommend to use Transaction, since not every Transaction is successful (some of them are failed).

An Order should have a one-to-many association with Transaction.


follow me at yegor256.com
Sharma Ashutosh
Bartender

Joined: Apr 06, 2001
Posts: 346
I think we are talking in somewhat different context. Here is what i have done. There is payment entity (which could be sub classed to credit card or paypal or bank account etc...). System creates a payment request containing the payment method and customer details and send it to Payment Service(Merchant Bank system) and it returns back Payment response which contains transaction code, status, description and some other details which are required in these kind of systems.
I don't think there is any need to make Payment request and Payment response as entity-they are classes but not persistent.
How i am gonna track the payments?
I have the audit and system log where i am recording all such activities for a given order.

How Order and Payment are related?
One order one payment-but both of them are different entities. Note I can follow Dell's style here where you can pay for the order from multiple credit cards or multiple payment ways but i wanted to make architecture simple to some extent.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question about Part 2 assignment.