// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.olio.state; import android.content.ContentResolver; import android.os.Parcel; import com.olio.communication.messages.MessagePayload; import com.olio.olios.model.SerializedUnitRecordMessagePayload; import com.olio.util.ALog; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; // Referenced classes of package com.olio.state: // CurrentDevice, Look, Firmware, Product, // User public class Unit extends SerializedUnitRecordMessagePayload { public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { public MessagePayload createFromParcel(Parcel parcel) { return MessagePayload.unpackParcel(parcel); } public volatile Object createFromParcel(Parcel parcel) { return createFromParcel(parcel); } public MessagePayload[] newArray(int i) { return new Unit[i]; } public volatile Object[] newArray(int i) { return newArray(i); } }; public static final String TYPE_NAME = com/olio/state/Unit.getSimpleName(); private static final long serialVersionUID = 25L; protected Look current_look; protected Firmware firmware; protected String id; protected Product product; protected User user; public Unit() { } public static Unit get(ContentResolver contentresolver, String s) { contentresolver = (Unit)SerializedUnitRecordMessagePayload.get(TYPE_NAME, s, contentresolver); if (contentresolver == null) { contentresolver = new Unit(); contentresolver.setUnitId(s); contentresolver.setId(s); return contentresolver; } else { ALog.d("Unit.get()\n%s", new Object[] { contentresolver.toString() }); return contentresolver; } } public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } else { Unit unit = (Unit)obj; return (new EqualsBuilder()).appendSuper(super.equals(obj)).append(id, unit.id).append(product, unit.product).append(user, unit.user).append(current_look, unit.current_look).append(firmware, unit.firmware).isEquals(); } } public Look getCurrent_look() { return current_look; } public com.olio.olios.model.record.SerializedRecord.SerializedRecordObject getDefaultObject() { ALog.w("Creating a default Unit", new Object[0]); Unit unit = new Unit(); unit.setUnitId(CurrentDevice.unitId()); return unit; } public int getEndPointsFlags() { return 3; } public Firmware getFirmware() { return firmware; } public String getId() { return id; } public String getObjectId() { return TYPE_NAME; } public Product getProduct() { return product; } public int getSourcePointsFlags() { return 6; } public String getUnitId() { if (unitId == null) { return id; } else { return unitId; } } public User getUser() { return user; } public boolean hasVersionNumberControl() { return false; } public int hashCode() { return (new HashCodeBuilder(17, 37)).appendSuper(super.hashCode()).append(id).append(product).append(user).append(current_look).append(firmware).toHashCode(); } public void setCurrent_look(Look look) { current_look = look; } public void setFirmware(Firmware firmware1) { firmware = firmware1; } public void setId(String s) { id = s; } public void setProduct(Product product1) { product = product1; } public void setUser(User user1) { user = user1; } public String toString() { return (new StringBuilder()).append("Unit{current_look=").append(current_look).append(", id='").append(id).append('\'').append(", product=").append(product).append(", user=").append(user).append(", firmware=").append(firmware).append(", version_number=").append(getVersionNumber()).append('}').toString(); } public String typeName() { return TYPE_NAME; } }