Class SynchronisationUtils
java.lang.Object
ch.tocco.nice2.synchronisation.api.SynchronisationUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
deleteRelatedEntities
(Entity sourceEntity, String relationName) static void
setNTo1Relation
(Context context, Entity entity, String relationName, String entityName, String uniqueId) static void
setNTo1Relation
(Context context, Entity entity, String relationName, String entityName, String uniqueId, @Nullable Supplier<Entity> targetEntityCreationFunction) static void
setNToNRelation
(Context context, Entity entity, String relationName, String entityName, String commaSeparatedUniqueIds) static String[]
static void
writeLocalizedField
(TextResources textResources, Entity entity, String fieldName, String textResourceKey) static void
writeNullableToNonNullableField
(Entity target, String fieldName, @Nullable Object value) static void
writeResourceToString
(Entity entity, String fieldName, @Nullable ModelResource resource)
-
Method Details
-
setNTo1Relation
-
setNTo1Relation
-
setNToNRelation
-
trimArray
-
deleteRelatedEntities
-
writeLocalizedField
public static void writeLocalizedField(TextResources textResources, Entity entity, String fieldName, String textResourceKey) -
writeNullableToNonNullableField
-
writeResourceToString
public static void writeResourceToString(Entity entity, String fieldName, @Nullable @Nullable ModelResource resource) throws IOException - Throws:
IOException
-