Class DatasourceInfo

java.lang.Object
org.ofbiz.core.entity.config.DatasourceInfo

public class DatasourceInfo extends Object
Info about a datasource
  • Field Details

    • CONFIGURATION

      protected static final Properties CONFIGURATION
    • AUTO_FIELD_TYPE

      public static final String AUTO_FIELD_TYPE
      If the field-type-name property matches this string we will try and guess the field-type-name by using the metadata returned by the database connection.
    • AUTO_SCHEMA_NAME

      public static final String AUTO_SCHEMA_NAME
    • AUTO_CONSTRAINT_NAME_CLIP_LENGTH

      public static final String AUTO_CONSTRAINT_NAME_CLIP_LENGTH
    • DEFAULT_CONSTRAINT_NAME_CLIP_LENGTH

      public static final int DEFAULT_CONSTRAINT_NAME_CLIP_LENGTH
      See Also:
  • Constructor Details

    • DatasourceInfo

      public DatasourceInfo(String name, String fieldTypeName, String schemaName, JdbcDatasourceInfo jdbcDatasource)
      Constructor for JIRAs use. The defaults are set such that these properties are the only ones that need setting.
      Parameters:
      name - The name of the datasource
      fieldTypeName - The type of the datasource
      schemaName - The schema to use, may be null
      jdbcDatasource - The JDBC datasource
    • DatasourceInfo

      public DatasourceInfo(String name, String fieldTypeName, String schemaName, JndiDatasourceInfo jndiDatasource)
      Constructor for JIRAs use. The defaults are set such that these properties are the only ones that need setting.
      Parameters:
      name - The name of the datasource
      fieldTypeName - The type of the datasource
      schemaName - The schema to use, may be null
      jndiDatasource - The JNDI datasource
    • DatasourceInfo

      public DatasourceInfo(Element element)
  • Method Details

    • getFieldTypeName

      public String getFieldTypeName()
    • getSchemaName

      public String getSchemaName()
    • getConstraintNameClipLength

      public int getConstraintNameClipLength()
    • getDatabaseTypeFromJDBCConnection

      public DatabaseType getDatabaseTypeFromJDBCConnection()
      Provides a database type.
      Returns:
      the database type.
    • getDatabaseTypeFromJDBCConnection

      public DatabaseType getDatabaseTypeFromJDBCConnection(Connection connection)
      Provides a database type (extracted to enable mocking)
      Returns:
      the database type.
    • getJndiDatasource

      public JndiDatasourceInfo getJndiDatasource()
    • getName

      public String getName()
    • getHelperClass

      public String getHelperClass()
    • getTyrexDataSourceElement

      public Element getTyrexDataSourceElement()
    • getJdbcDatasource

      public JdbcDatasourceInfo getJdbcDatasource()
    • isCheckOnStart

      public boolean isCheckOnStart()
    • isAddMissingOnStart

      public boolean isAddMissingOnStart()
    • isUseFks

      public boolean isUseFks()
    • isUseFkIndices

      public boolean isUseFkIndices()
    • isCheckForeignKeysOnStart

      public boolean isCheckForeignKeysOnStart()
    • isCheckFkIndicesOnStart

      public boolean isCheckFkIndicesOnStart()
    • isUsePkConstraintNames

      public boolean isUsePkConstraintNames()
    • isUseFunctionBasedIndices

      public boolean isUseFunctionBasedIndices()
    • getFkStyle

      public String getFkStyle()
    • isUseFkInitiallyDeferred

      public boolean isUseFkInitiallyDeferred()
    • isUseIndices

      public boolean isUseIndices()
    • getJoinStyle

      public String getJoinStyle()