|
SPT Object Database API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sptci.prevayler.StorageSystem
com.sptci.prevayler.IndexSystem
abstract class IndexSystem
Abstracts all index management operations for the prevalent system.
© Copyright 2008 Sans Pareil Technologies, Inc.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.sptci.prevayler.StorageSystem |
|---|
StorageSystem.TaskQueue |
| Field Summary | |
|---|---|
private static long |
serialVersionUID
|
| Fields inherited from class com.sptci.prevayler.StorageSystem |
|---|
logger |
| Constructor Summary | |
|---|---|
IndexSystem()
|
|
| Method Summary | |
|---|---|
protected void |
checkFields(PrevalentObject object)
Check all the fields in the prevalent object for Index annotation and check for
unique constraint violations. |
private void |
checkIndex(Index index,
PrevalentObject object)
Check the index specified at the class level on the prevalent object. |
private void |
checkIndices(PrevalentObject object)
Check the Indices annotations
on the specified prevalent object and check unique constraints. |
protected void |
checkUnique(PrevalentObject object)
Check all unique constraints (including object id) for the specified prevalent object. |
protected void |
index(PrevalentObject object)
Manage additional maps required to support qeries on the prevalent object. |
protected void |
indexClass(PrevalentObject object)
Process the index annotations on the prevalent object and manage the StorageSystem.indexMap as appropriate. |
protected void |
indexFields(PrevalentObject object)
Process Index annotations on the
fields of the specified prevalent object and manage the StorageSystem.indexMap as appropriate. |
private void |
processIndex(Index index,
PrevalentObject object)
Process the Index annotation
at the class level of the specified prevalent object. |
private void |
processIndices(PrevalentObject object)
Process the Indices annotation
and manage the StorageSystem.indexMap as appropriate. |
protected void |
remove(PrevalentObject object)
Remove the index for the specified prevalent object. |
| Methods inherited from class com.sptci.prevayler.StorageSystem |
|---|
generateOid, getIndexStorage, getIndexStorage, getPrimaryStorage, getPrimaryStorage, getReferenceStorage, getReferenceStorage, getRelationStorage, getRelationStorage, getTaskQueue |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.sptci.prevayler.DatabaseSystem |
|---|
delete, save |
| Methods inherited from interface com.sptci.prevayler.AbstractDatabase |
|---|
count, fetch, fetch, fetch, fetchIntersection, fetchUnion, search |
| Field Detail |
|---|
private static final long serialVersionUID
| Constructor Detail |
|---|
IndexSystem()
| Method Detail |
|---|
protected void checkUnique(PrevalentObject object)
throws PrevalentException
object - The prevalent object to check.
ConstraintException - If unique constraints are violated.
PrevalentException - If errors are encountered while processing
the fields of the prevalent object.checkIndices(com.sptci.prevayler.PrevalentObject),
checkIndex(com.sptci.prevayler.annotations.Index, com.sptci.prevayler.PrevalentObject),
checkFields(com.sptci.prevayler.PrevalentObject)
private void checkIndices(PrevalentObject object)
throws PrevalentException
Indices annotations
on the specified prevalent object and check unique constraints.
object - The prevalent object to check.
ConstraintException - If a unique constraint is
violated.
PrevalentException - If exceptions are
encountered while processing the fields of the prevalent object.checkIndex(com.sptci.prevayler.annotations.Index, com.sptci.prevayler.PrevalentObject)
private void checkIndex(Index index,
PrevalentObject object)
throws PrevalentException
index - The annotation for the prevalent object.object - The prevalent object to check.
ConstraintException - If a unique constraint
is violated.
PrevalentException - If exceptions are
encountered while processing the fields of the prevalent object.
protected void checkFields(PrevalentObject object)
throws PrevalentException
Index annotation and check for
unique constraint violations.
object - The prevalent object to check.
ConstraintException - If a unique constraint
is violated.
PrevalentException - If exceptions are
encountered while processing the fields of the prevalent object.
protected void index(PrevalentObject object)
throws PrevalentException
object - The prevalent object to add query support for.
PrevalentException - If errors are encountered
while fetching the values of the fields in prevalent object.indexFields(com.sptci.prevayler.PrevalentObject),
indexClass(com.sptci.prevayler.PrevalentObject)
protected void indexFields(PrevalentObject object)
throws PrevalentException
Index annotations on the
fields of the specified prevalent object and manage the StorageSystem.indexMap as appropriate.
object - The prevalent object to index.
PrevalentException - If errors are encountered
while processing the object fields.
protected void indexClass(PrevalentObject object)
throws PrevalentException
StorageSystem.indexMap as appropriate.
object - The prevalent object to process.
PrevalentException - If errors are encountered
while processing the field values of the prevalent object.processIndices(com.sptci.prevayler.PrevalentObject),
processIndex(com.sptci.prevayler.annotations.Index, com.sptci.prevayler.PrevalentObject)
private void processIndices(PrevalentObject object)
throws PrevalentException
Indices annotation
and manage the StorageSystem.indexMap as appropriate.
object - The prevalent object whose class level index annotations
are to be processed.
PrevalentException - If errors are encountered
while processing the fields of the prevalent object.processIndex(com.sptci.prevayler.annotations.Index, com.sptci.prevayler.PrevalentObject)
private void processIndex(Index index,
PrevalentObject object)
throws PrevalentException
Index annotation
at the class level of the specified prevalent object.
index - The annotation to process.object - The prevalent object to process.
PrevalentException - If errors are encountered while processing
the fields in the prevalent object.
protected void remove(PrevalentObject object)
throws PrevalentException
object - The prevalent object to de-index.
PrevalentException - If errors are encountered while removing the
index for the prevalent object.
|
SPT Object Database API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||