public class CacheDataDescriptionImpl extends Object implements CacheDataDescription
Constructor and Description |
---|
CacheDataDescriptionImpl(boolean mutable,
boolean versioned,
Comparator versionComparator,
Type keyType)
Constructs a CacheDataDescriptionImpl instance.
|
Modifier and Type | Method and Description |
---|---|
static CacheDataDescriptionImpl |
decode(Collection model)
Builds a CacheDataDescriptionImpl from the mapping model of a collection
|
static CacheDataDescriptionImpl |
decode(PersistentClass model)
Builds a CacheDataDescriptionImpl from the mapping model of an entity class.
|
Type |
getKeyType() |
Comparator |
getVersionComparator()
Get the comparator used to compare two different version values.
|
boolean |
isMutable()
Is the data marked as being mutable?
|
boolean |
isVersioned()
Is the data to be cached considered versioned?
If
true , it is illegal for CacheDataDescription.getVersionComparator() to return null
or an instance of IncomparableComparator . |
public CacheDataDescriptionImpl(boolean mutable, boolean versioned, Comparator versionComparator, Type keyType)
decode(org.hibernate.mapping.PersistentClass)
methods rather than direct instantiation.mutable
- Is the described data mutable?versioned
- Is the described data versioned?versionComparator
- The described data's version value comparator (if versioned).keyType
- public boolean isMutable()
CacheDataDescription
isMutable
in interface CacheDataDescription
true
if the data is mutable; false
otherwise.public boolean isVersioned()
CacheDataDescription
true
, it is illegal for CacheDataDescription.getVersionComparator()
to return null
or an instance of IncomparableComparator
.isVersioned
in interface CacheDataDescription
true
if the data is versioned; false
otherwise.public Comparator getVersionComparator()
CacheDataDescription
null
if
CacheDataDescription.isVersioned()
returns false.getVersionComparator
in interface CacheDataDescription
null
public Type getKeyType()
getKeyType
in interface CacheDataDescription
null
if the natural comparison
(Object.hashCode()
and Object.equals(Object)
methods should be used.public static CacheDataDescriptionImpl decode(PersistentClass model)
model
- The mapping model.public static CacheDataDescriptionImpl decode(Collection model)
model
- The mapping model.Copyright © 2001-2017 Red Hat, Inc. All Rights Reserved.