public class Depots extends AbstractImpl
Modifier and Type | Class and Description |
---|---|
static class |
Depots.BookingStatus
BookingStatus
|
static class |
Depots.BookingType
BookingType
|
static class |
Depots.DepotUsage
DepotUsage
|
static class |
Depots.InventoryLevelStatus
InventoryLevelStatus
|
Modifier | Constructor and Description |
---|---|
protected |
Depots()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
acceptCompoundBooking(CompoundBooking compoundBooking)
Accept compound booking.
|
void |
acceptInventoryLevel(InventoryLevel inventoryLevel)
Accept inventory level.
|
List<SingleBooking> |
appendBookings(CompoundBooking compoundBooking,
Date valueDate,
short bookingType,
Boolean noBalanceValidation,
Boolean[] isCreditBookings,
BigDecimal[] quantities,
BookingText[] bookingTexts,
DepotPosition[] depotPositions,
BookingOrigin[] origins,
String[] bookingTextSuffixes,
String[] bookingIds,
List<String> errors)
Append bookings to given compound booking.
|
void |
assertCreditBalance(CompoundBooking cb,
BigDecimal balance)
Assert that balance of all credit bookings of given compound booking are equal to balance.
|
void |
assertOpenPosition(Date valueDate,
short bookingType,
DepotPosition depotPosition)
Test that the given depot position accepts bookings of the given type:
Check for opening and closing date at level depot and depot position
Check for locked flag at level depot and depot position
Check value date for non-final and open booking period
|
void |
assertReports(Depot depot,
short bookingStatusThreshold,
List<DepotPosition> includePositions,
List<DepotPosition> excludePositions)
Assert that a refreshed depot report exists for the given depot and
all booking periods defined for the depot entity.
|
CompoundBooking |
cancelCompoundBooking(CompoundBooking cb,
List<String> errors)
Cancel compound booking.
|
void |
closeDepot(Depot depot,
Date closingDate,
List<String> errors)
Closes the given depot, i.e.
|
void |
closeDepotPosition(DepotPosition depotPosition,
Date closingDate,
List<String> errors)
Close depot position, i.e.
|
CompoundBooking |
createBookingByPosition(DepotEntity depotEntity,
Date valueDate,
short bookingType,
BigDecimal quantity,
String bookingTextName,
BookingText bookingText,
DepotPosition positionCredit,
DepotPosition positionDebit,
BookingOrigin origin,
String bookingTextSuffix,
List<String> errors)
Create credit / debit bookings for the given depot positions.
|
CompoundBooking |
createBookingByPositionName(DepotEntity depotEntity,
Date valueDate,
short bookingType,
BigDecimal quantity,
String bookingTextName,
BookingText bookingText,
String positionName,
String depotNumberCredit,
Depot depotCredit,
String depotNumberDebit,
Depot depotDebit,
BookingOrigin origin,
String bookingTextSuffix,
List<String> errors)
Create credit / debit booking for the depot positions defined by the position name.
|
CompoundBooking |
createBookingByProduct(DepotEntity depotEntity,
Date valueDate,
short bookingType,
BigDecimal quantity,
String bookingTextName,
BookingText bookingText,
Product product,
String depotNumberCredit,
Depot depotCredit,
String depotNumberDebit,
Depot depotDebit,
BookingOrigin origin,
String bookingTextSuffix,
List<String> errors)
Create credit / debit booking for the depot positions defined by the given product.
|
CompoundBooking |
createCompoundBooking(DepotEntity depotEntity,
String name,
short bookingType)
Create a compound booking for the given quantities and debit / credit positions.
|
CompoundBooking |
createCreditDebitBooking(DepotEntity depotEntity,
Date valueDate,
short bookingType,
BigDecimal quantity,
String bookingTextName,
BookingText bookingText,
DepotPosition positionCredit,
DepotPosition positionDebit,
BookingOrigin originIdentity,
String bookingTextSuffix,
List<String> errors)
Create a credit / debit booking as compound booking for the given quantity.
|
protected void |
createOrUpdateInventoryLevelCorrectionBooking(InventoryLevel inventoryLevel)
Create or update inventory level correction booking.
|
void |
finalizeCompoundBooking(CompoundBooking cb)
Finalize compound booking.
|
void |
finalizeInventoryLevel(InventoryLevel inventoryLevel)
Finalize inventory level.
|
BookingText |
findBookingText(DepotEntity depotEntity,
String bookingTextName)
Find booking text by name.
|
DepotPosition |
getAndCreateDepotPosition(DepotEntity depotEntity,
String depotNumber,
Depot depot,
String positionName,
Product product,
Date openingDate)
Lookup depot position.
|
String |
getCompoundBookingName(DepotPosition positionCredit,
DepotPosition positionDebit,
BookingText bookingText)
Derive name of compound booking from given credit / debit position and booking text.
|
String |
getCreditBookingName(DepotPosition depotPosition,
BookingText bookingText,
String bookingTextSuffix)
Get name for CreditBooking.
|
String |
getDebitBookingName(DepotPosition depotPosition,
BookingText bookingText,
String bookingTextSuffix)
Get name for DebitBooking.
|
String |
getDepotReportItemPositionName(DepotPosition depotPosition)
Get position name for depot report item position.
|
Segment |
getDepotSegment(javax.jdo.PersistenceManager pm,
String providerName,
String segmentName)
Returns the depot segment.
|
static Depots |
getInstance()
Get instance of registered backend.
|
boolean |
hasBookings(CrxObject bookingTarget)
Test for bookings having a depot position which is composite of
the given booking target.
|
void |
lockCompoundBooking(CompoundBooking cb,
short lockingReason)
Set the lock flag for the given compound booking to true.
|
void |
lockInventoryLevel(InventoryLevel inventoryLevel,
short lockingReason)
Set the lock flag for the given inventory level to true.
|
Depot |
openDepot(DepotHolder depotHolder,
String name,
String description,
String depotNumber,
Date openingDate,
DepotType depotType,
DepotGroup depotGroup,
List<String> errors)
Open depot with the given depot number.
|
DepotPosition |
openDepotPosition(Depot depot,
String positionName,
String positionDescription,
Date openingDate,
String depotPositionQualifier,
Product product,
Boolean isLocked)
Open a new depot position.
|
void |
preDelete(org.openmdx.base.accessor.jmi.cci.RefObject_1_0 object,
boolean preDelete)
Pre-delete callback.
|
void |
preStore(org.openmdx.base.accessor.jmi.cci.RefObject_1_0 object)
Pre-store callback.
|
void |
refreshReport(Depot depot,
DepotReport report,
DepotReport reportPreviousPeriod,
List<DepotPosition> includePositions,
List<DepotPosition> excludePositions)
Re-calculate the given depot report.
|
static void |
register()
Register backend.
|
protected void |
removeCompoundBooking(CompoundBooking cb,
boolean preDelete)
Remove compound booking.
|
protected void |
removeDepot(Depot depot,
boolean preDelete)
Remove depot.
|
protected void |
removeDepotEntity(DepotEntity depotEntity,
boolean preDelete)
Remove depot entity.
|
protected void |
removeDepotGroup(DepotGroup depotGroup,
boolean preDelete)
Remove depot group.
|
protected void |
removeDepotHolder(DepotHolder depotHolder,
boolean preDelete)
Remove depot holder.
|
protected void |
removeDepotPosition(DepotPosition depotPosition,
boolean preDelete)
Remove depot position.
|
void |
removeInventoryLevel(InventoryLevel inventoryLevel,
boolean preDelete)
Remove inventory level.
|
protected void |
removeSimpleBooking(SimpleBooking simpleBooking,
boolean preDelete)
Remove simple booking.
|
protected void |
removeSingleBooking(SingleBooking singleBooking,
boolean preDelete)
Remove single booking.
|
void |
unlockCompoundBooking(CompoundBooking cb)
Set the lock flag of the given compound booking to false.
|
void |
unlockInventoryLevel(InventoryLevel inventoryLevel)
Set the lock flag of the given inventory level to false.
|
void |
updateBookingTemplate(BookingTemplate bookingTemplate)
Update booking template.
|
void |
updateInventoryLevel(InventoryLevel inventoryLevel)
Update inventory level.
|
void |
validateBookings(Date valueDate,
short bookingType,
Boolean noBalanceValidation,
Boolean[] isCreditBookings,
BigDecimal[] quantities,
BookingText[] bookingTexts,
DepotPosition[] depotPositions,
BookingOrigin[] origins,
List<String> errors)
Validate bookings and report errors.
|
getInstance, getPersistenceManager, getUidAsString, registerImpl
public static void register()
public static Depots getInstance() throws org.openmdx.base.exception.ServiceException
org.openmdx.base.exception.ServiceException
public Segment getDepotSegment(javax.jdo.PersistenceManager pm, String providerName, String segmentName)
pm
- providerName
- segmentName
- public void assertOpenPosition(Date valueDate, short bookingType, DepotPosition depotPosition) throws org.openmdx.base.exception.ServiceException
valueDate
- bookingType
- depotPosition
- org.openmdx.base.exception.ServiceException
public void assertCreditBalance(CompoundBooking cb, BigDecimal balance) throws org.openmdx.base.exception.ServiceException
cb
- balance
- org.openmdx.base.exception.ServiceException
public BookingText findBookingText(DepotEntity depotEntity, String bookingTextName)
depotEntity
- bookingTextName
- public String getCompoundBookingName(DepotPosition positionCredit, DepotPosition positionDebit, BookingText bookingText) throws org.openmdx.base.exception.ServiceException
positionCredit
- positionDebit
- bookingText
- org.openmdx.base.exception.ServiceException
public String getCreditBookingName(DepotPosition depotPosition, BookingText bookingText, String bookingTextSuffix) throws org.openmdx.base.exception.ServiceException
depotPosition
- bookingText
- bookingTextSuffix
- org.openmdx.base.exception.ServiceException
public String getDebitBookingName(DepotPosition depotPosition, BookingText bookingText, String bookingTextSuffix) throws org.openmdx.base.exception.ServiceException
depotPosition
- bookingText
- bookingTextSuffix
- org.openmdx.base.exception.ServiceException
public CompoundBooking createCreditDebitBooking(DepotEntity depotEntity, Date valueDate, short bookingType, BigDecimal quantity, String bookingTextName, BookingText bookingText, DepotPosition positionCredit, DepotPosition positionDebit, BookingOrigin originIdentity, String bookingTextSuffix, List<String> errors) throws org.openmdx.base.exception.ServiceException
depotEntity
- valueDate
- bookingType
- quantity
- bookingTextName
- bookingText
- positionCredit
- positionDebit
- originIdentity
- errors
- org.openmdx.base.exception.ServiceException
public void validateBookings(Date valueDate, short bookingType, Boolean noBalanceValidation, Boolean[] isCreditBookings, BigDecimal[] quantities, BookingText[] bookingTexts, DepotPosition[] depotPositions, BookingOrigin[] origins, List<String> errors) throws org.openmdx.base.exception.ServiceException
valueDate
- bookingType
- noBalanceValidation
- isCreditBookings
- quantities
- bookingTexts
- depotPositions
- origins
- errors
- org.openmdx.base.exception.ServiceException
public List<SingleBooking> appendBookings(CompoundBooking compoundBooking, Date valueDate, short bookingType, Boolean noBalanceValidation, Boolean[] isCreditBookings, BigDecimal[] quantities, BookingText[] bookingTexts, DepotPosition[] depotPositions, BookingOrigin[] origins, String[] bookingTextSuffixes, String[] bookingIds, List<String> errors) throws org.openmdx.base.exception.ServiceException
compoundBooking
- valueDate
- bookingType
- isCreditBookings
- quantities
- bookingTexts
- depotPositions
- origins
- bookingTextSuffixes
- bookingIds
- errors
- org.openmdx.base.exception.ServiceException
public CompoundBooking createCompoundBooking(DepotEntity depotEntity, String name, short bookingType) throws org.openmdx.base.exception.ServiceException
depotEntity
- name
- valueDate
- bookingType
- errors
- org.openmdx.base.exception.ServiceException
public DepotPosition getAndCreateDepotPosition(DepotEntity depotEntity, String depotNumber, Depot depot, String positionName, Product product, Date openingDate) throws org.openmdx.base.exception.ServiceException
depotEntity
- depotNumber
- depot
- positionName
- product
- openingDate
- org.openmdx.base.exception.ServiceException
public CompoundBooking createBookingByPosition(DepotEntity depotEntity, Date valueDate, short bookingType, BigDecimal quantity, String bookingTextName, BookingText bookingText, DepotPosition positionCredit, DepotPosition positionDebit, BookingOrigin origin, String bookingTextSuffix, List<String> errors) throws org.openmdx.base.exception.ServiceException
depotEntity
- valueDate
- bookingType
- quantity
- bookingTextName
- bookingText
- positionCredit
- positionDebit
- origin
- reversalOf
- errors
- org.openmdx.base.exception.ServiceException
public CompoundBooking createBookingByProduct(DepotEntity depotEntity, Date valueDate, short bookingType, BigDecimal quantity, String bookingTextName, BookingText bookingText, Product product, String depotNumberCredit, Depot depotCredit, String depotNumberDebit, Depot depotDebit, BookingOrigin origin, String bookingTextSuffix, List<String> errors) throws org.openmdx.base.exception.ServiceException
depotEntity
- valueDate
- bookingType
- quantity
- bookingTextName
- bookingText
- product
- depotNumberCredit
- depotCredit
- depotNumberDebit
- depotDebit
- origin
- reversalOf
- errors
- org.openmdx.base.exception.ServiceException
public CompoundBooking createBookingByPositionName(DepotEntity depotEntity, Date valueDate, short bookingType, BigDecimal quantity, String bookingTextName, BookingText bookingText, String positionName, String depotNumberCredit, Depot depotCredit, String depotNumberDebit, Depot depotDebit, BookingOrigin origin, String bookingTextSuffix, List<String> errors) throws org.openmdx.base.exception.ServiceException
depotEntity
- valueDate
- bookingType
- quantity
- bookingTextName
- bookingText
- positionName
- depotNumberCredit
- depotCredit
- depotNumberDebit
- depotDebit
- origin
- reversalOf
- errors
- org.openmdx.base.exception.ServiceException
public String getDepotReportItemPositionName(DepotPosition depotPosition) throws org.openmdx.base.exception.ServiceException
depotPosition
- org.openmdx.base.exception.ServiceException
public void refreshReport(Depot depot, DepotReport report, DepotReport reportPreviousPeriod, List<DepotPosition> includePositions, List<DepotPosition> excludePositions) throws org.openmdx.base.exception.ServiceException
depot
- report
- reportPreviousPeriod
- org.openmdx.base.exception.ServiceException
public void assertReports(Depot depot, short bookingStatusThreshold, List<DepotPosition> includePositions, List<DepotPosition> excludePositions) throws org.openmdx.base.exception.ServiceException
depot
- bookingStatusThreshold
- org.openmdx.base.exception.ServiceException
public CompoundBooking cancelCompoundBooking(CompoundBooking cb, List<String> errors) throws org.openmdx.base.exception.ServiceException
cb
- errors
- org.openmdx.base.exception.ServiceException
public void acceptCompoundBooking(CompoundBooking compoundBooking) throws org.openmdx.base.exception.ServiceException
compoundBooking
- org.openmdx.base.exception.ServiceException
public void acceptInventoryLevel(InventoryLevel inventoryLevel) throws org.openmdx.base.exception.ServiceException
inventoryLevel
- org.openmdx.base.exception.ServiceException
public void finalizeCompoundBooking(CompoundBooking cb) throws org.openmdx.base.exception.ServiceException
cb
- org.openmdx.base.exception.ServiceException
public void finalizeInventoryLevel(InventoryLevel inventoryLevel) throws org.openmdx.base.exception.ServiceException
inventoryLevel
- org.openmdx.base.exception.ServiceException
protected void removeCompoundBooking(CompoundBooking cb, boolean preDelete) throws org.openmdx.base.exception.ServiceException
compoundBooking
- preDelete
- org.openmdx.base.exception.ServiceException
protected void removeSimpleBooking(SimpleBooking simpleBooking, boolean preDelete) throws org.openmdx.base.exception.ServiceException
simpleBooking
- preDelete
- org.openmdx.base.exception.ServiceException
protected void removeSingleBooking(SingleBooking singleBooking, boolean preDelete) throws org.openmdx.base.exception.ServiceException
singleBooking
- preDelete
- org.openmdx.base.exception.ServiceException
public boolean hasBookings(CrxObject bookingTarget) throws org.openmdx.base.exception.ServiceException
bookingTarget
- org.openmdx.base.exception.ServiceException
protected void removeDepotEntity(DepotEntity depotEntity, boolean preDelete) throws org.openmdx.base.exception.ServiceException
depotEntity
- preDelete
- org.openmdx.base.exception.ServiceException
protected void removeDepotHolder(DepotHolder depotHolder, boolean preDelete) throws org.openmdx.base.exception.ServiceException
depotHolder
- preDelete
- org.openmdx.base.exception.ServiceException
protected void removeDepot(Depot depot, boolean preDelete) throws org.openmdx.base.exception.ServiceException
depot
- preDelete
- org.openmdx.base.exception.ServiceException
protected void removeDepotPosition(DepotPosition depotPosition, boolean preDelete) throws org.openmdx.base.exception.ServiceException
depotPosition
- preDelete
- org.openmdx.base.exception.ServiceException
protected void removeDepotGroup(DepotGroup depotGroup, boolean preDelete) throws org.openmdx.base.exception.ServiceException
depotGroup
- preDelete
- org.openmdx.base.exception.ServiceException
public Depot openDepot(DepotHolder depotHolder, String name, String description, String depotNumber, Date openingDate, DepotType depotType, DepotGroup depotGroup, List<String> errors) throws org.openmdx.base.exception.ServiceException
depotHolder
- name
- description
- depotNumber
- openingDate
- depotType
- depotGroup
- errors
- org.openmdx.base.exception.ServiceException
public void closeDepot(Depot depot, Date closingDate, List<String> errors) throws org.openmdx.base.exception.ServiceException
depot
- closingDate
- errors
- org.openmdx.base.exception.ServiceException
public DepotPosition openDepotPosition(Depot depot, String positionName, String positionDescription, Date openingDate, String depotPositionQualifier, Product product, Boolean isLocked) throws org.openmdx.base.exception.ServiceException
depot
- positionName
- positionDescription
- openingDate
- depotPositionQualifier
- product
- isLocked
- org.openmdx.base.exception.ServiceException
public void closeDepotPosition(DepotPosition depotPosition, Date closingDate, List<String> errors) throws org.openmdx.base.exception.ServiceException
depotPosition
- closingDate
- errors
- org.openmdx.base.exception.ServiceException
public void lockCompoundBooking(CompoundBooking cb, short lockingReason) throws org.openmdx.base.exception.ServiceException
cb
- lockingReason
- org.openmdx.base.exception.ServiceException
public void lockInventoryLevel(InventoryLevel inventoryLevel, short lockingReason) throws org.openmdx.base.exception.ServiceException
inventoryLevel
- lockingReason
- org.openmdx.base.exception.ServiceException
public void unlockCompoundBooking(CompoundBooking cb) throws org.openmdx.base.exception.ServiceException
cb
- org.openmdx.base.exception.ServiceException
public void unlockInventoryLevel(InventoryLevel inventoryLevel) throws org.openmdx.base.exception.ServiceException
inventoryLevel
- org.openmdx.base.exception.ServiceException
protected void createOrUpdateInventoryLevelCorrectionBooking(InventoryLevel inventoryLevel) throws org.openmdx.base.exception.ServiceException
inventoryLevel
- org.openmdx.base.exception.ServiceException
public void updateInventoryLevel(InventoryLevel inventoryLevel) throws org.openmdx.base.exception.ServiceException
inventoryLevel
- org.openmdx.base.exception.ServiceException
public void removeInventoryLevel(InventoryLevel inventoryLevel, boolean preDelete) throws org.openmdx.base.exception.ServiceException
inventoryLevel
- preDelete
- org.openmdx.base.exception.ServiceException
public void updateBookingTemplate(BookingTemplate bookingTemplate) throws org.openmdx.base.exception.ServiceException
bookingTemplate
- org.openmdx.base.exception.ServiceException
public void preDelete(org.openmdx.base.accessor.jmi.cci.RefObject_1_0 object, boolean preDelete) throws org.openmdx.base.exception.ServiceException
AbstractImpl
preDelete
in class AbstractImpl
org.openmdx.base.exception.ServiceException
public void preStore(org.openmdx.base.accessor.jmi.cci.RefObject_1_0 object) throws org.openmdx.base.exception.ServiceException
AbstractImpl
preStore
in class AbstractImpl
org.openmdx.base.exception.ServiceException
This software is published under the BSD license. Copyright © 2003-${build.year}, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.