use of org.bedework.calcorei.HibSession in project bw-calendar-engine by Bedework.
the class CoreEventsDAO method getEventOverrides.
@SuppressWarnings("unchecked")
public Collection<BwEventAnnotation> getEventOverrides(final BwEvent ev) throws CalFacadeException {
final HibSession sess = getSess();
sess.createQuery(getEventOverridesQuery);
sess.setEntity("target", ev);
return sess.getList();
}
use of org.bedework.calcorei.HibSession in project bw-calendar-engine by Bedework.
the class CoreEventsDAO method getInstance.
protected BwRecurrenceInstance getInstance(final BwEvent ev, final String rid) throws CalFacadeException {
final HibSession sess = getSess();
sess.createQuery(recurrenceInstanceQuery);
sess.setEntity("master", ev);
sess.setString("rid", rid);
return (BwRecurrenceInstance) sess.getUnique();
}
use of org.bedework.calcorei.HibSession in project bw-calendar-engine by Bedework.
the class CoreEventsDAO method getChildrenEntities.
public List getChildrenEntities(final String parentPath, final int start, final int count) throws CalFacadeException {
final HibSession sess = getSess();
sess.createQuery(getChildEntitiesQuery);
sess.setString("colPath", parentPath);
sess.setFirstResult(start);
sess.setMaxResults(count);
return sess.getList();
}
use of org.bedework.calcorei.HibSession in project bw-calendar-engine by Bedework.
the class EntityDAO method get.
public BwCalSuite get(final BwAdminGroup group) throws CalFacadeException {
final HibSession sess = getSess();
sess.createQuery(getCalSuiteByGroupQuery);
sess.setEntity("group", group);
sess.cacheableQuery();
final BwCalSuite cs = (BwCalSuite) sess.getUnique();
if (cs != null) {
sess.evict(cs);
}
return cs;
}
use of org.bedework.calcorei.HibSession in project bw-calendar-engine by Bedework.
the class EntityDAO method getUnexpiredAlarms.
@SuppressWarnings("unchecked")
public Collection<BwAlarm> getUnexpiredAlarms(final long triggerTime) throws CalFacadeException {
final HibSession sess = getSess();
if (triggerTime == 0) {
sess.createQuery(getUnexpiredAlarmsQuery);
} else {
sess.createQuery(getUnexpiredAlarmsTimeQuery);
sess.setString("tt", String.valueOf(triggerTime));
}
return sess.getList();
}
Aggregations