Class TableNameConfiguration

java.lang.Object
org.sgrewritten.stargate.config.TableNameConfiguration

public class TableNameConfiguration extends Object
A config for keeping track of the names of all database tables in use
Author:
Kristian
  • Constructor Details

    • TableNameConfiguration

      public TableNameConfiguration(String mainPrefix, String serverPrefix)
      Instantiates a new table config
      Parameters:
      mainPrefix -

      The main prefix used on all tables to prevent name collisions

      serverPrefix -

      The per-server prefix used to prevent name conflicts between non-shared tables

    • TableNameConfiguration

      public TableNameConfiguration(String mainPrefix, String serverPrefix, String portalTableName, String interPortalTableName, String flagTableName, String flagRelationTableName, String interFlagRelationTableName, String portalViewName, String interPortalViewName, String lastKnownNameTableName, String serverInfoTableName, String positionTypeTableName, String portalPositionTableName, String interPortalPositionTableName, String portalPositionIndexTableName, String interPortalPositionIndexTableName)
      Instantiates a new table config
      Parameters:
      mainPrefix -

      The main prefix used on all tables to prevent name collisions

      serverPrefix -

      The per-server prefix used to prevent name conflicts between non-shared tables

      portalTableName -

      The name of the table storing portals

      interPortalTableName -

      The name of the table storing inter-portals

      flagTableName -

      The name of the table storing available portal-flags

      flagRelationTableName -

      The name of the table storing set flags for normal portals

      interFlagRelationTableName -

      The name of the table storing set flags for inter-server portals

      portalViewName -

      The name of the view used to get the full information about portals

      interPortalViewName -

      The name of the view used to get the full information about inter-server portals

      lastKnownNameTableName -

      The name of the table in which to store the last known names attached to UUIDs

      serverInfoTableName -

      The name of the table in which to store information, such as names about the known servers in the network

      positionTypeTableName -

      The name of the table storing position types

      portalPositionTableName -

      The name of the table storing portal positions

      interPortalPositionTableName -

      The name of the table storing inter-server portal positions

      portalPositionIndexTableName -

      The name of the table indexing the types of portal positions

      interPortalPositionIndexTableName -

      The name of the table indexing the types of inter-server portal positions

  • Method Details

    • getPortalTableName

      public String getPortalTableName()
      Gets the name of the table storing portals
      Returns:

      The name of the table storing portals

    • getInterPortalTableName

      public String getInterPortalTableName()
      Gets the name of the table storing inter-portals
      Returns:

      The name of the table storing inter-portals

    • getFlagTableName

      public String getFlagTableName()
      Gets the name of the table storing available portal-flags
      Returns:

      The name of the table storing available portal-flags

    • getFlagRelationTableName

      public String getFlagRelationTableName()
      Gets the name of the table storing set flags for normal portals
      Returns:

      The name of the table storing set flags for normal portals

    • getInterFlagRelationTableName

      public String getInterFlagRelationTableName()
      Gets the name of the table storing set flags for inter-server portals
      Returns:

      The name of the table storing set flags for inter-server portals

    • getPortalViewName

      public String getPortalViewName()
      Gets the name of the view used to get the full information about portals
      Returns:

      The name of the view used to get the full information about portals

    • getInterPortalViewName

      public String getInterPortalViewName()
      Gets the name of the view used to get the full information about inter-server portals
      Returns:

      The name of the view used to get the full information about inter-server portals

    • getLastKnownNameTableName

      public String getLastKnownNameTableName()
      Gets the name of the table in which to store the last known names attached to UUIDs
      Returns:

      The name of the table in which to store the last known names attached to UUIDs

    • getServerInfoTableName

      public String getServerInfoTableName()
      Gets the name of the table in which to store information, such as names about the known servers in the network
      Returns:

      The name of the table in which to store information, such as names about the known servers in the network

    • getPositionTypeTableName

      public String getPositionTypeTableName()
      Gets the name of the table used to store the available position types
      Returns:

      The name of the table used to store available position types

    • getPortalPositionTableName

      public String getPortalPositionTableName()
      Gets the name of the table used to store portal positions
      Returns:

      The name of the table used to store portal positions

    • getInterPortalPositionTableName

      public String getInterPortalPositionTableName()
      Gets the name of the table used to store inter-portal positions
      Returns:

      The name of the table used to store inter-portal positions

    • getPortalPositionIndexTableName

      public String getPortalPositionIndexTableName()
      Gets the name of the index for the portal position table
      Returns:

      The name of the index for the portal position table

    • getInterPortalPositionIndexTableName

      public String getInterPortalPositionIndexTableName()
      Gets the name of the index for the inter-server portal position table
      Returns:

      The name of the index for the inter-portal position table

    • replaceKnownTableNames

      public String replaceKnownTableNames(String query)
      Replaces known table name keys with their proper name values
      Parameters:
      query -

      The input query string to replace in

      Returns:

      The query string with keys replaced