Package org.bedework.calfacade.wrappers
Class BwDbentityWrapper<T extends BwDbentity>
java.lang.Object
org.bedework.calfacade.base.DumpEntity<T>
org.bedework.calfacade.base.BwUnversionedDbentity<T>
org.bedework.calfacade.base.BwDbentity
org.bedework.calfacade.wrappers.BwDbentityWrapper<T>
- Type Parameters:
T-
- All Implemented Interfaces:
Serializable,Comparable,EntityWrapper<T>,org.bedework.util.logging.Logged
public abstract class BwDbentityWrapper<T extends BwDbentity>
extends BwDbentity
implements EntityWrapper<T>
Base class for wrappers. These classes can be extended to protect methods of
the wrapped class and to carry out validation and change tracking.
- Author:
- Mike Douglass
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bedework.calfacade.base.DumpEntity
DumpEntity.DumpType -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAvoid get and set so we don't expose the underlying object to request streams.intgetSeq()Get the entity seqintvoidvoidsetSizeChange(int val) Used to track size changes.voidupdateSizeChange(int val) Update the size change with the given incrementvoidupdateSizeChange(BwDbentity oldVal, BwDbentity newVal) Update the size change with the size differenceMethods inherited from class org.bedework.calfacade.base.BwDbentity
addDeletedEntity, afterDeletion, beforeDeletion, beforeSave, beforeUpdate, getByteSize, getDeletedEntities, length, setByteSize, setSeqMethods inherited from class org.bedework.calfacade.base.BwUnversionedDbentity
clone, compareTo, equals, getHref, getId, hashCode, markUnsaved, setHref, setId, toStringSegment, unsavedMethods inherited from class org.bedework.calfacade.base.DumpEntity
dump, dump, getLogger, hasDumpValueMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.bedework.util.logging.Logged
audit, debug, debug, debug, enableAuditLogger, enableErrorLogger, enableMetricsLogger, error, error, error, getLogLevel, info, isAuditLoggerEnabled, isErrorLoggerEnabled, isMetricsDebugEnabled, isMetricsLoggerEnabled, metrics, setLoggerClass, setLoggerClass, trace, trace, trace, warn
-
Field Details
-
entity
-
-
Constructor Details
-
BwDbentityWrapper
Constructor- Parameters:
entity-
-
-
Method Details
-
putEntity
- Specified by:
putEntityin interfaceEntityWrapper<T extends BwDbentity>
-
fetchEntity
Description copied from interface:EntityWrapperAvoid get and set so we don't expose the underlying object to request streams.- Specified by:
fetchEntityin interfaceEntityWrapper<T extends BwDbentity>- Returns:
- T
-
getSeq
public int getSeq()Description copied from class:BwDbentityGet the entity seq- Overrides:
getSeqin classBwDbentity- Returns:
- int the entity seq
-
setSizeChange
public void setSizeChange(int val) Used to track size changes.- Parameters:
val-
-
getSizeChange
public int getSizeChange()- Returns:
- int last byte size change
-
updateSizeChange
public void updateSizeChange(int val) Update the size change with the given increment- Parameters:
val-
-
updateSizeChange
Update the size change with the size difference- Parameters:
oldVal-newVal-
-