• Post Reply Bookmark Topic Watch Topic
  • New Topic

implement the blackbox java class  RSS feed

 
Raymond Chiu Wing Hing
Ranch Hand
Posts: 91
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,

Previously I used the other company class that are not open source. Now I want to escape from this. I have the class that need to implement to match other codes.
I think it is not so complicated and it is mainly java programming design. But I am not having so much knowledge on this. Do you have any ideas??
This is the class "MessagePool" and need to implement getMessage function with the some newly created variables in it if needed that I think.

// How to implement this function??


// where to call  messagePool

//The object that use messagePool


// Assign values to messagePool
 
Raymond Chiu Wing Hing
Ranch Hand
Posts: 91
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Some typo error, sorry:

// where to call  messagePool

//The object that use messagePool --> GenericDac


//The object that use messagePool --> Dac
 
Campbell Ritchie
Marshal
Posts: 56595
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please explain what this code is supposed to do. Giving a good explanation may make the answer become obvious to you.
 
Raymond Chiu Wing Hing
Ranch Hand
Posts: 91
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell Ritchie wrote:Please explain what this code is supposed to do. Giving a good explanation may make the answer become obvious to you.


It mainly display the string message text according to which language and which key id.
Like message bundle but in this time withdraw from db
 
Campbell Ritchie
Marshal
Posts: 56595
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Afraid that doesn't hep me much. If you are doing internationalisation please look in the Java™ Tutorials.
Only use website names com.core in package names if you own that website.
 
Knute Snortum
Sheriff
Posts: 4288
127
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I'm following you correctly, you want us to write a method that returns a message based on a language key and ID, looking for the message first from a cache, and if it fails, getting it from a DB and updating the cache.

Two problems:

First, we're not going to write code for you because we are NotACodeMill (that's a link).

Second, doing this would involve having an entire development suite with all your code and at least a mock DB setup.

My advice: give it a try yourself, then ask specific questions here.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!