Class SynchronisationUtils

java.lang.Object
ch.tocco.nice2.synchronisation.api.SynchronisationUtils

public final class SynchronisationUtils extends Object
  • Method Details

    • setNTo1Relation

      public static void setNTo1Relation(Context context, Entity entity, String relationName, String entityName, String uniqueId)
    • setNTo1Relation

      public static void setNTo1Relation(Context context, Entity entity, String relationName, String entityName, String uniqueId, @Nullable @Nullable Supplier<Entity> targetEntityCreationFunction)
    • setNToNRelation

      public static void setNToNRelation(Context context, Entity entity, String relationName, String entityName, String commaSeparatedUniqueIds)
    • trimArray

      public static String[] trimArray(String[] input)
    • deleteRelatedEntities

      public static void deleteRelatedEntities(Entity sourceEntity, String relationName)
    • writeLocalizedField

      public static void writeLocalizedField(TextResources textResources, Entity entity, String fieldName, String textResourceKey)
    • writeNullableToNonNullableField

      public static void writeNullableToNonNullableField(Entity target, String fieldName, @Nullable @Nullable Object value)
    • writeResourceToString

      public static void writeResourceToString(Entity entity, String fieldName, @Nullable @Nullable ModelResource resource) throws IOException
      Throws:
      IOException