• 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 ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

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.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic