public class DefaultOrderHistoryService extends AbstractBusinessService implements OrderHistoryService
OrderHistoryServiceAbstractService.SerializableDTOmodelService, sessionService, txManagertenant| Constructor and Description |
|---|
DefaultOrderHistoryService() |
| Modifier and Type | Method and Description |
|---|---|
OrderModel |
createHistorySnapshot(OrderModel currentVersion)
Creates a exact copy of the given order except that the copy will be marked as copy by setting
OrderModel.VERSIONID to true. |
protected Collection<String> |
getEntriesDescriptions(Collection<OrderHistoryEntryModel> entries)
Fetches the collection of history entries descriptions
|
Collection<OrderHistoryEntryModel> |
getHistoryEntries(OrderModel ownerOrder,
Date dateFrom,
Date dateTo)
Fetches history entries of the ownerOrder from the given time range
|
protected Collection |
getHistoryEntries(OrderModel ownerOrder,
Date dateFrom,
Date dateTo,
boolean descriptionOnly)
Returns collection of
OrderHistoryEntryModel or OrderHistoryEntryModel.DESCRIPTION for a given
time range |
Collection<OrderHistoryEntryModel> |
getHistoryEntries(OrderModel ownerOrder,
EmployeeModel employee)
Fetches history entries of the ownerOrder from the given employee
|
Collection<OrderHistoryEntryModel> |
getHistoryEntries(UserModel user,
Date dateFrom,
Date dateTo)
Fetches history entries of the orders placed by the user in the given time range
|
Collection<String> |
getHistoryEntriesDescriptions(OrderModel ownerOrder,
Date dateFrom,
Date dateTo)
Fetches the descriptions of history entries of the ownerOrder from the given time range
|
Collection<OrderModel> |
getHistorySnapshots(OrderModel ownerOrder)
Fetches all snapshots which have been created and assigned to the given order's history entries.
|
KeyGenerator |
getVersionIDGenerator() |
void |
saveHistorySnapshot(OrderModel snapshot)
Actually persists a previously created order snapshot.
|
void |
setVersionIDGenerator(KeyGenerator versionIDGenerator) |
getModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManagerafterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, setTenantScope, writeReplacepublic KeyGenerator getVersionIDGenerator()
public void setVersionIDGenerator(KeyGenerator versionIDGenerator)
public OrderModel createHistorySnapshot(OrderModel currentVersion)
OrderHistoryServiceOrderModel.VERSIONID to true.createHistorySnapshot in interface OrderHistoryServicecurrentVersion - the original order to be copied copypublic void saveHistorySnapshot(OrderModel snapshot)
OrderHistoryServiceModelService.save(Object) to
overcome Jalo layer business logic resetting some attributes. In future this may not be necessary.saveHistorySnapshot in interface OrderHistoryServicesnapshot - the order snapshotpublic Collection<OrderModel> getHistorySnapshots(OrderModel ownerOrder)
OrderHistoryServicegetHistorySnapshots in interface OrderHistoryServiceownerOrder - the original orderprotected Collection getHistoryEntries(OrderModel ownerOrder, Date dateFrom, Date dateTo, boolean descriptionOnly)
OrderHistoryEntryModel or OrderHistoryEntryModel.DESCRIPTION for a given
time rangeownerOrder - - requireddateFrom - - possible null valuedateTo - - possible null valuedescriptionOnly - - set to true to get descriptions only instead of the whole OrderHistoryEntryModel objectspublic Collection<OrderHistoryEntryModel> getHistoryEntries(OrderModel ownerOrder, EmployeeModel employee)
OrderHistoryServicegetHistoryEntries in interface OrderHistoryServiceownerOrder - the owner orderpublic Collection<OrderHistoryEntryModel> getHistoryEntries(UserModel user, Date dateFrom, Date dateTo)
OrderHistoryServicegetHistoryEntries in interface OrderHistoryServiceuser - user that placed the ordersdateFrom - set dateFrom to null if you want to make the time range only half limiteddateTo - set dateTo to null if you want to make the time range only half limitedprotected Collection<String> getEntriesDescriptions(Collection<OrderHistoryEntryModel> entries)
entries - history entries that you want to fetch descriptions frompublic Collection<OrderHistoryEntryModel> getHistoryEntries(OrderModel ownerOrder, Date dateFrom, Date dateTo)
OrderHistoryServicegetHistoryEntries in interface OrderHistoryServiceownerOrder - the owner orderdateFrom - upper limit of the time rangedateTo - lower limit of the time rangepublic Collection<String> getHistoryEntriesDescriptions(OrderModel ownerOrder, Date dateFrom, Date dateTo)
OrderHistoryServicegetHistoryEntriesDescriptions in interface OrderHistoryServiceownerOrder - the owner orderdateFrom - upper limit of the time rangedateTo - lower limit of the time rangeCopyright © 2017 SAP SE. All Rights Reserved.