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 java.util.Collection> |
getAll(java.util.Collection<? extends java.lang.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 java.util.Collection> |
getAll(java.util.Collection<? extends java.lang.Object> sources,
T result,
java.lang.String conversionType)
Convenience method to load all objects in a source collection and adding the loaded objects to a result
collection.
|
<T extends java.util.Collection> |
getAllSources(java.util.Collection<? extends java.lang.Object> models,
T result)
Convenience method to load all the sources of a given collection of models
|
protected abstract java.lang.Object |
getModelForPersistentValue(java.lang.Object persistentValue) |
protected abstract java.lang.Object |
getPersistentValueForModel(java.lang.Object model) |
void |
saveAll(java.lang.Object... models)
Saves several model model instances at once.
|
<T> T |
toModelLayer(java.lang.Object persistentValue)
Converts arbitrary values into a representation to be used inside the model layer.
|
<T> T |
toPersistenceLayer(java.lang.Object modelValue)
Converts arbitrary model layer values into a form which may be used in persistence layer.
|
afterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, 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, isUniqueConstraintErrorAsRootCause, isUpToDate, lock, lock, refresh, remove, remove, removeAll, removeAll, save, saveAll, saveAll, setAttributeValue, setAttributeValuepublic void saveAll(java.lang.Object... models)
throws ModelSavingException
ModelServicesaveAll in interface ModelServicemodels - the model instances to saveModelSavingExceptionModelService.save(Object)public <T> T toModelLayer(java.lang.Object persistentValue)
ModelServicetoModelLayer in interface ModelServicepersistentValue - the value loaded from persistence layer.protected abstract java.lang.Object getModelForPersistentValue(java.lang.Object persistentValue)
public <T> T toPersistenceLayer(java.lang.Object modelValue)
ModelServicetoPersistenceLayer in interface ModelServicemodelValue - the value to be translated back into persistence layer formprotected abstract java.lang.Object getPersistentValueForModel(java.lang.Object model)
public <T extends java.util.Collection> T getAllSources(java.util.Collection<? extends java.lang.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 java.util.Collection> T getAll(java.util.Collection<? extends java.lang.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 java.util.Collection> T getAll(java.util.Collection<? extends java.lang.Object> sources,
T result,
java.lang.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 © 2018 SAP SE. All Rights Reserved.