use of org.bedework.calcorei.HibSession in project bw-calendar-engine by Bedework.
the class CoreEventPropertiesDAO method getRefs.
@SuppressWarnings("unchecked")
private List<EventPropertiesReference> getRefs(final BwEventProperty val, final String query) throws CalFacadeException {
final HibSession sess = getSess();
sess.createQuery(query);
sess.setEntity("ent", val);
/* May get multiple counts back for events and annotations. */
final List<EventPropertiesReference> refs = sess.getList();
if (debug) {
debug(" ----------- count = " + refs.size());
}
return refs;
}
use of org.bedework.calcorei.HibSession in project bw-calendar-engine by Bedework.
the class CoreEventsDAO method deleteInstances.
protected void deleteInstances(final BwEvent ev) throws CalFacadeException {
final HibSession sess = getSess();
sess.createQuery(deleteInstancesQuery);
sess.setEntity("master", ev);
sess.executeUpdate();
}
use of org.bedework.calcorei.HibSession in project bw-calendar-engine by Bedework.
the class CoreEventsDAO method getInstances.
protected List getInstances(final BwEvent ev) throws CalFacadeException {
final HibSession sess = getSess();
sess.createQuery(instancesQuery);
sess.setEntity("master", ev);
return sess.getList();
}
use of org.bedework.calcorei.HibSession in project bw-calendar-engine by Bedework.
the class CoreEventsDAO method getEventsByName.
protected List getEventsByName(final String colPath, final String name) throws CalFacadeException {
final HibSession sess = getSess();
sess.createQuery(eventsByNameQuery);
sess.setString("name", name);
sess.setString("colPath", colPath);
return sess.getList();
}
use of org.bedework.calcorei.HibSession in project bw-calendar-engine by Bedework.
the class CoreEventsDAO method getEventsAnnotationName.
protected BwEventAnnotation getEventsAnnotationName(final String colPath, final String name) throws CalFacadeException {
final HibSession sess = getSess();
sess.createQuery(eventAnnotationsByNameQuery);
sess.setString("name", name);
sess.setString("colPath", colPath);
return (BwEventAnnotation) sess.getUnique();
}
Aggregations