Arcturus-Community/src/main/java/com/eu/habbo/habbohotel/rooms/RoomCategory.java
2018-07-06 13:30:00 +00:00

74 lines
1.6 KiB
Java

package com.eu.habbo.habbohotel.rooms;
import com.eu.habbo.habbohotel.navigation.ListMode;
import java.sql.ResultSet;
import java.sql.SQLException;
@SuppressWarnings("NullableProblems")
public class RoomCategory implements Comparable<RoomCategory> {
private int id;
private int minRank;
private String caption;
private String captionSave;
private boolean canTrade;
private int maxUserCount;
private boolean official;
private ListMode displayMode;
public RoomCategory(ResultSet set) throws SQLException
{
this.id = set.getInt("id");
this.minRank = set.getInt("min_rank");
this.caption = set.getString("caption");
this.captionSave = set.getString("caption_save");
this.canTrade = set.getBoolean("can_trade");
this.maxUserCount = set.getInt("max_user_count");
this.official = set.getString("public").equals("1");
this.displayMode = ListMode.fromType(set.getInt("list_type"));
}
public int getId() {
return this.id;
}
public int getMinRank() {
return this.minRank;
}
public String getCaption()
{
return this.caption;
}
public String getCaptionSave()
{
return this.captionSave;
}
public boolean isCanTrade() {
return this.canTrade;
}
public int getMaxUserCount()
{
return this.maxUserCount;
}
public boolean isPublic()
{
return this.official;
}
public ListMode getDisplayMode()
{
return this.displayMode;
}
@Override
public int compareTo(RoomCategory o) {
return o.getId() - this.getId();
}
}