public class GenerateEntityIdOnTheClient extends Object
Constructor and Description |
---|
GenerateEntityIdOnTheClient(DocumentConvention conventions,
Function1<Object,String> generateKey) |
Modifier and Type | Method and Description |
---|---|
String |
generateDocumentKeyForStorage(Object entity) |
String |
getOrGenerateDocumentKey(Object entity)
Tries to get the identity.
|
boolean |
tryGetIdFromInstance(Object entity,
Reference<String> idHolder)
Attempts to get the document key from an instance
|
void |
trySetIdentity(Object entity,
String id)
Tries to set the identity property
|
public GenerateEntityIdOnTheClient(DocumentConvention conventions, Function1<Object,String> generateKey)
public boolean tryGetIdFromInstance(Object entity, Reference<String> idHolder)
entity
- idHolder
- public String getOrGenerateDocumentKey(Object entity)
entity
- Copyright © 2016. All Rights Reserved.