TopicBuilder

public final class TopicBuilder extends TargetBuilder<T, B>

A builder for the Topic instances.

None of the parameters set by builder methods are required. Call build to retrieve the resulting Topic instance.

Usage example:


    Topic topic = factory().topic()
                           .select(Customer.class)
                           .byId(getWestCoastCustomerIds())
                           .withMask("name", "address", "email")
                           .where(eq("type", "permanent"),
                                  eq("discountPercent", 10),
                                  eq("companySize", Company.Size.SMALL))
                           .build();
    

See also

to start topic building

for filter creation shortcuts

for more details on this builders API

Functions

Link copied to clipboard
public Topic build()
Generates a new Topic instance with current builder configuration.

Inherited functions

Link copied to clipboard
public B byId(Array<Message> ids)
public B byId(Array<Integer> ids)
public B byId(Array<Long> ids)
public B byId(Array<String> ids)
Sets the ID predicate to the io.spine.client.
public B byId(Iterable<? extends Object> ids)
Sets the ID predicate to the targets of the request.
Link copied to clipboard
public String toString()
Link copied to clipboard
public B where(Array<CompositeFilter> predicate)
public B where(Array<Filter> predicate)
Sets the predicates for the io.spine.client.
Link copied to clipboard
public B withMask(Iterable<String> fieldNames)
public B withMask(Array<String> fieldNames)
Sets the entity fields to retrieve.