org.hibernate.cache
Interface OptimisticCacheSource

All Known Subinterfaces:
EntityPersister, Loadable, Lockable, OuterJoinLoadable, PostInsertIdentityPersister, Queryable, SQLLoadable, UniqueKeyLoadable
All Known Implementing Classes:
AbstractEntityPersister, JoinedSubclassEntityPersister, SingleTableEntityPersister, UnionSubclassEntityPersister

public interface OptimisticCacheSource

Contract for sources of optimistically lockable data sent to the second level cache.

Note currently EntityPersisters are the only viable source.

Author:
Steve Ebersole

Method Summary
 Comparator getVersionComparator()
          Get the comparator used to compare two different version values together.
 boolean isVersioned()
          Does this source represent versioned (i.e., and thus optimistically lockable) data?
 

Method Detail

isVersioned

boolean isVersioned()
Does this source represent versioned (i.e., and thus optimistically lockable) data?

Returns:
True if this source represents versioned data; false otherwise.

getVersionComparator

Comparator getVersionComparator()
Get the comparator used to compare two different version values together.

Returns:
An appropriate comparator.