• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown

Auto-wiring dependencies with dynamic parameters

Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I have multiple implementations of an employee interface - each one representing a particular employee type based on salary classification(HourlyEmployee,MonthlyEmployee etc.)
Each Employee type contains a PayClassification member.The PaymentClassification class has a single member 'schedule'.

A client class ExecutePay instantiates a particular EmployeeType and queries for its PaymentType.
The metadata file is as follows:

TO have PayClassification have a unique value of 'schedule' for each employee type,the easiest solution is to create a unique PayClassification 'resource' corresponding to each employee type and autowire that.
But that is not an ideal extensible solution.
Is there a way to autowire PayClassification with a unique 'schedule' value for every employee type being defined in the system dynamically.
    Bookmark Topic Watch Topic
  • New Topic