Class EntityManagerCheckUtils

java.lang.Object
com.priint.pubserver.plugin.entitymanager.EntityManagerCheckUtils

public class EntityManagerCheckUtils extends Object
Provides methods to do checks in EntityManager.
  • Method Details

    • checkEntityModel

      public static void checkEntityModel(String entityModelIdentifier, com.priint.pubserver.entity.EntityModel entityModel, 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, String methodName, Class<? extends com.priint.pubserver.entity.Entity> clazzParent, String entityIdentifier, 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, String methodName, Class<? extends com.priint.pubserver.entity.Entity> clazz, String entityIdentifier, String entityModelIdentifier) throws com.priint.pubserver.plugin.exception.EntityManagerException
      Asserts 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 entity
      entityModelIdentifier - The identifier of the model
      Throws:
      com.priint.pubserver.plugin.exception.EntityManagerException
    • checkEntityRoots

      public static void checkEntityRoots(List<com.priint.pubserver.entity.EntityBucket> roots, String methodName, String entityModelIdentifier) throws com.priint.pubserver.plugin.exception.EntityManagerException
      Throws:
      com.priint.pubserver.plugin.exception.EntityManagerException
    • checkConnector

      public static void checkConnector(String conConnector, com.priint.pubserver.plugin.interfaces.PluginControl connector, String methodName) throws com.priint.pubserver.plugin.exception.EntityManagerException
      Asserts that conConnector and connector plugin are not null. Otherwise throws EntityManagerException.
      Parameters:
      conConnector - Name of the connector.
      connector - connector plugin or null
      methodName - The name of the method for logging, tracing or exceptions.
      Throws:
      com.priint.pubserver.plugin.exception.EntityManagerException
    • checkRequiredParameter

      public static void checkRequiredParameter(String parameterName, Collection<?> parameter, String methodName) throws com.priint.pubserver.plugin.exception.EntityManagerException
      Asserts 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(String parameterName, String parameter, String methodName) throws com.priint.pubserver.plugin.exception.EntityManagerException
      Asserts that a string collection parameter is not empty and throws exception if necessary.
      Parameters:
      parameterName -
      parameter -
      methodName -
      Throws:
      com.priint.pubserver.plugin.exception.EntityManagerException