public class DatabaseInformation extends MaximoDatabaseInfo
Constructor and Description |
---|
DatabaseInformation(java.sql.Connection con)
Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
getAmountLength()
Return the length for amount attributes.
|
int |
getAmountScale()
Return the scale for amount attributes.
|
java.lang.String |
getBaseLangCode()
Returns the code for base language of the Maximo database.
|
java.sql.Connection |
getConnection() |
java.sql.Connection |
getConnection(MTContext c)
Get the connection for the context.
|
int |
getIntegerLength()
Returns the standard length of INTEGER attributes, for the MaxAttribute table.
|
java.util.List<java.lang.String> |
getMaximoViewList()
Return a list of views in Maximo.
|
java.lang.String |
getMaxUpgVersion()
Gets the version number from the MaxUpg MaxVar.
|
int |
getMaxVarCharLength()
Returns the maximum length of a string column, in characters.
|
MTConnection |
getMTConnection() |
MTStorageType |
getMTStorageType(java.lang.String tablename)
Return the storage type for a table.
|
java.util.List<java.lang.String> |
getNavtiveViewList()
Gets the list of views in the database.
|
java.lang.String |
getNickName() |
java.lang.String |
getSchema() |
java.util.Set<MTContext> |
getSelectedTenants()
Get the set of tenants selected.
|
java.util.Set<MTContext> |
getSelectedUsers()
Returns the selected tenants, but returns all tenants, including the master, when no tenant is targeted.
|
ServerType |
getServerType()
Returns the type of server
|
int |
getSmallIntLength()
Returns the standard length of SMALLINT attributes, for the MaxAttribute table.
|
SQLSpecificTransform |
getSQLTransform()
Get the transform to use to convert for the database platform.
|
java.lang.String |
getSynonymMaxValue(java.lang.String synonym,
java.lang.String domainid)
Returns the MaxValue for the synonym value given.
|
int |
getVarCharMultiple()
Returns the value of the VARCHARMULTIPLE MaxVar, or 1 if the MaxVar isn't found.
|
boolean |
hasExtension(java.lang.String baseTable) |
boolean |
hasPendingChanges() |
boolean |
hasTable(java.lang.String tbname) |
boolean |
isImportedTable(java.lang.String tableName)
Returns whether a table is marked as being imported to Maximo.
|
boolean |
isMTEnabled() |
boolean |
isPreMerlin() |
boolean |
isUsingVarGraphic()
Are VarGraphic in use?
|
boolean |
isV510()
Is this database a release V510 prior or earlier?
|
void |
resetHasExtension() |
void |
setPendingChanges(boolean hasPending)
Set the "has pending changes" flag.
|
void |
setSchema(java.lang.String schema) |
void |
setSelectedTenant(java.lang.String targetTenant)
Select a single tenant.
|
void |
setSelectedTenants(java.util.Set<MTContext> tenants)
Select tenants for testing.
|
isDB2, isOracle, isSQLServer
public DatabaseInformation(java.sql.Connection con) throws java.sql.SQLException
con
- Connection to the database to store information about.java.sql.SQLException
public java.sql.Connection getConnection()
public ServerType getServerType()
MaximoDatabaseInfo
getServerType
in class MaximoDatabaseInfo
public void setSelectedTenants(java.util.Set<MTContext> tenants)
tenants
- public java.util.Set<MTContext> getSelectedTenants() throws java.sql.SQLException
java.sql.SQLException
public boolean isPreMerlin() throws java.sql.SQLException
java.sql.SQLException
public boolean isMTEnabled() throws java.sql.SQLException
java.sql.SQLException
public MTConnection getMTConnection() throws java.sql.SQLException
java.sql.SQLException
public java.sql.Connection getConnection(MTContext c) throws java.sql.SQLException
c
- Context to get.java.sql.SQLException
public java.util.Set<MTContext> getSelectedUsers() throws java.sql.SQLException
java.sql.SQLException
This does not include the master context.
public java.lang.String getSchema()
public void setSchema(java.lang.String schema)
public void setSelectedTenant(java.lang.String targetTenant) throws java.sql.SQLException
targetTenant
- java.sql.SQLException
public SQLSpecificTransform getSQLTransform() throws java.sql.SQLException
java.sql.SQLException
public java.lang.String getMaxUpgVersion() throws java.sql.SQLException
java.sql.SQLException
public void setPendingChanges(boolean hasPending)
hasPending
- public boolean hasPendingChanges()
public int getIntegerLength() throws java.lang.NumberFormatException, java.sql.SQLException
java.sql.SQLException
java.lang.NumberFormatException
public int getSmallIntLength() throws java.lang.NumberFormatException, java.sql.SQLException
java.sql.SQLException
java.lang.NumberFormatException
public int getAmountLength() throws java.lang.NumberFormatException, java.sql.SQLException
java.sql.SQLException
java.lang.NumberFormatException
public int getAmountScale() throws java.lang.NumberFormatException, java.sql.SQLException
java.sql.SQLException
java.lang.NumberFormatException
public boolean isV510()
MaximoDatabaseInfo
isV510
in class MaximoDatabaseInfo
public boolean isUsingVarGraphic() throws java.sql.SQLException
MaximoDatabaseInfo
isUsingVarGraphic
in class MaximoDatabaseInfo
java.sql.SQLException
public int getMaxVarCharLength()
MaximoDatabaseInfo
getMaxVarCharLength
in class MaximoDatabaseInfo
public int getVarCharMultiple() throws java.sql.SQLException
MaximoDatabaseInfo
getVarCharMultiple
in class MaximoDatabaseInfo
java.sql.SQLException
public MTStorageType getMTStorageType(java.lang.String tablename) throws java.sql.SQLException
tablename
- java.sql.SQLException
public boolean isImportedTable(java.lang.String tableName) throws java.sql.SQLException
tableName
- java.sql.SQLException
public java.lang.String getSynonymMaxValue(java.lang.String synonym, java.lang.String domainid) throws java.sql.SQLException
synonym
- domainid
- java.sql.SQLException
public java.lang.String getBaseLangCode() throws java.sql.SQLException
java.sql.SQLException
public boolean hasExtension(java.lang.String baseTable) throws java.sql.SQLException
java.sql.SQLException
public void resetHasExtension()
public java.util.List<java.lang.String> getNavtiveViewList() throws java.sql.SQLException
java.sql.SQLException
DatabaseInformation
public java.util.List<java.lang.String> getMaximoViewList() throws java.sql.SQLException
dc
- java.sql.SQLException
public java.lang.String getNickName()
public boolean hasTable(java.lang.String tbname) throws java.sql.SQLException
java.sql.SQLException