Purpose: Define a secondary index on the cache.
CachePolicy
| Modifier and Type | Field and Description |
|---|---|
| protected int | cacheSize
Allows the cache size to be set. |
| protected Class | cacheType
Allows the identity map class type to be set. |
| protected List | |
| protected boolean | |
| protected boolean |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public Object | |
| public int | |
| public <T extends WeakIdentityMap> Class | |
| public List | |
| public boolean | |
| public boolean | |
| public void | |
| public void | setCacheType(Class<? extends WeakIdentityMap> cacheType)
ADVANCED: Set the type of the cache used for the index. |
| public void | |
| public void | |
| public void | |
| public String |
| cacheSize | back to summary |
|---|---|
| protected int cacheSize Allows the cache size to be set. | |
| cacheType | back to summary |
|---|---|
| protected Class<? extends WeakIdentityMap> cacheType Allows the identity map class type to be set. | |
| fields | back to summary |
|---|---|
| protected List<DatabaseField> fields | |
| isInsertable | back to summary |
|---|---|
| protected boolean isInsertable | |
| isUpdateable | back to summary |
|---|---|
| protected boolean isUpdateable | |
| CacheIndex | back to summary |
|---|---|
| public CacheIndex() | |
| CacheIndex | back to summary |
|---|---|
| public CacheIndex(DatabaseField[] fields) | |
| CacheIndex | back to summary |
|---|---|
| public CacheIndex(String... fields) | |
| CacheIndex | back to summary |
|---|---|
| public CacheIndex(List<DatabaseField> fields) | |
| addField | back to summary |
|---|---|
| public void addField(DatabaseField field) | |
| addFieldName | back to summary |
|---|---|
| public void addFieldName(String field) PUBLIC: Add the database column name to the cache index. | |
| clone | back to summary |
|---|---|
| public Object clone() throws CloneNotSupportedException Overrides java. Doc from java. Creates and returns a copy of this object. The precise meaning
of "copy" may depend on the class of the object. The general
intent is that, for any object will be true, and that the expression:x.clone() != x will bex.clone().getClass() == x.getClass() true, but these are not absolute requirements.
While it is typically the case that:
will bex.clone().equals(x) true, this is not an absolute requirement.
By convention, the returned object should be obtained by calling
By convention, the object returned by this method should be independent
of this object (which is being cloned). To achieve this independence,
it may be necessary to modify one or more fields of the object returned
by
| |
| getCacheSize | back to summary |
|---|---|
| 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. | |
| getCacheType | back to summary |
|---|---|
| public <T extends WeakIdentityMap> Class 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.
| |
| getFields | back to summary |
|---|---|
| public List | |
| isInsertable | back to summary |
|---|---|
| public boolean isInsertable() Return if the index field can be inserted. | |
| isUpdateable | back to summary |
|---|---|
| public boolean isUpdateable() Return if the index field can be updated. | |
| setCacheSize | back to summary |
|---|---|
| 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. | |
| setCacheType | back to summary |
|---|---|
| public void setCacheType(Class<? extends WeakIdentityMap> cacheType) 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. | |
| setFields | back to summary |
|---|---|
| public void setFields(List<DatabaseField> fields) | |
| setIsInsertable | back to summary |
|---|---|
| public void setIsInsertable(boolean isInsertable) Set if the index field can be inserted. If insertable the object will be indexed after insert. | |
| setIsUpdateable | back to summary |
|---|---|
| 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. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |