Search in sources :

Example 6 with FCEligibility

use of gov.ca.cwds.data.legacy.cms.entity.FCEligibility in project api-core by ca-cwds.

the class R11126Test method createListOfValidChildClientEligibilities.

private static List<FCEligibility> createListOfValidChildClientEligibilities() {
    FCEligibility eligibility1 = createFcEligibility(CLIENT_ID, CLIENT_BIRTH_DAY);
    FCEligibility eligibility2 = createFcEligibility(CLIENT_ID, CLIENT_BIRTH_DAY.plusMonths(1));
    FCEligibility eligibility3 = createFcEligibility(CLIENT_ID, CLIENT_BIRTH_DAY.plusDays(100));
    FCEligibility eligibility4 = createFcEligibility(CLIENT_ID, CLIENT_BIRTH_DAY.plusYears(1));
    return Arrays.asList(eligibility1, eligibility2, eligibility3, eligibility4);
}
Also used : FCEligibility(gov.ca.cwds.data.legacy.cms.entity.FCEligibility)

Example 7 with FCEligibility

use of gov.ca.cwds.data.legacy.cms.entity.FCEligibility in project api-core by ca-cwds.

the class FCEligibilityDao method findByChildClientId.

public List<FCEligibility> findByChildClientId(String childClientId) {
    Session session = this.getSessionFactory().getCurrentSession();
    Query<FCEligibility> query = session.createNamedQuery(FCEligibility.FIND_BY_CLIENT, FCEligibility.class);
    query.setParameter("childId", childClientId);
    ImmutableList.Builder<FCEligibility> entities = new ImmutableList.Builder<>();
    entities.addAll(query.list());
    return entities.build();
}
Also used : FCEligibility(gov.ca.cwds.data.legacy.cms.entity.FCEligibility) ImmutableList(com.google.common.collect.ImmutableList) Session(org.hibernate.Session)

Aggregations

FCEligibility (gov.ca.cwds.data.legacy.cms.entity.FCEligibility)7 ChildClient (gov.ca.cwds.data.legacy.cms.entity.ChildClient)3 Test (org.junit.Test)3 BaseCwsCmsInMemoryPersistenceTest (gov.ca.cwds.data.legacy.cms.persistence.BaseCwsCmsInMemoryPersistenceTest)2 ImmutableList (com.google.common.collect.ImmutableList)1 Session (org.hibernate.Session)1