private void addTestEntity(ModelBuilder modelBuilder, boolean withIndex) {
lastEntityUid = ++lastUid;
EntityBuilder entityBuilder = modelBuilder.entity("TestEntity").id(++lastEntityId, lastEntityUid);
entityBuilder.property("id", PropertyType.Long).id(TestEntity_.id.id, ++lastUid)
.flags(PropertyFlags.ID | (areIdsAssignable() ? PropertyFlags.ID_SELF_ASSIGNABLE : 0));
entityBuilder.property("simpleBoolean", PropertyType.Bool).id(TestEntity_.simpleBoolean.id, ++lastUid);
entityBuilder.property("simpleByte", PropertyType.Byte).id(TestEntity_.simpleByte.id, ++lastUid);
entityBuilder.property("simpleShort", PropertyType.Short).id(TestEntity_.simpleShort.id, ++lastUid);
entityBuilder.property("simpleInt", PropertyType.Int).id(TestEntity_.simpleInt.id, ++lastUid);
entityBuilder.property("simpleLong", PropertyType.Long).id(TestEntity_.simpleLong.id, ++lastUid);
entityBuilder.property("simpleFloat", PropertyType.Float).id(TestEntity_.simpleFloat.id, ++lastUid);
entityBuilder.property("simpleDouble", PropertyType.Double).id(TestEntity_.simpleDouble.id, ++lastUid);
PropertyBuilder pb =
entityBuilder.property("simpleString", PropertyType.String).id(TestEntity_.simpleString.id, ++lastUid);
if (withIndex) {
lastIndexUid = ++lastUid;
pb.flags(PropertyFlags.INDEXED).indexId(++lastIndexId, lastIndexUid);
}
entityBuilder.property("simpleByteArray", PropertyType.ByteVector).id(TestEntity_.simpleByteArray.id, ++lastUid);
int lastId = TestEntity_.simpleByteArray.id;
entityBuilder.lastPropertyId(lastId, lastUid);
addOptionalFlagsToTestEntity(entityBuilder);
entityBuilder.entityDone();
}