Skip to content

Commit

Permalink
* Code refactoring and documentation fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
DxsSucuk committed Aug 9, 2022
1 parent 9a324bb commit 5c4a768
Show file tree
Hide file tree
Showing 24 changed files with 47 additions and 39 deletions.
2 changes: 1 addition & 1 deletion src/main/java/de/presti/ree6/events/LoggingEvents.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import de.presti.ree6.logger.invite.InviteContainer;
import de.presti.ree6.logger.invite.InviteContainerManager;
import de.presti.ree6.main.Main;
import de.presti.ree6.sql.base.data.SQLResponse;
import de.presti.ree6.sql.base.entitis.SQLResponse;
import de.presti.ree6.sql.entities.Invite;
import de.presti.ree6.sql.entities.webhook.Webhook;
import de.presti.ree6.utils.data.ArrayUtil;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/de/presti/ree6/events/OtherEvents.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import de.presti.ree6.bot.util.WebhookUtil;
import de.presti.ree6.bot.version.BotState;
import de.presti.ree6.main.Main;
import de.presti.ree6.sql.base.data.SQLResponse;
import de.presti.ree6.sql.base.entitis.SQLResponse;
import de.presti.ree6.sql.entities.TemporalVoicechannel;
import de.presti.ree6.sql.entities.level.ChatUserLevel;
import de.presti.ree6.sql.entities.level.VoiceUserLevel;
Expand Down
13 changes: 5 additions & 8 deletions src/main/java/de/presti/ree6/sql/SQLConnector.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,17 @@

import com.google.gson.JsonElement;
import de.presti.ree6.main.Main;
import de.presti.ree6.sql.base.data.MigrationUtil;
import de.presti.ree6.sql.base.data.SQLEntity;
import de.presti.ree6.sql.base.data.SQLUtil;
import de.presti.ree6.sql.base.data.StoredResultSet;
import de.presti.ree6.sql.base.entitis.SQLEntity;
import de.presti.ree6.sql.base.entitis.StoredResultSet;
import de.presti.ree6.sql.base.utils.MigrationUtil;
import de.presti.ree6.sql.base.utils.SQLUtil;
import de.presti.ree6.sql.mapper.EntityMapper;
import de.presti.ree6.sql.seed.SeedManager;
import org.reflections.Reflections;

import java.sql.*;
import java.util.Base64;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.*;

/**
* A "Connector" Class which connect with the used Database Server.
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/de/presti/ree6/sql/SQLWorker.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
import de.presti.ree6.logger.invite.InviteContainer;
import de.presti.ree6.main.Main;
import de.presti.ree6.sql.base.annotations.Table;
import de.presti.ree6.sql.base.data.SQLEntity;
import de.presti.ree6.sql.base.data.SQLParameter;
import de.presti.ree6.sql.base.data.SQLResponse;
import de.presti.ree6.sql.base.data.SQLUtil;
import de.presti.ree6.sql.base.entitis.SQLEntity;
import de.presti.ree6.sql.base.entitis.SQLParameter;
import de.presti.ree6.sql.base.entitis.SQLResponse;
import de.presti.ree6.sql.base.utils.SQLUtil;
import de.presti.ree6.sql.entities.BirthdayWish;
import de.presti.ree6.sql.entities.Blacklist;
import de.presti.ree6.sql.entities.Invite;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.presti.ree6.sql.base.data;
package de.presti.ree6.sql.base.entitis;

/**
* Class to keep track of the SQL Entities.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.presti.ree6.sql.base.data;
package de.presti.ree6.sql.base.entitis;

/**
* This class is used to represent a SQL Parameter.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.presti.ree6.sql.base.data;
package de.presti.ree6.sql.base.entitis;

import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.presti.ree6.sql.base.data;
package de.presti.ree6.sql.base.entitis;

import java.util.ArrayList;
import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.presti.ree6.sql.base.data;
package de.presti.ree6.sql.base.utils;

import de.presti.ree6.main.Main;
import de.presti.ree6.sql.SQLConnector;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package de.presti.ree6.sql.base.data;
package de.presti.ree6.sql.base.utils;

import com.google.gson.*;
import de.presti.ree6.main.Main;
import de.presti.ree6.sql.base.annotations.Property;
import de.presti.ree6.sql.base.annotations.Table;
import de.presti.ree6.sql.base.entitis.SQLEntity;
import de.presti.ree6.sql.base.entitis.SQLParameter;

import javax.sql.rowset.serial.SerialBlob;
import java.io.BufferedReader;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import de.presti.ree6.sql.base.annotations.Property;
import de.presti.ree6.sql.base.annotations.Table;
import de.presti.ree6.sql.base.data.SQLEntity;
import de.presti.ree6.sql.base.entitis.SQLEntity;

import java.util.Date;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/de/presti/ree6/sql/entities/Blacklist.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import de.presti.ree6.sql.base.annotations.Property;
import de.presti.ree6.sql.base.annotations.Table;
import de.presti.ree6.sql.base.data.SQLEntity;
import de.presti.ree6.sql.base.entitis.SQLEntity;

/**
* SQL Entity for the Blacklist.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/de/presti/ree6/sql/entities/Invite.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import de.presti.ree6.sql.base.annotations.Property;
import de.presti.ree6.sql.base.annotations.Table;
import de.presti.ree6.sql.base.data.SQLEntity;
import de.presti.ree6.sql.base.entitis.SQLEntity;

/**
* Invite class to store information about an Invite.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/de/presti/ree6/sql/entities/Recording.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import com.google.gson.JsonArray;
import de.presti.ree6.sql.base.annotations.Property;
import de.presti.ree6.sql.base.annotations.Table;
import de.presti.ree6.sql.base.data.SQLEntity;
import de.presti.ree6.sql.base.entitis.SQLEntity;
import de.presti.ree6.utils.others.RandomUtils;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/de/presti/ree6/sql/entities/Setting.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import de.presti.ree6.sql.base.annotations.Property;
import de.presti.ree6.sql.base.annotations.Table;
import de.presti.ree6.sql.base.data.SQLEntity;
import de.presti.ree6.sql.base.entitis.SQLEntity;

/**
* File to store Settings information.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import de.presti.ree6.sql.base.annotations.Property;
import de.presti.ree6.sql.base.annotations.Table;
import de.presti.ree6.sql.base.data.SQLEntity;
import de.presti.ree6.sql.base.entitis.SQLEntity;

/**
* Class used to store information about the temporal Voice-Channel.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package de.presti.ree6.sql.entities.level;

import de.presti.ree6.sql.base.annotations.Property;
import de.presti.ree6.sql.base.data.SQLEntity;
import de.presti.ree6.sql.base.entitis.SQLEntity;
import de.presti.ree6.utils.data.LevelUtil;
import net.dv8tion.jda.api.entities.User;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/de/presti/ree6/sql/entities/roles/Role.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package de.presti.ree6.sql.entities.roles;

import de.presti.ree6.sql.base.annotations.Property;
import de.presti.ree6.sql.base.data.SQLEntity;
import de.presti.ree6.sql.base.entitis.SQLEntity;

/**
* Role class to store data about roles.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/de/presti/ree6/sql/entities/stats/Stats.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import de.presti.ree6.sql.base.annotations.Property;
import de.presti.ree6.sql.base.annotations.Table;
import de.presti.ree6.sql.base.data.SQLEntity;
import de.presti.ree6.sql.base.entitis.SQLEntity;

/**
* SQL Entity for the Stats.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package de.presti.ree6.sql.entities.webhook;

import de.presti.ree6.sql.base.annotations.Property;
import de.presti.ree6.sql.base.data.SQLEntity;
import de.presti.ree6.sql.base.entitis.SQLEntity;

/**
* SQL Entity for the Webhooks.
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/de/presti/ree6/sql/mapper/EntityMapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import de.presti.ree6.main.Main;
import de.presti.ree6.sql.base.annotations.Property;
import de.presti.ree6.sql.base.data.SQLEntity;
import de.presti.ree6.sql.base.data.SQLResponse;
import de.presti.ree6.sql.base.data.SQLUtil;
import de.presti.ree6.sql.base.data.StoredResultSet;
import de.presti.ree6.sql.base.entitis.SQLEntity;
import de.presti.ree6.sql.base.entitis.SQLResponse;
import de.presti.ree6.sql.base.entitis.StoredResultSet;
import de.presti.ree6.sql.base.utils.SQLUtil;

import java.lang.reflect.Field;
import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
import de.presti.ree6.sql.SQLConnector;
import de.presti.ree6.sql.base.annotations.Property;
import de.presti.ree6.sql.base.annotations.Table;
import de.presti.ree6.sql.base.data.*;
import de.presti.ree6.sql.base.entitis.SQLEntity;
import de.presti.ree6.sql.base.entitis.SQLParameter;
import de.presti.ree6.sql.base.entitis.StoredResultSet;
import de.presti.ree6.sql.base.utils.MigrationUtil;
import de.presti.ree6.sql.base.utils.SQLUtil;
import org.reflections.Reflections;

import java.lang.reflect.Field;
Expand Down
9 changes: 6 additions & 3 deletions src/main/java/de/presti/ree6/utils/data/Data.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*/
public class Data {

// Completely remove this, and migrate it into the main class.

/**
* Constructor for the Data Utility class.
Expand All @@ -14,10 +13,14 @@ private Data() {
throw new IllegalStateException("Utility class");
}

// Current Domain of the Website.
/**
* Current Domain of the Website.
*/
public static final String WEBSITE = "https://ree6.de";

// Advertisement, because of Sponsors.
/**
* Advertisement, because of Sponsors.
*/
public static final String ADVERTISEMENT = "powered by Tube-Hosting";
}

Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ private ImageCreationUtility() {
throw new IllegalStateException("Utility class");
}

// Cached Background Image, for performance.
/**
* Cached Background Image, for performance.
*/
private static BufferedImage rankBackgroundBase;

/**
Expand Down

0 comments on commit 5c4a768

Please sign in to comment.