Class EntityManagerCheckUtils
- java.lang.Object
-
- com.priint.pubserver.plugin.entitymanager.EntityManagerCheckUtils
-
public class EntityManagerCheckUtils extends java.lang.ObjectProvides methods to do checks inEntityManager.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcheckConnector(java.lang.String conConnector, com.priint.pubserver.plugin.interfaces.PluginControl connector, java.lang.String methodName)Asserts that conConnector and connector plugin are not null.static voidcheckEntity(com.priint.pubserver.entity.Entity entity, java.lang.String methodName, java.lang.Class<? extends com.priint.pubserver.entity.Entity> clazz, java.lang.String entityIdentifier, java.lang.String entityModelIdentifier)Asserts that entity is not null and check Otherwise throws EntityManagerException.static voidcheckEntityModel(java.lang.String entityModelIdentifier, com.priint.pubserver.entity.EntityModel entityModel, java.lang.String methodName)static voidcheckEntityParent(com.priint.pubserver.entity.Entity parent, java.lang.String methodName, java.lang.Class<? extends com.priint.pubserver.entity.Entity> clazzParent, java.lang.String entityIdentifier, java.lang.String entityModelIdentifier)static voidcheckEntityRoots(java.util.List<com.priint.pubserver.entity.EntityBucket> roots, java.lang.String methodName, java.lang.String entityModelIdentifier)static voidcheckRequiredParameter(java.lang.String parameterName, java.lang.String parameter, java.lang.String methodName)Asserts that a string collection parameter is not empty and throws exception if necessary.static voidcheckRequiredParameter(java.lang.String parameterName, java.util.Collection<?> parameter, java.lang.String methodName)Asserts that a collection parameter is not empty and throws exception if necessary.
-
-
-
Method Detail
-
checkEntityModel
public static void checkEntityModel(java.lang.String entityModelIdentifier, com.priint.pubserver.entity.EntityModel entityModel, java.lang.String methodName) throws com.priint.pubserver.plugin.exception.EntityManagerException- Throws:
com.priint.pubserver.plugin.exception.EntityManagerException
-
checkEntityParent
public static void checkEntityParent(com.priint.pubserver.entity.Entity parent, java.lang.String methodName, java.lang.Class<? extends com.priint.pubserver.entity.Entity> clazzParent, java.lang.String entityIdentifier, java.lang.String entityModelIdentifier) throws com.priint.pubserver.plugin.exception.EntityManagerException- Throws:
com.priint.pubserver.plugin.exception.EntityManagerException
-
checkEntity
public static void checkEntity(com.priint.pubserver.entity.Entity entity, java.lang.String methodName, java.lang.Class<? extends com.priint.pubserver.entity.Entity> clazz, java.lang.String entityIdentifier, java.lang.String entityModelIdentifier) throws com.priint.pubserver.plugin.exception.EntityManagerExceptionAsserts that entity is not null and check Otherwise throws EntityManagerException. Asserts that connector entity identifier is not empty (Only for PublishingHubDBConnector and MuaConnector ). Otherwise throws EntityManagerException.- Parameters:
entity- Name of the connector.methodName- The name of the method for logging, tracing or exceptions.clazz- The entity class.entityIdentifier- The identifier of the entityentityModelIdentifier- The identifier of the model- Throws:
com.priint.pubserver.plugin.exception.EntityManagerException
-
checkEntityRoots
public static void checkEntityRoots(java.util.List<com.priint.pubserver.entity.EntityBucket> roots, java.lang.String methodName, java.lang.String entityModelIdentifier) throws com.priint.pubserver.plugin.exception.EntityManagerException- Throws:
com.priint.pubserver.plugin.exception.EntityManagerException
-
checkConnector
public static void checkConnector(java.lang.String conConnector, com.priint.pubserver.plugin.interfaces.PluginControl connector, java.lang.String methodName) throws com.priint.pubserver.plugin.exception.EntityManagerExceptionAsserts that conConnector and connector plugin are not null. Otherwise throws EntityManagerException.- Parameters:
conConnector- Name of the connector.connector- connector plugin or nullmethodName- The name of the method for logging, tracing or exceptions.- Throws:
com.priint.pubserver.plugin.exception.EntityManagerException
-
checkRequiredParameter
public static void checkRequiredParameter(java.lang.String parameterName, java.util.Collection<?> parameter, java.lang.String methodName) throws com.priint.pubserver.plugin.exception.EntityManagerExceptionAsserts that a collection parameter is not empty and throws exception if necessary.- Parameters:
parameterName-parameter-methodName-- Throws:
com.priint.pubserver.plugin.exception.EntityManagerException
-
checkRequiredParameter
public static void checkRequiredParameter(java.lang.String parameterName, java.lang.String parameter, java.lang.String methodName) throws com.priint.pubserver.plugin.exception.EntityManagerExceptionAsserts that a string collection parameter is not empty and throws exception if necessary.- Parameters:
parameterName-parameter-methodName-- Throws:
com.priint.pubserver.plugin.exception.EntityManagerException
-
-