on 05-31-2007 3:35 AM
Dear all,
I'm using MDM 5.5 SP05.
I need to search for some records. So I need to get the table ID, which is the parameter of the <b>Search</b> class's constructor. In order to get the table ID, I have to use class <b>GetRepositorySchemaCommand</b>, which is based on repository session.
I'm confused. Search operation should only be based on user session, from my perspective. But in the above procedure a repository session is built. Is it necessary or there's any alternative?
Thanks + Best Regards
Jerome
Hello Jerome,
I'm afraid, you need the code for access to MDM tables.
I suppossed when you say table ID you mean the Code, isn't it?
Usually we add the code as hardcode value (declare constants with table codes and fields codes in DAOs classes).
For example, for to search in table "Vendors":
Search search = new Search(Vendors.Vendor_table_Name);
where Vendors is the DAO class and Vendor_Table_Name is a constant with value "Vendors".
The problem is that you need the same "schema" in all enviornments.
You can see the code through Console Manager.
Hope it helps!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Yaiza,
I'm afraid the table ID and table code is not the same. The constructor of Search class is like this:
Search(TableId searchTableId)
So I have to give it an instance of class TableId as parameter. The problem is that at the moment I cannot get the TableId instance without using repository session.
Can you give more detailed information about the usage of DAO class in MDM API? I didn't find the class "Vendors" in MDM Java API document .
Thanks + Best Regards
Jerome
Hello again,
"Vendors" is a table from my project it was an example. You should use tables from your MDM Repository.
About DAO classes you have to implement them. They should correspond to low level methods that access directly to the table. Coming back to the example, in Vendors DAO class you could define methods like:
getAllvendors();
getVendorById(String vendorId);
getVendorByName(String Name);
...
You can find lot of manuals about building EJB and the VO-DAO arquitecture.
Good luck!!
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.