public Iso8601DateTimeJacksonModule() { addSerializer(DateTime.class, new Iso8601JsonSerializer()); addDeserializer(DateTime.class, new Iso8601JsonDeserializer()); } }
CategoryTreeImpl(final List<Category> roots, final List<Category> allAsFlatList, final Map<LocalizedStringEntry, Category> categoriesByLocaleAndSlug, final Map<String, Category> categoriesById, final Map<String, List<Category>> childrenByParentId) { this.childrenByParentId = childrenByParentId; this.roots = immutableCopyOf(roots); this.allAsFlatList = immutableCopyOf(allAsFlatList); this.categoriesByLocaleAndSlug = immutableCopyOf(categoriesByLocaleAndSlug); this.categoriesById = immutableCopyOf(categoriesById); }
private static MonetaryAmount[] of(final MonetaryAmount[] array) { for (int i = 0; i < array.length; i++) { array[i] = of(array[i]); } return array; }
@SuppressWarnings("unchecked") @Override public <T> CompletionStage<T> execute(final SphereRequest<T> sphereRequest) { return CompletableFutureUtils.successful((T) "hello"); }
@Override public Map<K, V> build() { return immutableCopyOf(underlying); } }
@Override public Optional<Category> getById(final String id) { return getOptional(categoriesById, id); }
private static MonetaryAmount[] of(final MonetaryAmount[] array) { for (int i = 0; i < array.length; i++) { array[i] = of(array[i]); } return array; }
public static <T> Optional<T> headOption(final List<T> list) { return IterableUtils.headOption(list); } }
public ContainsAnyPredicate(final QueryModel<M> queryModel, final Iterable<V> values) { super(queryModel); requireNonEmpty(values); this.values = values; }
/** * Creates a predicate which is a shortcut for multiple or statements. * @param queryModel the parent model * @param values possible values to query for, if it is for Strings, the may need to be escaped concerning double quotes. * @throws IllegalArgumentException if values is empty */ public IsInPredicate(final QueryModel<M> queryModel, final Iterable<V> values) { super(queryModel); requireNonEmpty(values);//SPHERE.IO requires values not to be empty this.values = values; }
CategoryTreeImpl(final List<Category> roots, final List<Category> allAsFlatList, final Map<LocaleSlugPair, Category> categoriesByLocaleAndSlug, final Map<String, Category> categoriesById) { this.roots = immutableCopyOf(roots); this.allAsFlatList = immutableCopyOf(allAsFlatList); this.categoriesByLocaleAndSlug = immutableCopyOf(categoriesByLocaleAndSlug); this.categoriesById = immutableCopyOf(categoriesById); }
@SuppressWarnings("unchecked") private static <T> CompletionStage<T> successful() { return (CompletionStage<T>) CompletableFutureUtils.successful("hello"); } }
@Override public Optional<Category> getById(final String id) { return getOptional(categoriesById, id); }
public ContainsAllPredicate(final QueryModel<M> queryModel, final Iterable<V> values) { super(queryModel); requireNonEmpty(values); this.values = values; }
CategoryTreeImpl(final List<Category> roots, final List<Category> allAsFlatList, final Map<LocaleSlugPair, Category> categoriesByLocaleAndSlug, final Map<String, Category> categoriesById) { this.roots = immutableCopyOf(roots); this.allAsFlatList = immutableCopyOf(allAsFlatList); this.categoriesByLocaleAndSlug = immutableCopyOf(categoriesByLocaleAndSlug); this.categoriesById = immutableCopyOf(categoriesById); }
@Override @SuppressWarnings("unchecked") public <T> CompletionStage<T> execute(final SphereRequest<T> sphereRequest) { return CompletableFutureUtils.successful((T) "hello"); }
@Override public Optional<Category> getById(final String id) { return getOptional(categoriesById, id); }
/** * Creates a predicate which is a shortcut for multiple or statements. * @param queryModel the parent model * @param values possible values to query for, if it is for Strings, the may need to be escaped concerning double quotes. * @throws IllegalArgumentException if values is empty */ public IsInQueryPredicate(final QueryModel<M> queryModel, final Iterable<V> values) { super(queryModel); requireNonEmpty(values); this.values = values; }
CategoryTreeImpl(final List<Category> roots, final List<Category> allAsFlatList, final Map<LocaleSlugPair, Category> categoriesByLocaleAndSlug, final Map<String, Category> categoriesById) { this.roots = immutableCopyOf(roots); this.allAsFlatList = immutableCopyOf(allAsFlatList); this.categoriesByLocaleAndSlug = immutableCopyOf(categoriesByLocaleAndSlug); this.categoriesById = immutableCopyOf(categoriesById); }