List of usage examples for org.apache.commons.collections15.functors InstantiateFactory InstantiateFactory
public InstantiateFactory(Class<T> classToInstantiate)
From source file:gov.nih.nci.cabig.ctms.collections.LazyListHelperTest.java
@Override protected void setUp() throws Exception { super.setUp(); helper = new LazyListHelper(); helper.add(Object.class, new InstantiateFactory<Object>(Object.class)); helper.add(String.class, new InstantiateFactory<String>(String.class)); }
From source file:edu.duke.cabig.c3pr.domain.BookRandomization.java
/** * Instantiates a new book randomization. *//* ww w .ja va 2s . co m*/ public BookRandomization() { lazyListHelper = new LazyListHelper(); lazyListHelper.add(BookRandomizationEntry.class, new InstantiateFactory<BookRandomizationEntry>(BookRandomizationEntry.class)); }
From source file:edu.duke.cabig.c3pr.domain.ContactMechanismBasedRecipient.java
/** * Instantiates a new contact mechanism based recipient. *//*from ww w. ja v a 2 s .c om*/ public ContactMechanismBasedRecipient() { lazyListHelper = new LazyListHelper(); lazyListHelper.add(ContactMechanism.class, new InstantiateFactory<ContactMechanism>(ContactMechanism.class)); }
From source file:gov.nih.nci.cabig.ctms.collections.LazyListHelper.java
/** * Creates a list whose elements are the given type and whose contents will * be dynamically instantiated instances of the given class. The provided * class must have a public default constructor. If you need more elaborate * setup/initialization, use {@link #add(Class, Factory)}. * * @see InstantiateFactory/* w w w.j ava 2 s .c o m*/ */ public <T> void add(Class<T> klass) { add(klass, new InstantiateFactory<T>(klass)); }
From source file:edu.duke.cabig.c3pr.domain.StratificationCriterion.java
/** * Instantiates a new stratification criterion. *///from w w w .j a va 2s .c om public StratificationCriterion() { lazyListHelper = new LazyListHelper(); this.questionNumber = new Integer(0); lazyListHelper.add(StratificationCriterionPermissibleAnswer.class, new InstantiateFactory<StratificationCriterionPermissibleAnswer>( StratificationCriterionPermissibleAnswer.class)); }
From source file:edu.duke.cabig.c3pr.domain.StudySubjectStudyVersion.java
public StudySubjectStudyVersion() { lazyListHelper = new LazyListHelper(); lazyListHelper.add(StudySubjectConsentVersion.class, new InstantiateFactory<StudySubjectConsentVersion>(StudySubjectConsentVersion.class)); }
From source file:edu.duke.cabig.c3pr.domain.ScheduledNotification.java
/** * Instantiates a new scheduled notification. *//*w ww. ja v a 2 s .c o m*/ public ScheduledNotification() { lazyListHelper = new LazyListHelper(); lazyListHelper.add(RecipientScheduledNotification.class, new InstantiateFactory<RecipientScheduledNotification>(RecipientScheduledNotification.class)); }
From source file:edu.duke.cabig.c3pr.domain.StratumGroup.java
/** * Instantiates a new stratum group.// w ww. j ava 2 s. c o m */ public StratumGroup() { lazyListHelper = new LazyListHelper(); lazyListHelper.add(BookRandomizationEntry.class, new InstantiateFactory<BookRandomizationEntry>(BookRandomizationEntry.class)); lazyListHelper.add(StratificationCriterionAnswerCombination.class, new InstantiateFactory<StratificationCriterionAnswerCombination>( StratificationCriterionAnswerCombination.class)); currentPosition = new Integer(0); ResourceBundleMessageSource resourceBundleMessageSource = new ResourceBundleMessageSource(); resourceBundleMessageSource.setBasename("error_messages_multisite"); ResourceBundleMessageSource resourceBundleMessageSource1 = new ResourceBundleMessageSource(); resourceBundleMessageSource1.setBasename("error_messages_c3pr"); resourceBundleMessageSource1.setParentMessageSource(resourceBundleMessageSource); this.c3prErrorMessages = resourceBundleMessageSource1; this.c3PRExceptionHelper = new C3PRExceptionHelper(c3prErrorMessages); }
From source file:edu.duke.cabig.c3pr.domain.PlannedNotification.java
/** * Instantiates a new planned notification. *//*from www . jav a 2s . c o m*/ public PlannedNotification() { lazyListHelper = new LazyListHelper(); lazyListHelper.add(UserBasedRecipient.class, new InstantiateFactory<UserBasedRecipient>(UserBasedRecipient.class)); lazyListHelper.add(RoleBasedRecipient.class, new InstantiateFactory<RoleBasedRecipient>(RoleBasedRecipient.class)); lazyListHelper.add(ContactMechanismBasedRecipient.class, new InstantiateFactory<ContactMechanismBasedRecipient>(ContactMechanismBasedRecipient.class)); lazyListHelper.add(ScheduledNotification.class, new InstantiateFactory<ScheduledNotification>(ScheduledNotification.class)); }
From source file:gov.nih.nci.cabig.caaers.domain.Participant.java
/** * Instantiates a new participant./*from w w w. j a va 2s. c om*/ */ public Participant() { lazyListHelper = new LazyListHelper(); // register with lazy list helper study site. lazyListHelper.add(Identifier.class, new InstantiateFactory<Identifier>(Identifier.class)); dateOfBirth = new DateValue(); }