public class IdentityManagerImpl extends Object implements IdentityManager
| Modifier and Type | Field and Description |
|---|---|
protected Class |
datastoreIdClass |
protected IdentityKeyTranslator |
idKeyTranslator
Identity key translator (if any).
|
protected IdentityStringTranslator |
idStringTranslator
Identity string translator (if any).
|
protected PersistenceNucleusContext |
nucCtx |
| Constructor and Description |
|---|
IdentityManagerImpl(PersistenceNucleusContext nucCtx) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getApplicationId(ClassLoaderResolver clr,
AbstractClassMetaData acmd,
String keyToString)
Utility to create a new application identity when you know the metadata for the target class,
and the toString() output of the identity.
|
Object |
getApplicationId(Class cls,
Object key)
Method to return a new object identity for the specified class, and key (possibly toString() output).
|
Object |
getApplicationId(Object pc,
AbstractClassMetaData cmd)
Method to create a new object identity for the passed object with the supplied MetaData.
|
protected String |
getConstructorNameForCache(Class type,
Class[] ctrArgTypes) |
DatastoreId |
getDatastoreId(long value)
Method to return a datastore-unique datastore identity, with the specified value.
|
DatastoreId |
getDatastoreId(String idString)
Method to return a datastore identity, for the specified string which comes from the output of toString().
|
DatastoreId |
getDatastoreId(String className,
Object value)
Method to return a datastore identity, representing the persistable object with specified class name and key value.
|
Class |
getDatastoreIdClass() |
IdentityKeyTranslator |
getIdentityKeyTranslator()
Accessor for the current identity key translator to use (if any).
|
IdentityStringTranslator |
getIdentityStringTranslator()
Accessor for the current identity string translator to use (if any).
|
SingleFieldId |
getSingleFieldId(Class idType,
Class pcType,
Object key)
Utility to create a new SingleFieldIdentity using reflection when you know the
type of the Persistable, and also which SingleFieldIdentity, and the value of the key.
|
protected Class datastoreIdClass
protected IdentityStringTranslator idStringTranslator
protected IdentityKeyTranslator idKeyTranslator
protected PersistenceNucleusContext nucCtx
public IdentityManagerImpl(PersistenceNucleusContext nucCtx)
protected String getConstructorNameForCache(Class type, Class[] ctrArgTypes)
public Class getDatastoreIdClass()
getDatastoreIdClass in interface IdentityManagerpublic IdentityStringTranslator getIdentityStringTranslator()
IdentityManagergetIdentityStringTranslator in interface IdentityManagerpublic IdentityKeyTranslator getIdentityKeyTranslator()
IdentityManagergetIdentityKeyTranslator in interface IdentityManagerpublic DatastoreId getDatastoreId(String className, Object value)
IdentityManagergetDatastoreId in interface IdentityManagerclassName - The class name for the persistablevalue - The key value for the persistablepublic DatastoreId getDatastoreId(long value)
IdentityManagergetDatastoreId in interface IdentityManagervalue - The long value that is unique across the datastore.public DatastoreId getDatastoreId(String idString)
IdentityManagergetDatastoreId in interface IdentityManageridString - The toString() valuepublic SingleFieldId getSingleFieldId(Class idType, Class pcType, Object key)
getSingleFieldId in interface IdentityManageridType - Type of SingleFieldIdentitypcType - Type of the Persistablekey - The value for the identity (the Long, or Int, or ... etc).NucleusException - if invalid input is receivedpublic Object getApplicationId(ClassLoaderResolver clr, AbstractClassMetaData acmd, String keyToString)
getApplicationId in interface IdentityManagerclr - ClassLoader resolveracmd - MetaData for the target classkeyToString - String form of the keypublic Object getApplicationId(Object pc, AbstractClassMetaData cmd)
getApplicationId in interface IdentityManagerpc - The persistable objectcmd - Its metadatapublic Object getApplicationId(Class cls, Object key)
getApplicationId in interface IdentityManagercls - Persistable classkey - form of the object idCopyright © 2017. All rights reserved.