class HibernateReservedValueStore extends HibernateGenericStore<ReservedValue> implements ReservedValueStore {

    @Override
    public List<ReservedValue> getIfReservedValues( ReservedValue reservedValue,
        List<String> values )
    {
        String hql = "from ReservedValue rv where rv.ownerObject =:ownerObject and rv.ownerUid =:ownerUid " +
            "and rv.key =:key and rv.value in :values";

        return getQuery( hql )
            .setParameter( "ownerObject", reservedValue.getOwnerObject() )
            .setParameter( "ownerUid", reservedValue.getOwnerUid() )
            .setParameter( "key", reservedValue.getKey() )
            .setParameter( "values", values )
            .getResultList();
    }

    public  HibernateReservedValueStore( SessionFactory sessionFactory, JdbcTemplate jdbcTemplate,
        ApplicationEventPublisher publisher, BatchHandlerFactory batchHandlerFactory );

}