|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.persist.impl.PersistKeyCreator
public class PersistKeyCreator
A persistence secondary key creator/nullifier. This class always uses rawAccess=true to avoid depending on the presence of the proxy class.
Constructor Summary | |
---|---|
PersistKeyCreator(com.sleepycat.persist.impl.Catalog catalog,
EntityMetadata entityMeta,
java.lang.String keyClassName,
SecondaryKeyMetadata secKeyMeta)
Creates a key creator/nullifier for a given entity class and key name. |
Method Summary | |
---|---|
boolean |
createSecondaryKey(SecondaryDatabase secondary,
DatabaseEntry key,
DatabaseEntry data,
DatabaseEntry result)
Creates a secondary key entry, given a primary key and data entry. |
void |
createSecondaryKeys(SecondaryDatabase secondary,
DatabaseEntry key,
DatabaseEntry data,
java.util.Set results)
Creates a secondary key entry, given a primary key and data entry. |
boolean |
nullifyForeignKey(SecondaryDatabase secondary,
DatabaseEntry key,
DatabaseEntry data,
DatabaseEntry secKey)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PersistKeyCreator(com.sleepycat.persist.impl.Catalog catalog, EntityMetadata entityMeta, java.lang.String keyClassName, SecondaryKeyMetadata secKeyMeta)
Method Detail |
---|
public boolean createSecondaryKey(SecondaryDatabase secondary, DatabaseEntry key, DatabaseEntry data, DatabaseEntry result) throws DatabaseException
SecondaryKeyCreator
A secondary key may be derived from the primary key, primary data, or a combination of the primary key and data. For secondary keys that are optional, the key creator method may return false and the key/data pair will not be indexed. To ensure the integrity of a secondary database the key creator method must always return the same result for a given set of input parameters.
createSecondaryKey
in interface SecondaryKeyCreator
secondary
- the database to which the secondary key will be added.
This parameter is passed for informational purposes but is not commonly
used.
key
- the primary key entry. This parameter must not be modified
by this method.
data
- the primary data entry. This parameter must not be modified
by this method.
result
- the secondary key created by this method.
DatabaseException
- if an error occurs attempting to create the
secondary key.public void createSecondaryKeys(SecondaryDatabase secondary, DatabaseEntry key, DatabaseEntry data, java.util.Set results) throws DatabaseException
SecondaryMultiKeyCreator
A secondary key may be derived from the primary key, primary data, or a combination of the primary key and data. Zero or more secondary keys may be derived from the primary record and returned in the results parameter. To ensure the integrity of a secondary database the key creator method must always return the same results for a given set of input parameters.
createSecondaryKeys
in interface SecondaryMultiKeyCreator
secondary
- the database to which the secondary key will be added.
This parameter is passed for informational purposes but is not commonly
used.
key
- the primary key entry. This parameter must not be modified
by this method.
data
- the primary data entry. This parameter must not be modified
by this method.
results
- the set to contain the the secondary key DatabaseEntry
objects created by this method.
DatabaseException
- if an error occurs attempting to create the
secondary key.public boolean nullifyForeignKey(SecondaryDatabase secondary, DatabaseEntry key, DatabaseEntry data, DatabaseEntry secKey) throws DatabaseException
nullifyForeignKey
in interface ForeignMultiKeyNullifier
DatabaseException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |