public class UserProfile
extends org.apache.avro.specific.SpecificRecordBase
implements org.apache.avro.specific.SpecificRecord
| Modifier and Type | Class and Description |
|---|---|
static class |
UserProfile.Builder
RecordBuilder for UserProfile instances.
|
| Modifier and Type | Field and Description |
|---|---|
long |
actions_count
Deprecated.
|
protected static org.apache.avro.data.TimeConversions.DateConversion |
DATE_CONVERSION |
protected static org.apache.avro.Conversions.DecimalConversion |
DECIMAL_CONVERSION |
List<DeviceUsage> |
device_usage
Deprecated.
|
CharSequence |
favourite_device
Deprecated.
|
org.joda.time.DateTime |
last_action
Deprecated.
|
static org.apache.avro.Schema |
SCHEMA$ |
protected static org.apache.avro.data.TimeConversions.TimeConversion |
TIME_CONVERSION |
protected static org.apache.avro.data.TimeConversions.TimestampConversion |
TIMESTAMP_CONVERSION |
CharSequence |
user_id
Deprecated.
|
| Constructor and Description |
|---|
UserProfile()
Default constructor.
|
UserProfile(CharSequence user_id,
Long actions_count,
org.joda.time.DateTime last_action,
CharSequence favourite_device,
List<DeviceUsage> device_usage)
All-args constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static org.apache.avro.message.BinaryMessageDecoder<UserProfile> |
createDecoder(org.apache.avro.message.SchemaStore resolver)
Create a new BinaryMessageDecoder instance for this class that uses the specified
SchemaStore. |
static UserProfile |
fromByteBuffer(ByteBuffer b)
Deserializes a UserProfile from a ByteBuffer.
|
Object |
get(int field$) |
Long |
getActionsCount()
Gets the value of the 'actions_count' field.
|
static org.apache.avro.Schema |
getClassSchema() |
org.apache.avro.Conversion<?> |
getConversion(int field) |
static org.apache.avro.message.BinaryMessageDecoder<UserProfile> |
getDecoder()
Return the BinaryMessageDecoder instance used by this class.
|
List<DeviceUsage> |
getDeviceUsage()
Gets the value of the 'device_usage' field.
|
CharSequence |
getFavouriteDevice()
Gets the value of the 'favourite_device' field.
|
org.joda.time.DateTime |
getLastAction()
Gets the value of the 'last_action' field.
|
org.apache.avro.Schema |
getSchema() |
CharSequence |
getUserId()
Gets the value of the 'user_id' field.
|
static UserProfile.Builder |
newBuilder()
Creates a new UserProfile RecordBuilder.
|
static UserProfile.Builder |
newBuilder(UserProfile.Builder other)
Creates a new UserProfile RecordBuilder by copying an existing Builder.
|
static UserProfile.Builder |
newBuilder(UserProfile other)
Creates a new UserProfile RecordBuilder by copying an existing UserProfile instance.
|
void |
put(int field$,
Object value$) |
void |
readExternal(ObjectInput in) |
void |
setActionsCount(Long value)
Sets the value of the 'actions_count' field.
|
void |
setDeviceUsage(List<DeviceUsage> value)
Sets the value of the 'device_usage' field.
|
void |
setFavouriteDevice(CharSequence value)
Sets the value of the 'favourite_device' field.
|
void |
setLastAction(org.joda.time.DateTime value)
Sets the value of the 'last_action' field.
|
void |
setUserId(CharSequence value)
Sets the value of the 'user_id' field.
|
ByteBuffer |
toByteBuffer()
Serializes this UserProfile to a ByteBuffer.
|
void |
writeExternal(ObjectOutput out) |
public static final org.apache.avro.Schema SCHEMA$
@Deprecated public CharSequence user_id
@Deprecated public long actions_count
@Deprecated public org.joda.time.DateTime last_action
@Deprecated public CharSequence favourite_device
@Deprecated public List<DeviceUsage> device_usage
protected static final org.apache.avro.data.TimeConversions.DateConversion DATE_CONVERSION
protected static final org.apache.avro.data.TimeConversions.TimeConversion TIME_CONVERSION
protected static final org.apache.avro.data.TimeConversions.TimestampConversion TIMESTAMP_CONVERSION
protected static final org.apache.avro.Conversions.DecimalConversion DECIMAL_CONVERSION
public UserProfile()
newBuilder().public UserProfile(CharSequence user_id, Long actions_count, org.joda.time.DateTime last_action, CharSequence favourite_device, List<DeviceUsage> device_usage)
user_id - The new value for user_idactions_count - The new value for actions_countlast_action - The new value for last_actionfavourite_device - The new value for favourite_devicedevice_usage - The new value for device_usagepublic static org.apache.avro.Schema getClassSchema()
public static org.apache.avro.message.BinaryMessageDecoder<UserProfile> getDecoder()
public static org.apache.avro.message.BinaryMessageDecoder<UserProfile> createDecoder(org.apache.avro.message.SchemaStore resolver)
SchemaStore.resolver - a SchemaStore used to find schemas by fingerprintpublic ByteBuffer toByteBuffer() throws IOException
IOExceptionpublic static UserProfile fromByteBuffer(ByteBuffer b) throws IOException
IOExceptionpublic org.apache.avro.Schema getSchema()
getSchema in interface org.apache.avro.generic.GenericContainergetSchema in class org.apache.avro.specific.SpecificRecordBasepublic Object get(int field$)
get in interface org.apache.avro.generic.IndexedRecordget in class org.apache.avro.specific.SpecificRecordBasepublic org.apache.avro.Conversion<?> getConversion(int field)
getConversion in class org.apache.avro.specific.SpecificRecordBasepublic void put(int field$,
Object value$)
put in interface org.apache.avro.generic.IndexedRecordput in class org.apache.avro.specific.SpecificRecordBasepublic CharSequence getUserId()
public void setUserId(CharSequence value)
value - the value to set.public Long getActionsCount()
public void setActionsCount(Long value)
value - the value to set.public org.joda.time.DateTime getLastAction()
public void setLastAction(org.joda.time.DateTime value)
value - the value to set.public CharSequence getFavouriteDevice()
public void setFavouriteDevice(CharSequence value)
value - the value to set.public List<DeviceUsage> getDeviceUsage()
public void setDeviceUsage(List<DeviceUsage> value)
value - the value to set.public static UserProfile.Builder newBuilder()
public static UserProfile.Builder newBuilder(UserProfile.Builder other)
other - The existing builder to copy.public static UserProfile.Builder newBuilder(UserProfile other)
other - The existing instance to copy.public void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizablewriteExternal in class org.apache.avro.specific.SpecificRecordBaseIOExceptionpublic void readExternal(ObjectInput in) throws IOException
readExternal in interface ExternalizablereadExternal in class org.apache.avro.specific.SpecificRecordBaseIOExceptionCopyright © 2017. All rights reserved.