java.lang.Object
org.eclipse.persistence.descriptors.CacheIndex
- All Implemented Interfaces:
Serializable,Cloneable
Purpose: Define a secondary index on the cache.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intAllows the cache size to be set.protected Class<? extends WeakIdentityMap> Allows the identity map class type to be set.protected List<DatabaseField> protected booleanprotected boolean -
Constructor Summary
ConstructorsConstructorDescriptionCacheIndex(String... fields) CacheIndex(List<DatabaseField> fields) CacheIndex(DatabaseField[] fields) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddField(DatabaseField field) voidaddFieldName(String field) PUBLIC: Add the database column name to the cache index.clone()intADVANCED: Return the cache size.<T extends WeakIdentityMap>
Class<T> ADVANCED: Return the type of the cache used for the index.booleanReturn if the index field can be inserted.booleanReturn if the index field can be updated.voidsetCacheSize(int cacheSize) ADVANCED: Set the cache size.voidsetCacheType(Class<? extends WeakIdentityMap> cacheType) ADVANCED: Set the type of the cache used for the index.voidsetFields(List<DatabaseField> fields) voidsetIsInsertable(boolean isInsertable) Set if the index field can be inserted.voidsetIsUpdateable(boolean isUpdateable) Set if the index field can be updated.toString()
-
Field Details
-
isUpdateable
protected boolean isUpdateable -
isInsertable
protected boolean isInsertable -
fields
-
cacheSize
protected int cacheSizeAllows the cache size to be set. -
cacheType
Allows the identity map class type to be set.
-
-
Constructor Details
-
CacheIndex
public CacheIndex() -
CacheIndex
-
CacheIndex
-
CacheIndex
-
-
Method Details
-
clone
- Overrides:
clonein classObject- Throws:
CloneNotSupportedException
-
isUpdateable
public boolean isUpdateable()Return if the index field can be updated. -
setIsUpdateable
public void setIsUpdateable(boolean isUpdateable) Set if the index field can be updated. If updateable the object will be re-indexed on each update/refresh. -
isInsertable
public boolean isInsertable()Return if the index field can be inserted. -
setIsInsertable
public void setIsInsertable(boolean isInsertable) Set if the index field can be inserted. If insertable the object will be indexed after insert. -
getCacheType
ADVANCED: Return the type of the cache used for the index. This default to a weak cache, and should normally not be changed. For a weak cache, the index will remain until the object gcs from the main cache. -
setCacheType
ADVANCED: Set the type of the cache used for the index. This default to a weak cache, and should normally not be changed. For a weak cache, the index will remain until the object gcs from the main cache. -
getCacheSize
public int getCacheSize()ADVANCED: Return the cache size. This is either the initial size, sub-cache size, or fixed size depending on the cache type. -
setCacheSize
public void setCacheSize(int cacheSize) ADVANCED: Set the cache size. This is either the initial size, sub-cache size, or fixed size depending on the cache type. -
addField
-
addFieldName
PUBLIC: Add the database column name to the cache index. -
getFields
-
setFields
-
toString
-