public abstract class AbstractModelService extends AbstractService implements ModelService
ModelService. The basics of the servicelayer are implemented here.AbstractService.SerializableDTOtenant| Constructor and Description |
|---|
AbstractModelService() |
| Modifier and Type | Method and Description |
|---|---|
<T extends Collection> |
getAll(Collection<? extends Object> sources,
T result)
Convenience method to load all objects in a source collection and adding the loaded objects to a result
collection.
|
<T extends Collection> |
getAll(Collection<? extends Object> sources,
T result,
String conversionType)
Convenience method to load all objects in a source collection and adding the loaded objects to a result
collection.
|
<T extends Collection> |
getAllSources(Collection<? extends Object> models,
T result)
Convenience method to load all the sources of a given collection of models
|
protected abstract Object |
getModelForPersistentValue(Object persistentValue) |
protected abstract Object |
getPersistentValueForModel(Object model) |
void |
saveAll(Object... models)
Saves several model model instances at once.
|
<T> T |
toModelLayer(Object persistentValue)
Converts arbitrary values into a representation to be used inside the model layer.
|
<T> T |
toPersistenceLayer(Object modelValue)
Converts arbitrary model layer values into a form which may be used in persistence layer.
|
afterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, setTenantScope, writeReplaceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitattach, clearTransactionsSettings, clone, clone, clone, clone, create, create, detach, detach, detachAll, disableTransactions, enableTransactions, get, get, get, getAttributeValue, getAttributeValue, getAttributeValues, getByExample, getModelType, getModelType, getModelTypeClass, getSource, getWithLock, initDefaults, isAttached, isModified, isNew, isRemoved, isSourceAttached, isUniqueConstraintErrorAsRooCause, isUniqueConstraintErrorAsRootCause, isUpToDate, lock, lock, refresh, remove, remove, removeAll, removeAll, save, saveAll, saveAll, setAttributeValue, setAttributeValuepublic void saveAll(Object... models) throws ModelSavingException
ModelServicesaveAll in interface ModelServicemodels - the model instances to saveModelSavingExceptionModelService.save(Object)public <T> T toModelLayer(Object persistentValue)
ModelServicetoModelLayer in interface ModelServicepersistentValue - the value loaded from persistence layer.protected abstract Object getModelForPersistentValue(Object persistentValue)
public <T> T toPersistenceLayer(Object modelValue)
ModelServicetoPersistenceLayer in interface ModelServicemodelValue - the value to be translated back into persistence layer formpublic <T extends Collection> T getAllSources(Collection<? extends Object> models, T result)
ModelServicegetAllSources in interface ModelServicemodels - the objects for which to retrieve model instancesresult - the collection to add the model instances topublic <T extends Collection> T getAll(Collection<? extends Object> sources, T result)
ModelServicegetAll in interface ModelServicesources - the objects for which to retrieve model instancesresult - the collection to add the model instances toModelService.get(Object)public <T extends Collection> T getAll(Collection<? extends Object> sources, T result, String conversionType)
ModelServicegetAll in interface ModelServicesources - the objects for which to retrieve model instancesresult - the collection to add the model instances toconversionType - the type to be used for looking up the model converterModelService.get(Object)Copyright © 2017 SAP SE. All Rights Reserved.