class HibernateReservedValueStore extends HibernateGenericStore<ReservedValue> implements ReservedValueStore {

    @Override
    public boolean isReserved( String ownerObject, String ownerUID, String value )
    {
        String hql = "from ReservedValue rv where rv.ownerObject =:ownerObject and rv.ownerUid =:ownerUid " +
            "and rv.value =:value";

        return !getQuery( hql )
            .setParameter( "ownerObject", ownerObject )
            .setParameter( "ownerUid", ownerUID )
            .setParameter( "value", value )
            .getResultList()
            .isEmpty();
    }

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

}