Search in sources :

Example 41 with Version

use of io.spine.core.Version in project core-java by SpineEventEngine.

the class EntityBuilder method build.

@Override
public E build() {
    final I id = id();
    final E result = createEntity(id);
    final S state = state(result);
    final Timestamp timestamp = timestamp();
    final Version version = Versions.newVersion(this.version, timestamp);
    setState(result, state, version);
    return result;
}
Also used : Version(io.spine.core.Version) Timestamp(com.google.protobuf.Timestamp)

Aggregations

Version (io.spine.core.Version)41 Test (org.junit.Test)33 GivenVersion (io.spine.core.given.GivenVersion)16 Customer (io.spine.test.commandservice.customer.Customer)13 Any (com.google.protobuf.Any)11 Versions.newVersion (io.spine.core.Versions.newVersion)11 TenantAwareTest (io.spine.server.tenant.TenantAwareTest)11 Event (io.spine.core.Event)10 CustomerId (io.spine.test.commandservice.customer.CustomerId)10 Map (java.util.Map)7 Maps.newHashMap (com.google.common.collect.Maps.newHashMap)6 Query (io.spine.client.Query)5 Topic (io.spine.client.Topic)5 QueryResponse (io.spine.client.QueryResponse)4 ProjectId (io.spine.test.projection.ProjectId)4 Message (com.google.protobuf.Message)3 Timestamp (com.google.protobuf.Timestamp)3 EntityStateUpdate (io.spine.client.EntityStateUpdate)3 EntityRecord (io.spine.server.entity.EntityRecord)3 Project (io.spine.test.aggregate.Project)3