Campbell Ritchie wrote:Welcome to the Ranch
So, you have recipients with phone numbers, and you have messages sent to phone numbers? You want to check that the recipient't phone number matches the message's phone number, along with some other details. I have my own ideas, but I shall make you work to see if you can't get your own ideas.
I am going to suggest you draw a diagram of your recipients and messages, with phone numbers. You only need about three of each. Draw arrows showing which message links to which recipient if any.
Also go through the Java™ Tutorials and see if you can find anything that matches your diagram.
Campbell Ritchie wrote:
Now it seems Junilu and I were thinking differently. I was thinking to map NumberTime to Message and also to map NumberTime to User, and then see how much of an overlap there is of the two data structures.
Junilu Lacar wrote:So, on the "User" object, the time indicates the time when a message was last successfully delivered to that user? And that time would match the Message.deliveryTime to indicate successful delivery. Otherwise, the user didn't get the Message that's in the list of Messages that you're trying to match up. Is this correct?
Junilu Lacar wrote:Also, matching by phone number and time seems to be a brittle design to me. If we pull data modeling practices into the picture, you'd want to normalize and give a unique message Identifier to each Message. Then the User object would just have the message Id instead of a set of multiple fields that could change in the future. In this case, the name User becomes obviously misleading and we'd be compelled to change it to something that correctly describes its role/purpose: something like ExpectedDelivery instead perhaps.
I am displeased. You are no longer allowed to read this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|