SUPER_ENTITY_TYPE - the super type for all saveable entitiespublic abstract class GQLAbstractSaveDataFetcher<SUPER_ENTITY_TYPE> extends GQLAbstractDataFetcher<SUPER_ENTITY_TYPE>
GQLSchemaBuilder for buildSchema method "save entity" data fetcher argument| Constructor and Description |
|---|
GQLAbstractSaveDataFetcher() |
| Modifier and Type | Method and Description |
|---|---|
protected Object |
convertValue(Map<String,Object> dynamicAttributeValuePropertyValues,
IGQLDynamicAttributeSetter<?,?> dynamicAttributeSetter) |
SUPER_ENTITY_TYPE |
get(graphql.schema.DataFetchingEnvironment environment) |
GQLDynamicAttributeRegistry |
getDynamicAttributeRegistry() |
protected abstract SUPER_ENTITY_TYPE |
getOrCreateAndSetProperties(Class<?> entityClass,
GQLDynamicAttributeRegistry dynamicAttributeRegistry,
Map<String,Object> fieldValueMap)
Find or create entity and set its field values from given field map.
|
protected void |
mapDynamicAttributeSettersValues(Class<?> entityClass,
Map<String,Object> fieldValueMap) |
protected SUPER_ENTITY_TYPE |
save(Class<?> entityClass,
GQLDynamicAttributeRegistry dynamicAttributeRegistry,
Map<String,Object> fieldValueMap) |
protected abstract void |
save(SUPER_ENTITY_TYPE entity)
Save the entity in persistence layer.
|
void |
setDynamicAttributeRegistry(GQLDynamicAttributeRegistry dynamicAttributeRegistry) |
convertObjectValue, createAndSetPropertyValues, getArgumentsForContext, getArgumentsForContextAsList, getArgumentValue, getConfig, getEntityClassByEntityName, getEntityName, getMetaModel, getRequestProvidedVariableNames, mapValue, mapValue, setMetaModel, setPropertyValues, setSchemaConfigprotected abstract void save(SUPER_ENTITY_TYPE entity)
entity - the entity to be savedprotected abstract SUPER_ENTITY_TYPE getOrCreateAndSetProperties(Class<?> entityClass, GQLDynamicAttributeRegistry dynamicAttributeRegistry, Map<String,Object> fieldValueMap)
entityClass - the entity classdynamicAttributeRegistry - the GQLDynamicAttributeRegistryfieldValueMap - the Map of fields values to set in entityprotected SUPER_ENTITY_TYPE save(Class<?> entityClass, GQLDynamicAttributeRegistry dynamicAttributeRegistry, Map<String,Object> fieldValueMap)
public SUPER_ENTITY_TYPE get(graphql.schema.DataFetchingEnvironment environment)
protected void mapDynamicAttributeSettersValues(Class<?> entityClass, Map<String,Object> fieldValueMap)
protected Object convertValue(Map<String,Object> dynamicAttributeValuePropertyValues, IGQLDynamicAttributeSetter<?,?> dynamicAttributeSetter)
public GQLDynamicAttributeRegistry getDynamicAttributeRegistry()
public void setDynamicAttributeRegistry(GQLDynamicAttributeRegistry dynamicAttributeRegistry)
dynamicAttributeRegistry - the dynamicAttributeRegistry to setCopyright © 2019–2020. All rights reserved.