[Logo]
Forums Register Login
Creating a generic bean
Hi guys,

I am a newbie to EJBs - so this may be a very naive query.

Consider this scenario - we have two database tables :
1. EmployeeManager with columns
ManagerEmployeeID and EmployeeID

eg,
100 - 101
100 - 102
100 - 103

and
2. DepartmentLocations with columns

DepartmentID and LocationOD
eg,
105 - 110
105 - 1002

etc

The process to get all employees under a manager and all locations of a department is the same.
I would like to create a generic EJB which could retrieve data for any such table. Ok - more clearly, we should be able to dynamically set the column name of the primary key and the table name from where the data must be retrieved.

Is this possible with a CMB ? Any pointers/tutorials/sample code would be hugely appreciated.

Thanks
Sathya
Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards


This thread has been viewed 446 times.

All times above are in ranch (not your local) time.
The current ranch time is
Dec 18, 2017 15:23:01.