public class DBManBOChangeEvent extends DBManBOEvent implements DBManBOChangeEventI
| Constructor and Description |
|---|
DBManBOChangeEvent(long[] _txIds,
long[] _nodeIds,
long[] _bOIds,
java.lang.Class[] _bOClasses,
short[] _bOFlags,
BO[] _bOs) |
| Modifier and Type | Method and Description |
|---|---|
void |
addServerSideCalculatedInformation(DBManEventFilter f)
adds any server-side calculated information being calculated using the passed DBManEventFilter,
stored in the map serverSideCalculatedInformation using DBManEventFilter.toString() as key
|
short |
getBOFlag(int i) |
java.util.List<java.lang.Long> |
getBOIdsForClass(java.lang.Class clazz,
short bOFlag)
Returns the Ids of all BOs in this event matching the passed class and flag.
|
java.util.List<java.lang.Long> |
getBOIdsForClasses(java.lang.Class[] clazzes,
short bOFlag)
Returns the Ids of all BOs in this event matching any of the passed classes and flag.
|
java.util.List |
getBOs(BOLoaderI bol,
java.lang.Class[] clazzes,
short bOFlag)
Loads and returns the BOs of this event matching the passed flag and classes.
|
java.util.List |
getBOs(BOLoaderI bol,
java.lang.Class clazz,
boolean onlyChanged)
Loads and returns the changed BOs of this event.
|
java.util.List |
getBOs(BOLoaderI bol,
java.lang.Class clazz,
short bOFlag)
Loads and returns the BOs of this event matching the passed flag.
|
LazyBOReference[] |
getBOsAsLazyBOReferences(BOLoaderI bol)
Used for NotificationModule to avoid unnecessary object creation (and might
probably be useful elsewhere too, so placed this method here instead of in
NotificationModule).
|
LazyBOReference[] |
getBOsAsLazyBOReferences(BOLoaderI bol,
java.lang.Class clazz) |
LazyBOReference[] |
getBOsAsLazyBOReferences(BOLoaderI bol,
java.lang.Class clazz,
boolean created) |
LazyBOReference[] |
getBOsAsLazyBOReferences(BOLoaderI bol,
java.lang.Class clazz,
boolean created,
boolean changed) |
LazyBOReference[] |
getBOsAsLazyBOReferences(BOLoaderI bol,
java.lang.Class clazz,
boolean created,
boolean changed,
boolean deleted) |
java.util.Map<java.lang.Long,BP> |
getBPsByBOId(java.lang.Long boId)
Return all BPs from the linked BTs for a BO of the given Id
|
java.util.Map<java.lang.Long,java.util.Collection<BP>> |
getBPsGroupedByBOId(java.lang.Class<? extends BOI> onlyForBOClass)
Return a map of BO Ids linked to a collection of BPs for the BO Id,
for each BO of the given type or all BOs in this event
|
BT |
getBT(int i) |
int |
getBTsSize() |
java.util.List<java.lang.Long> |
getChangedBOIds(java.lang.Class clazz)
Returns the Ids of all changed BOs in this event matching the passed class.
|
java.util.List<java.lang.Long> |
getChangedBOIds(java.lang.Class[] clazzes)
Returns the Ids of all changed BOs in this event matching any of the passed classes.
|
java.util.Map<java.lang.Long,FlagStore> |
getChangedBOs(BOLoaderI bol) |
java.util.Map<java.lang.Long,FlagStore> |
getChangedBOs(BOLoaderI bol,
java.lang.Class clazz) |
java.util.Map<java.lang.Long,FlagStore> |
getChangedBOs(BOLoaderI bol,
java.lang.Class clazz,
java.lang.String attrName) |
java.util.Map<java.lang.Long,FlagStore> |
getChangedBOs(BOLoaderI bol,
java.lang.Class clazz,
java.lang.String[] attrNames)
Load all BOs that were changed by this event with the given loader and return them.
|
java.util.Map<java.lang.Long,FlagStore> |
getChangedBOs(BOLoaderI bol,
java.lang.Class clazz,
java.lang.String[] attrNames,
boolean lazy) |
java.util.Map<java.lang.Long,FlagStore> |
getChangedBOs(BOLoaderI bol,
java.lang.Class clazz,
java.lang.String[] attrNames,
boolean lazy,
boolean warnSlow) |
java.util.Map<java.lang.Long,FlagStore> |
getChangedBOs(BOLoaderI bol,
java.lang.Class clazz,
java.lang.String[] attrNames,
boolean lazy,
boolean warnSlow,
boolean includeDeletions) |
java.util.Map<java.lang.Long,FlagStore> |
getChangedBOs(BOLoaderI bol,
java.lang.Class clazz,
java.lang.String attrName,
boolean lazy) |
java.util.Map<java.lang.Long,FlagStore> |
getChangedBOs(BOLoaderI bol,
java.lang.Class clazz,
java.lang.String attrName,
boolean lazy,
boolean warnSlow) |
java.util.Map<java.lang.Long,FlagStore> |
getChangedBOs(BOLoaderI bol,
java.lang.Class clazz,
java.lang.String attrName,
boolean lazy,
boolean warnSlow,
boolean includeDeletions) |
java.util.Map<java.lang.Long,FlagStore> |
getCreatedBOs(BOLoaderI bol)
Loads and returns the newly created BOs of this event.
|
java.util.Map<java.lang.Long,FlagStore> |
getCreatedBOs(BOLoaderI bol,
java.lang.Class clazz) |
java.util.Map<java.lang.Long,FlagStore> |
getCreatedBOs(BOLoaderI bol,
java.lang.Class clazz,
boolean includeUndeletions) |
java.lang.String |
getDescription() |
DBManEvent |
getFilteringInstance(DBManEventFilter f)
Used on client- and server-side for getting an event which only returns the data actually requested in the passed filter,
possibly enriched with additional information calculated by an optional server-side information calculator.
|
long[] |
getNodeIds() |
int[] |
getRelevantIndices(DBManEventFilter f)
returns an int-array containing all indices at which actually requested,
i.e. fitting, objects are found in this event
|
java.lang.Object[] |
getServerSideCalculatedInformationForClass(java.lang.Class clazz,
DBManEventFilter f) |
java.lang.Object[] |
getServerSideCalculatedInformationForClasses(java.lang.Class[] clazzes,
DBManEventFilter f) |
int |
getSize() |
long[] |
getTxIds() |
int |
getType() |
java.util.Map<java.lang.Long,Benutzer> |
getUsers(BOLoaderI bol)
Returns all users which are involved in Transactions included in this event
|
java.lang.Boolean |
isFromNode(long nodeNumber)
Checks whether this Event contains a Transaction which originated on the node
with the given number.
|
java.lang.Boolean |
isFromUs() |
boolean |
isOnlyTriggeredBy(Benutzer user)
Checks whether this event contains only Transactions and changes made by the given user.
|
boolean |
isTriggeredBy(Benutzer user)
Checks whether this Event contains a Transaction which is assigned to the given user
|
void |
markForTrimming(DBManEventFilter f)
(possibly) builds and fills a boolean-array with markers at the indices at which actually requested,
i.e. fitting, objects are found in this event or sets noTrimming if no filter is passed
|
static DBManBOChangeEvent |
of(TransactionConflictReport tcr,
Transaction tx)
Initializes a new event from the given tcr and tx and returns it.
|
DBManEvent |
trim()
uses the information stored by markForTrimming in the passed event e
(either noTrimming or requestedInAnyFilter) to trim down the data in this event
|
boolean |
wasChanged(int i) |
boolean |
wasCreated(int i) |
boolean |
wasDeleted(int i) |
boolean |
wasUndeleted(int i) |
getBO, getBOClass, getBOId, getBOIdsForClass, getBOIdsForClasses, getBOs, getBOs, isEmpty, isOneOfClass, isOneOfClassesclone, getAdditionalInformation, getServerNodeNumber, getServerSideCalculatedInformation, getTrimmedSize, setServerNodeNumber, setServerSideCalculatedInformationequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBOClass, getBOIdpublic DBManBOChangeEvent(long[] _txIds,
long[] _nodeIds,
long[] _bOIds,
java.lang.Class[] _bOClasses,
short[] _bOFlags,
BO[] _bOs)
public static DBManBOChangeEvent of(TransactionConflictReport tcr, Transaction tx)
public int getSize()
getSize in interface DBManBOChangeEventIgetSize in class DBManBOEventpublic long[] getTxIds()
getTxIds in interface DBManBOChangeEventIpublic long[] getNodeIds()
public java.lang.Boolean isFromNode(long nodeNumber)
nodeNumber - The number of the node to check against this Eventpublic java.lang.Boolean isFromUs()
isFromUs in interface DBManBOChangeEventIpublic boolean isTriggeredBy(Benutzer user)
isTriggeredBy in interface DBManBOChangeEventIuser - The user to check against this Eventpublic boolean isOnlyTriggeredBy(Benutzer user)
if (event.isFromUs() && event.isOnlyTriggeredBy(api.getCurrentUser())) return;isOnlyTriggeredBy in interface DBManBOChangeEventIuser - the user to check against this Eventpublic java.util.Map<java.lang.Long,Benutzer> getUsers(BOLoaderI bol)
bol - A BOLoader to load the userspublic int getBTsSize()
public BT getBT(int i)
public java.util.Map<java.lang.Long,BP> getBPsByBOId(java.lang.Long boId)
boId - public java.util.Map<java.lang.Long,java.util.Collection<BP>> getBPsGroupedByBOId(java.lang.Class<? extends BOI> onlyForBOClass)
onlyForBOClass - the BO Ids are filtered by this typepublic short getBOFlag(int i)
public int getType()
getType in class DBManEventpublic java.lang.String getDescription()
getDescription in class DBManEventpublic java.util.Map<java.lang.Long,FlagStore> getCreatedBOs(BOLoaderI bol)
FlagStore object that additionally provides an overview on the type of recorded changes by
this event.getCreatedBOs in interface DBManBOChangeEventIbol - a BOLoaderI which will (only) be used to getBOs() and as a
"cache" for the BOs that are loaded this way.clazz - if given/not null tells that only BOs of this class
(including subclasses) should be loaded and returned; if
not given/null all BOs will be loaded.public java.util.Map<java.lang.Long,FlagStore> getCreatedBOs(BOLoaderI bol, java.lang.Class clazz)
getCreatedBOs in interface DBManBOChangeEventIpublic java.util.Map<java.lang.Long,FlagStore> getCreatedBOs(BOLoaderI bol, java.lang.Class clazz, boolean includeUndeletions)
public LazyBOReference[] getBOsAsLazyBOReferences(BOLoaderI bol)
public LazyBOReference[] getBOsAsLazyBOReferences(BOLoaderI bol, java.lang.Class clazz)
public LazyBOReference[] getBOsAsLazyBOReferences(BOLoaderI bol, java.lang.Class clazz, boolean created)
public LazyBOReference[] getBOsAsLazyBOReferences(BOLoaderI bol, java.lang.Class clazz, boolean created, boolean changed)
public LazyBOReference[] getBOsAsLazyBOReferences(BOLoaderI bol, java.lang.Class clazz, boolean created, boolean changed, boolean deleted)
public java.util.Map<java.lang.Long,FlagStore> getChangedBOs(BOLoaderI bol)
getChangedBOs in interface DBManBOChangeEventI#getChangedBOs(BOLOaderI, Class, String[], boolean, boolean, boolean)public java.util.Map<java.lang.Long,FlagStore> getChangedBOs(BOLoaderI bol, java.lang.Class clazz)
getChangedBOs in interface DBManBOChangeEventIpublic java.util.Map<java.lang.Long,FlagStore> getChangedBOs(BOLoaderI bol, java.lang.Class clazz, java.lang.String attrName)
getChangedBOs in interface DBManBOChangeEventIpublic java.util.Map<java.lang.Long,FlagStore> getChangedBOs(BOLoaderI bol, java.lang.Class clazz, java.lang.String attrName, boolean lazy)
public java.util.Map<java.lang.Long,FlagStore> getChangedBOs(BOLoaderI bol, java.lang.Class clazz, java.lang.String attrName, boolean lazy, boolean warnSlow)
public java.util.Map<java.lang.Long,FlagStore> getChangedBOs(BOLoaderI bol, java.lang.Class clazz, java.lang.String attrName, boolean lazy, boolean warnSlow, boolean includeDeletions)
public java.util.Map<java.lang.Long,FlagStore> getChangedBOs(BOLoaderI bol, java.lang.Class clazz, java.lang.String[] attrNames)
bol - the nonnull BOLoader to load matching BOs with.clazz - only instances of the given class are returned, null to disable this allowlist-filter.attrNames - only include BOs if one of the given attribute names were changed.
Names are only checked against changes and do not have to exist on all applicable BOs.lazy - if true, then the resulting BOs are wrapped internally into a SoftReference and allowed for cleanup
during memory pressure. Will automatically be reloaded on access. Defaults to false.warnSlow - if true and attrNames is empty or null, then logs a warning due to slow BT fetch. Defaults to false.includeDeletions - if true, then deleted BOs are included as well. Defaults to false.FlagStore for and with this loaded BO as value.public java.util.Map<java.lang.Long,FlagStore> getChangedBOs(BOLoaderI bol, java.lang.Class clazz, java.lang.String[] attrNames, boolean lazy)
public java.util.Map<java.lang.Long,FlagStore> getChangedBOs(BOLoaderI bol, java.lang.Class clazz, java.lang.String[] attrNames, boolean lazy, boolean warnSlow)
public java.util.Map<java.lang.Long,FlagStore> getChangedBOs(BOLoaderI bol, java.lang.Class clazz, java.lang.String[] attrNames, boolean lazy, boolean warnSlow, boolean includeDeletions)
public java.util.List<java.lang.Long> getChangedBOIds(java.lang.Class clazz)
clazz - return only BO-Ids of this class (including subclasses)public java.util.List<java.lang.Long> getChangedBOIds(java.lang.Class[] clazzes)
clazzes - return only BO-Ids of these classes (including subclasses)public java.util.List<java.lang.Long> getBOIdsForClass(java.lang.Class clazz,
short bOFlag)
clazz - return only BO-Ids of this class (including subclasses)bOFlag - return only BO-Ids of BOs which have any of these or-ed FlagStore.FLAG_*public java.util.List<java.lang.Long> getBOIdsForClasses(java.lang.Class[] clazzes,
short bOFlag)
clazzes - return only BO-Ids of these classes (including subclasses)bOFlag - return only BO-Ids of BOs which have any of these or-ed FlagStore.FLAG_*public java.util.List getBOs(BOLoaderI bol, java.lang.Class clazz, boolean onlyChanged)
bol - the BOLoaderI which should be used for loading the BOs.clazz - if given/not null tells that only BOs of this class
(including subclasses) should be loaded and returned; if
not given/null all BOs will be loaded.public java.util.List getBOs(BOLoaderI bol, java.lang.Class[] clazzes, short bOFlag)
bol - the BOLoaderI which should be used for loading the BOs.clazzes - filters the BOs, so that only these types are returnedbOFlag - return only BO-Ids of BOs which have any of these or-ed FlagStore.FLAG_*public java.util.List getBOs(BOLoaderI bol, java.lang.Class clazz, short bOFlag)
bol - the BOLoaderI which should be used for loading the BOs.clazz - if given/not null tells that only BOs of this class
(including subclasses) should be loaded and returned; if
not given/null all BOs will be loaded.bOFlag - return only BO-Ids of BOs which have any of these or-ed FlagStore.FLAG_*public void addServerSideCalculatedInformation(DBManEventFilter f)
DBManEventaddServerSideCalculatedInformation in class DBManEventpublic java.lang.Object[] getServerSideCalculatedInformationForClass(java.lang.Class clazz,
DBManEventFilter f)
public java.lang.Object[] getServerSideCalculatedInformationForClasses(java.lang.Class[] clazzes,
DBManEventFilter f)
public void markForTrimming(DBManEventFilter f)
public int[] getRelevantIndices(DBManEventFilter f)
public DBManEvent trim()
public DBManEvent getFilteringInstance(DBManEventFilter f)
DBManEventgetFilteringInstance in class DBManEventpublic boolean wasChanged(int i)
public boolean wasCreated(int i)
public boolean wasDeleted(int i)
public boolean wasUndeleted(int i)
Copyright © 2000-2025 OAshi S.à r.l. All Rights Reserved.