1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.hr.lm.earncodesec.validation;
17
18
19 import org.kuali.hr.core.document.question.KpmeEffectiveDatePromptBase;
20 import org.kuali.hr.lm.earncodesec.EarnCodeSecurity;
21 import org.kuali.hr.time.service.base.TkServiceLocator;
22 import org.kuali.rice.krad.bo.PersistableBusinessObject;
23
24 public class EarnCodeSecurityEffectiveDatePrompt extends KpmeEffectiveDatePromptBase {
25 @Override
26 protected boolean futureEffectiveDateExists(PersistableBusinessObject pbo) {
27 EarnCodeSecurity earnCodeSecurity = (EarnCodeSecurity)pbo;
28 int numberOfNewer = TkServiceLocator.getEarnCodeSecurityService().getNewerEarnCodeSecurityCount(earnCodeSecurity.getEarnCode(), earnCodeSecurity.getEffectiveDate());
29 return numberOfNewer > 0;
30 }
31 }