public class GlobalIdFactory extends Object
| Constructor and Description |
|---|
GlobalIdFactory(TypeMapper typeMapper) |
| Modifier and Type | Method and Description |
|---|---|
UnboundedValueObjectId |
createFromClass(Class valueObjectClass) |
GlobalId |
createFromDto(GlobalIdDTO idDto) |
InstanceId |
createFromId(Object localId,
Class entityClass) |
InstanceId |
createFromId(Object localId,
Entity entity) |
ValueObjectId |
createFromPath(GlobalId owner,
Class valueObjectClass,
String path) |
GlobalId |
createId(Object targetCdo) |
GlobalId |
createId(Object targetCdo,
OwnerContext owner) |
Object |
dehydrate(Object item,
JaversType targetType,
OwnerContext context)
If item is Primitive or Value - returns it,
if item is Entity or ValueObject - returns its globalId,
if item is already instance of GlobalId - returns it.
|
public GlobalIdFactory(TypeMapper typeMapper)
public GlobalId createId(Object targetCdo, OwnerContext owner)
owner - for bounded ValueObjects, optionalpublic UnboundedValueObjectId createFromClass(Class valueObjectClass)
public ValueObjectId createFromPath(GlobalId owner, Class valueObjectClass, String path)
public InstanceId createFromId(Object localId, Entity entity)
public InstanceId createFromId(Object localId, Class entityClass)
public GlobalId createFromDto(GlobalIdDTO idDto)
public Object dehydrate(Object item, JaversType targetType, OwnerContext context)
Copyright © 2014. All rights reserved.