private static SmallEvent toSmallEvent(StandardEvent event) { return SmallEvent.newBuilder() .setUserId(event.getUserId()) .setSessionId(event.getSessionId()) .build(); }
public ReflectStandardEvent(StandardEvent event) { setEvent_initiator(event.getEventInitiator()); setEvent_name(event.getEventName()); setIp(event.getIp()); setSession_id(event.getSessionId()); setTimestamp(event.getTimestamp()); setUser_id(event.getUserId()); }
public ReflectSmallEvent(StandardEvent event) { setSession_id(event.getSessionId()); setUser_id(event.getUserId()); }
/** Sets the value of the 'event_initiator' field */ public org.kitesdk.data.event.StandardEvent.Builder setEventInitiator(java.lang.String value) { validate(fields()[0], value); this.event_initiator = value; fieldSetFlags()[0] = true; return this; }
private StandardEvent standardEvent(long timestamp) { return StandardEvent.newBuilder(event).setTimestamp(timestamp).build(); }
/** Clears the value of the 'event_initiator' field */ public org.kitesdk.data.event.StandardEvent.Builder clearEventInitiator() { event_initiator = null; fieldSetFlags()[0] = false; return this; }
@Override public SmallEvent build() { try { SmallEvent record = new SmallEvent(); record.user_id = fieldSetFlags()[0] ? this.user_id : (java.lang.Long) defaultValue(fields()[0]); record.session_id = fieldSetFlags()[1] ? this.session_id : (java.lang.String) defaultValue(fields()[1]); return record; } catch (Exception e) { throw new org.apache.avro.AvroRuntimeException(e); } } }
@Override public Value build() { try { Value record = new Value(); record.id = fieldSetFlags()[0] ? this.id : (java.lang.String) defaultValue(fields()[0]); record.value = fieldSetFlags()[1] ? this.value : (java.lang.Long) defaultValue(fields()[1]); return record; } catch (Exception e) { throw new org.apache.avro.AvroRuntimeException(e); } } }
@Override public IncompatibleEvent build() { try { IncompatibleEvent record = new IncompatibleEvent(); record.userId = fieldSetFlags()[0] ? this.userId : (java.lang.String) defaultValue(fields()[0]); record.sessionId = fieldSetFlags()[1] ? this.sessionId : (java.lang.String) defaultValue(fields()[1]); return record; } catch (Exception e) { throw new org.apache.avro.AvroRuntimeException(e); } } }
/** Sets the value of the 'id' field */ public org.kitesdk.data.event.Value.Builder setId(java.lang.String value) { validate(fields()[0], value); this.id = value; fieldSetFlags()[0] = true; return this; }
/** Sets the value of the 'session_id' field */ public org.kitesdk.data.event.SmallEvent.Builder setSessionId(java.lang.String value) { validate(fields()[1], value); this.session_id = value; fieldSetFlags()[1] = true; return this; }
/** Clears the value of the 'userId' field */ public org.kitesdk.data.event.IncompatibleEvent.Builder clearUserId() { userId = null; fieldSetFlags()[0] = false; return this; }
/** Clears the value of the 'id' field */ public org.kitesdk.data.event.Value.Builder clearId() { id = null; fieldSetFlags()[0] = false; return this; }
/** Clears the value of the 'value' field */ public org.kitesdk.data.event.TestValue.Builder clearValue() { fieldSetFlags()[0] = false; return this; }
/** Clears the value of the 'session_id' field */ public org.kitesdk.data.event.SmallEvent.Builder clearSessionId() { session_id = null; fieldSetFlags()[1] = false; return this; }
/** Sets the value of the 'session_id' field */ public org.kitesdk.data.event.StandardEvent.Builder setSessionId(java.lang.String value) { validate(fields()[3], value); this.session_id = value; fieldSetFlags()[3] = true; return this; }
/** Clears the value of the 'user_id' field */ public org.kitesdk.data.event.StandardEvent.Builder clearUserId() { fieldSetFlags()[2] = false; return this; }
/** Sets the value of the 'value' field */ public org.kitesdk.data.event.Value.Builder setValue(long value) { validate(fields()[1], value); this.value = value; fieldSetFlags()[1] = true; return this; }
/** Clears the value of the 'session_id' field */ public org.kitesdk.data.event.StandardEvent.Builder clearSessionId() { session_id = null; fieldSetFlags()[3] = false; return this; }
/** Clears the value of the 'timestamp' field */ public org.kitesdk.data.event.StandardEvent.Builder clearTimestamp() { fieldSetFlags()[5] = false; return this; }