19 package org.turro.financials.cart;
21 import java.util.List;
22 import org.turro.elephant.context.Application;
23 import org.turro.elephant.db.WhereClause;
24 import org.turro.financials.db.FinancialsPU;
25 import org.turro.financials.entity.FollowUp;
26 import org.turro.jpa.Dao;
27 import org.turro.plugin.contacts.IContact;
38 wc.
addClause(
"select fu from FollowUp as fu");
39 wc.
addClause(
"where preparedDate is null");
41 wc.
addClause(
"and prepareId = :contactId");
44 return dao.getResultList(wc);
50 wc.
addClause(
"select fu from FollowUp as fu");
51 wc.
addClause(
"where deliveredDate is null and preparedDate is not null");
53 wc.
addClause(
"and deliverId = :contactId");
56 return dao.getResultList(wc);
62 wc.
addClause(
"select count(fu) from FollowUp as fu");
63 wc.
addClause(
"where preparedDate is null");
65 wc.
addClause(
"and prepareId = :contactId");
74 wc.
addClause(
"select count(fu) from FollowUp as fu");
75 wc.
addClause(
"where deliveredDate is null and preparedDate is not null");
77 wc.
addClause(
"and deliverId = :contactId");
boolean isInRole(String role)
static Application getApplication()
void addClause(String clause)
void addNamedValue(String name, Object value)
static List< FollowUp > notDelivered(IContact contact)
static List< FollowUp > notPrepared(IContact contact)
static long countNotDelivered(IContact contact)
static long countNotPrepared(IContact contact)
Object getSingleResultOrNull(SqlClause sc)