137 lines
3.5 KiB
Java
137 lines
3.5 KiB
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*/
|
|
package javax.baja.user;
|
|
|
|
import javax.baja.sys.BStruct;
|
|
import javax.baja.sys.Context;
|
|
import javax.baja.sys.Property;
|
|
import javax.baja.sys.Sys;
|
|
import javax.baja.sys.Type;
|
|
import javax.baja.user.BUser;
|
|
|
|
/*
|
|
* Illegal identifiers - consider using --renameillegalidents true
|
|
*/
|
|
public class BUserEvent
|
|
extends BStruct {
|
|
public static final int UNKNOWN = -1;
|
|
public static final int ADDED = 0;
|
|
public static final int REMOVED = 1;
|
|
public static final int MODIFIED = 2;
|
|
public static final int RENAMED = 3;
|
|
public static final Property id = BUserEvent.newProperty(0, -1, null);
|
|
public static final Property userName = BUserEvent.newProperty(0, "", null);
|
|
public static final Property oldName = BUserEvent.newProperty(0, "", null);
|
|
public static final Type TYPE;
|
|
private BUser user;
|
|
static /* synthetic */ Class class$javax$baja$user$BUserEvent;
|
|
|
|
public int getId() {
|
|
return this.getInt(id);
|
|
}
|
|
|
|
public void setId(int n) {
|
|
this.setInt(id, n, null);
|
|
}
|
|
|
|
public String getUserName() {
|
|
return this.getString(userName);
|
|
}
|
|
|
|
public void setUserName(String string) {
|
|
this.setString(userName, string, null);
|
|
}
|
|
|
|
public String getOldName() {
|
|
return this.getString(oldName);
|
|
}
|
|
|
|
public void setOldName(String string) {
|
|
this.setString(oldName, string, null);
|
|
}
|
|
|
|
public Type getType() {
|
|
return TYPE;
|
|
}
|
|
|
|
public static BUserEvent makeAdded(BUser bUser) {
|
|
return new BUserEvent(0, bUser);
|
|
}
|
|
|
|
public static BUserEvent makeRemoved(BUser bUser, String string) {
|
|
return new BUserEvent(1, bUser, string);
|
|
}
|
|
|
|
public static BUserEvent makeModified(BUser bUser) {
|
|
return new BUserEvent(2, bUser);
|
|
}
|
|
|
|
public static BUserEvent makeRenamed(BUser bUser, String string) {
|
|
BUserEvent bUserEvent = new BUserEvent(3, bUser);
|
|
bUserEvent.setOldName(string);
|
|
return bUserEvent;
|
|
}
|
|
|
|
public BUser getUser() {
|
|
return this.user;
|
|
}
|
|
|
|
public String toString(Context context) {
|
|
return BUserEvent.idToString(this.getId()) + ": " + this.getUserName();
|
|
}
|
|
|
|
public static String idToString(int n) {
|
|
switch (n) {
|
|
case 0: {
|
|
return "Added";
|
|
}
|
|
case 1: {
|
|
return "Removed";
|
|
}
|
|
case 2: {
|
|
return "Modified";
|
|
}
|
|
case 3: {
|
|
return "Renamed";
|
|
}
|
|
}
|
|
return "Unknown(" + n + ')';
|
|
}
|
|
|
|
static /* synthetic */ Class class(String string, boolean bl) {
|
|
try {
|
|
Class<?> clazz = Class.forName(string);
|
|
if (!bl) {
|
|
clazz = clazz.getComponentType();
|
|
}
|
|
return clazz;
|
|
}
|
|
catch (ClassNotFoundException classNotFoundException) {
|
|
throw new NoClassDefFoundError(classNotFoundException.getMessage());
|
|
}
|
|
}
|
|
|
|
public BUserEvent() {
|
|
}
|
|
|
|
public BUserEvent(int n, BUser bUser) {
|
|
this(n, bUser, bUser.getName());
|
|
}
|
|
|
|
public BUserEvent(int n, BUser bUser, String string) {
|
|
this.setId(n);
|
|
this.setUserName(string);
|
|
this.user = bUser;
|
|
}
|
|
|
|
static {
|
|
Class clazz = class$javax$baja$user$BUserEvent;
|
|
if (clazz == null) {
|
|
clazz = class$javax$baja$user$BUserEvent = BUserEvent.class("[Ljavax.baja.user.BUserEvent;", false);
|
|
}
|
|
TYPE = Sys.loadType(clazz);
|
|
}
|
|
}
|
|
|