public class PersistenceHelper
extends java.lang.Object
Delegates to EntityStates
bean, so consider using it directly.
Constructor and Description |
---|
PersistenceHelper() |
Modifier and Type | Method and Description |
---|---|
static void |
checkLoaded(java.lang.Object entity,
java.lang.String... properties) |
static void |
checkLoadedWithView(Entity entity,
java.lang.String viewName)
Check that all properties of the view are loaded from DB for the passed entity.
|
static java.lang.String |
getEntityName(java.lang.Class<?> entityClass)
Deprecated.
|
static boolean |
isDeleted(java.lang.Object entity) |
static boolean |
isDetached(java.lang.Object entity) |
static boolean |
isLoaded(java.lang.Object entity,
java.lang.String property) |
static boolean |
isLoadedWithView(Entity entity,
java.lang.String viewName)
Check that all properties of the view are loaded from DB for the passed entity.
|
static boolean |
isManaged(java.lang.Object entity) |
static boolean |
isNew(java.lang.Object entity) |
static boolean |
isSoftDeleted(java.lang.Class entityClass)
Deprecated.
|
static void |
makeDetached(BaseGenericIdEntity entity) |
static void |
makePatch(BaseGenericIdEntity entity) |
public static boolean isNew(java.lang.Object entity)
EntityStates.isNew(Object)
public static boolean isManaged(java.lang.Object entity)
EntityStates.isManaged(Object)
public static boolean isDetached(java.lang.Object entity)
EntityStates.isDeleted(Object)
@Deprecated public static java.lang.String getEntityName(java.lang.Class<?> entityClass)
MetadataTools.getEntityName(Class)
instead.@Deprecated public static boolean isSoftDeleted(java.lang.Class entityClass)
MetadataTools.isSoftDeleted(java.lang.Class)
instead.public static boolean isLoaded(java.lang.Object entity, java.lang.String property)
EntityStates.isLoaded(Object, String)
public static void checkLoaded(java.lang.Object entity, java.lang.String... properties)
public static void checkLoadedWithView(Entity entity, java.lang.String viewName)
entity
- entityviewName
- view namejava.lang.IllegalArgumentException
- if at least one of properties is not loadedpublic static boolean isLoadedWithView(Entity entity, java.lang.String viewName)
entity
- entityviewName
- view namepublic static boolean isDeleted(java.lang.Object entity)
EntityStates.isDeleted(Object)
public static void makeDetached(BaseGenericIdEntity entity)
public static void makePatch(BaseGenericIdEntity entity)