public enum PersistentAspect extends Enum<PersistentAspect>
Can be set on a thread/transaction level or on individual object level.
Deviations from standard behavior are reset at the end of the transaction.
Enum Constant and Description |
---|
ALL_PERMISSIONS
Automatically grant all permissions on all objects.
|
NO_CHANGE_SYSTEMFIELDS
Don't change standard fields (createdBy, changedBy, createdAt, changedAt) when a DMSObject is inserted or updated.
|
NO_DEFERREDCHECK
Avoid checking of deferred updates during update and delete.
|
NO_LOG
Avoid writing of Log Information insert and update and delete via OrgData.
|
NO_OBJECTEXTENSIONCLEANUP
Avoid deleting of attached object extensions when their referencing persistent is deleted.
|
NO_OPTLOCKING
Avoid checking of transaction id in update.
|
NO_PERMISSIONCHECK
Avoid checking of permissions during insert, update and delete via OrgData.
|
NO_VALIDATION
Avoid checking of validation constraints during insert and update.
|
Modifier and Type | Field and Description |
---|---|
static org.slf4j.Logger |
logger |
Modifier and Type | Method and Description |
---|---|
static AutoCloseablePersistentAspect |
add(PersistentAspect... aspects)
Add the PersistentAspects at thread level.
|
static AutoCloseablePersistentAspect |
add(Persistent p,
PersistentAspect... aspects)
Add the PersistentAspects for an object.
|
static void |
clear()
Clears all PersistentAspects.
|
static void |
clear(Persistent p)
Clears all PersistentAspects of an object.
|
static EnumSet<PersistentAspect> |
get()
Get the set of currently set PersistentAspects at the thread level.
|
static EnumSet<PersistentAspect> |
get(Persistent p)
Get the set of currently set PersistentAspects for an object.
|
static EnumSet<PersistentAspect> |
getForObject(Persistent p)
Get the set of currently set PersistentAspects for an object.
|
static boolean |
isSet(PersistentAspect aspect)
Checks if a PersistentAspect is active at the thread level.
|
static boolean |
isSet(Persistent p,
PersistentAspect aspect)
Checks if a PersistentAspect is active for an object.
|
static boolean |
isSetForObject(Persistent p,
PersistentAspect aspect)
Checks if a PersistentAspect is active for an object.
|
static AutoCloseablePersistentAspect |
remove(PersistentAspect... aspects)
Remove the PersistentAspects at thread level.
|
static AutoCloseablePersistentAspect |
remove(Persistent p,
PersistentAspect... aspects)
Remove the PersistentAspects from an object.
|
static void |
set(EnumSet<PersistentAspect> aspects)
Set the PersistentAspects at the thread level.
|
static void |
set(Persistent p,
EnumSet<PersistentAspect> aspects)
Set the PersistentAspects for an object.
|
static PersistentAspect |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PersistentAspect[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PersistentAspect NO_OPTLOCKING
OptimisticLocking
.
In former times used on Thread Level;
public static final PersistentAspect NO_DEFERREDCHECK
In former times used on Thread Level:
public static final PersistentAspect NO_VALIDATION
In former times used on Thread Level:
public static final PersistentAspect NO_PERMISSIONCHECK
ALL_PERMISSIONS
.
In former times used on object level:
public static final PersistentAspect NO_LOG
In former times used on object level:
public static final PersistentAspect NO_OBJECTEXTENSIONCLEANUP
public static final PersistentAspect ALL_PERMISSIONS
NO_PERMISSIONCHECK
.
Is honored solely at thread level. Setting this on individual objects has no effect whatsoever.
public static final PersistentAspect NO_CHANGE_SYSTEMFIELDS
In former times used on object level:
public static PersistentAspect[] values()
for (PersistentAspect c : PersistentAspect.values()) System.out.println(c);
public static PersistentAspect valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static EnumSet<PersistentAspect> get()
public static void set(EnumSet<PersistentAspect> aspects)
aspects
- the EnumSet of PersistentAspects to activatepublic static boolean isSet(PersistentAspect aspect)
aspect
- the PersistentAspect to checkpublic static AutoCloseablePersistentAspect add(PersistentAspect... aspects)
aspects
- the PersistentAspects to addpublic static AutoCloseablePersistentAspect remove(PersistentAspect... aspects)
aspects
- the PersistentAspects to removepublic static void clear()
public static EnumSet<PersistentAspect> get(Persistent p)
p
- the Persistent for which to get the PersistentAspectspublic static EnumSet<PersistentAspect> getForObject(Persistent p)
p
- the Persistent for which to get the PersistentAspectspublic static void set(Persistent p, EnumSet<PersistentAspect> aspects)
The oid of the object must have been set before.
p
- the Persistent for which to set the PersistentAspectsaspects
- the EnumSet of PersistentAspects to activatepublic static boolean isSet(Persistent p, PersistentAspect aspect)
aspect
- the PersistentAspect to checkp
- the Persistent to check forpublic static boolean isSetForObject(Persistent p, PersistentAspect aspect)
aspect
- the PersistentAspect to checkp
- the Persistent to check forpublic static AutoCloseablePersistentAspect add(Persistent p, PersistentAspect... aspects)
The oid of the object must have been set before.
p
- the Persistent for which to add the PersistentAspectsaspects
- the PersistentAspects to addpublic static AutoCloseablePersistentAspect remove(Persistent p, PersistentAspect... aspects)
p
- the Persistent from which to remove the PersistentAspectsaspects
- the PersistentAspects to removepublic static void clear(Persistent p)
p
- the object to clear all persistent aspects for@enterprise 10.0.39049 Copyright © 2024 FREQUENTIS AG. All Rights Reserved.