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

82 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;
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;
public NewsWidget(ResultSet set) throws SQLException
{
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
2018-07-06 15:30:00 +02:00
public int getId()
{
return this.id;
}
2018-07-08 23:32:00 +02:00
2018-07-06 15:30:00 +02:00
public String getTitle()
{
return this.title;
}
2018-07-08 23:32:00 +02:00
2018-07-06 15:30:00 +02:00
public String getMessage()
{
return this.message;
}
2018-07-08 23:32:00 +02:00
2018-07-06 15:30:00 +02:00
public String getButtonMessage()
{
return this.buttonMessage;
}
2018-07-08 23:32:00 +02:00
2018-07-06 15:30:00 +02:00
public int getType()
{
return this.type;
}
2018-07-08 23:32:00 +02:00
2018-07-06 15:30:00 +02:00
public String getLink()
{
return this.link;
}
2018-07-08 23:32:00 +02:00
2018-07-06 15:30:00 +02:00
public String getImage()
{
return this.image;
}
}