Arcturus-Community/src/main/java/com/eu/habbo/habbohotel/hotelview/NewsWidget.java

73 lines
1.2 KiB
Java
Raw Normal View History

2018-07-06 15:30:00 +02:00
package com.eu.habbo.habbohotel.hotelview;
import java.sql.ResultSet;
import java.sql.SQLException;
2019-05-26 20:14:53 +02:00
public class NewsWidget {
2018-07-08 23:32:00 +02:00
2018-07-06 15:30:00 +02:00
private int id;
2018-07-08 23:32:00 +02:00
2018-07-06 15:30:00 +02:00
private String title;
2018-07-08 23:32:00 +02:00
2018-07-06 15:30:00 +02:00
private String message;
2018-07-08 23:32:00 +02:00
2018-07-06 15:30:00 +02:00
private String buttonMessage;
2018-07-08 23:32:00 +02:00
2018-07-06 15:30:00 +02:00
private int type;
2018-07-08 23:32:00 +02:00
2018-07-06 15:30:00 +02:00
private String link;
2018-07-08 23:32:00 +02:00
2018-07-06 15:30:00 +02:00
private String image;
2019-05-26 20:14:53 +02:00
public NewsWidget(ResultSet set) throws SQLException {
2018-07-06 15:30:00 +02:00
this.id = set.getInt("id");
this.title = set.getString("title");
this.message = set.getString("text");
this.buttonMessage = set.getString("button_text");
this.type = set.getString("button_type").equals("client") ? 1 : 0;
this.link = set.getString("button_link");
this.image = set.getString("image");
}
2018-07-08 23:32:00 +02:00
2019-05-26 20:14:53 +02:00
public int getId() {
2018-07-06 15:30:00 +02:00
return this.id;
}
2018-07-08 23:32:00 +02:00
2019-05-26 20:14:53 +02:00
public String getTitle() {
2018-07-06 15:30:00 +02:00
return this.title;
}
2018-07-08 23:32:00 +02:00
2019-05-26 20:14:53 +02:00
public String getMessage() {
2018-07-06 15:30:00 +02:00
return this.message;
}
2018-07-08 23:32:00 +02:00
2019-05-26 20:14:53 +02:00
public String getButtonMessage() {
2018-07-06 15:30:00 +02:00
return this.buttonMessage;
}
2018-07-08 23:32:00 +02:00
2019-05-26 20:14:53 +02:00
public int getType() {
2018-07-06 15:30:00 +02:00
return this.type;
}
2018-07-08 23:32:00 +02:00
2019-05-26 20:14:53 +02:00
public String getLink() {
2018-07-06 15:30:00 +02:00
return this.link;
}
2018-07-08 23:32:00 +02:00
2019-05-26 20:14:53 +02:00
public String getImage() {
2018-07-06 15:30:00 +02:00
return this.image;
}
}