private static void writeObjectTypeConfiguration( MarshallerWriteContext context, ObjectTypeConfigurationRegistry otcr, org.drools.marshalling.impl.ProtobufMessages.EntryPoint.Builder _epb ) { Collection<ObjectTypeConf> values = otcr.values(); ObjectTypeConf[] otcs = values.toArray( new ObjectTypeConf[ values.size() ] ); Arrays.sort( otcs, new Comparator<ObjectTypeConf>() { public int compare(ObjectTypeConf o1, ObjectTypeConf o2) { return o1.getTypeName().compareTo(o2.getTypeName()); } }); for( ObjectTypeConf otc : otcs ) { final ObjectTypeNodeMemory memory = (ObjectTypeNodeMemory) context.wm.getNodeMemory(otc.getConcreteObjectTypeNode()); if (memory != null && !memory.memory.isEmpty()) { ObjectTypeConfiguration _otc = ObjectTypeConfiguration.newBuilder() .setType(otc.getTypeName()) .setTmsEnabled(otc.isTMSEnabled()) .build(); _epb.addOtc(_otc); } } }
public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { org.drools.marshalling.impl.ProtobufMessages.ObjectTypeConfiguration parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.drools.marshalling.impl.ProtobufMessages.ObjectTypeConfiguration) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_;
/** * <code>optional string type = 1;</code> */ public Builder setType( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; type_ = value; onChanged(); return this; } /**
public org.drools.marshalling.impl.ProtobufMessages.ObjectTypeConfiguration buildPartial() { org.drools.marshalling.impl.ProtobufMessages.ObjectTypeConfiguration result = new org.drools.marshalling.impl.ProtobufMessages.ObjectTypeConfiguration(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.type_ = type_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.tmsEnabled_ = tmsEnabled_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
/** * <code>repeated .org.drools.marshalling.ObjectTypeConfiguration otc = 4;</code> */ public Builder addOtc( int index, org.drools.marshalling.impl.ProtobufMessages.ObjectTypeConfiguration.Builder builderForValue) { if (otcBuilder_ == null) { ensureOtcIsMutable(); otc_.add(index, builderForValue.build()); onChanged(); } else { otcBuilder_.addMessage(index, builderForValue.build()); } return this; } /**
private static Builder create() { return new Builder(); }
/** * <code>repeated .org.drools.marshalling.ObjectTypeConfiguration otc = 4;</code> */ public Builder addOtc( org.drools.marshalling.impl.ProtobufMessages.ObjectTypeConfiguration.Builder builderForValue) { if (otcBuilder_ == null) { ensureOtcIsMutable(); otc_.add(builderForValue.build()); onChanged(); } else { otcBuilder_.addMessage(builderForValue.build()); } return this; } /**
/** * <code>repeated .org.drools.marshalling.ObjectTypeConfiguration otc = 4;</code> */ public Builder setOtc( int index, org.drools.marshalling.impl.ProtobufMessages.ObjectTypeConfiguration.Builder builderForValue) { if (otcBuilder_ == null) { ensureOtcIsMutable(); otc_.set(index, builderForValue.build()); onChanged(); } else { otcBuilder_.setMessage(index, builderForValue.build()); } return this; } /**
public static Builder newBuilder(org.drools.marshalling.impl.ProtobufMessages.ObjectTypeConfiguration prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); }
/** * <code>optional string type = 1;</code> */ public Builder setTypeBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; type_ = value; onChanged(); return this; }
public Builder mergeFrom(org.drools.marshalling.impl.ProtobufMessages.ObjectTypeConfiguration other) { if (other == org.drools.marshalling.impl.ProtobufMessages.ObjectTypeConfiguration.getDefaultInstance()) return this; if (other.hasType()) { bitField0_ |= 0x00000001; type_ = other.type_; onChanged(); } if (other.hasTmsEnabled()) { setTmsEnabled(other.getTmsEnabled()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
private Builder() { maybeForceBuilderInitialization(); }
/** * <code>optional bool tms_enabled = 2;</code> */ public Builder clearTmsEnabled() { bitField0_ = (bitField0_ & ~0x00000002); tmsEnabled_ = false; onChanged(); return this; }
/** * <code>optional bool tms_enabled = 2;</code> */ public Builder setTmsEnabled(boolean value) { bitField0_ |= 0x00000002; tmsEnabled_ = value; onChanged(); return this; } /**
public Builder clone() { return create().mergeFrom(buildPartial()); }
public org.drools.marshalling.impl.ProtobufMessages.ObjectTypeConfiguration build() { org.drools.marshalling.impl.ProtobufMessages.ObjectTypeConfiguration result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() {
public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.drools.marshalling.impl.ProtobufMessages.ObjectTypeConfiguration) { return mergeFrom((org.drools.marshalling.impl.ProtobufMessages.ObjectTypeConfiguration)other); } else { super.mergeFrom(other); return this; } }
/** * <code>optional string type = 1;</code> */ public Builder clearType() { bitField0_ = (bitField0_ & ~0x00000001); type_ = getDefaultInstance().getType(); onChanged(); return this; } /**
@java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /**