Class PersistenceTestUtils

java.lang.Object
de.hybris.platform.servicelayer.internal.model.impl.PersistenceTestUtils

public class PersistenceTestUtils extends Object
Utility class for tests. Allows to verify if the tested model is fully SLD compatible.
  • Constructor Details

    • PersistenceTestUtils

      public PersistenceTestUtils()
  • Method Details

    • saveAndVerifyThatPersistedThroughSld

      public static <T extends AbstractItemModel> void saveAndVerifyThatPersistedThroughSld(ModelService modelService, T item)
      Saves and asserts that a given item is saved through SLD instead of Jalo.
      Parameters:
      modelService - model service for item saving
      item - item to save
    • verifyThatUnderlyingPersistenceObjectIsSld

      public static void verifyThatUnderlyingPersistenceObjectIsSld(ItemModel item)
      Asserts if a given item is backed by persistence object of SLD type.
      Parameters:
      item - item to verify
    • adjustToDB

      public static Date adjustToDB(Date date)
      Simulates the effect of database storing a particular date.

      On MySQL this means dropping all milliseconds!