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.
|
java.lang.String |
getDefaultSynonym(java.lang.String domainid,
java.lang.String maxvalue)
Returns the default external synonym value for an internal value.
|
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.
|
java.lang.String |
getMaxVarValueFromCache(java.lang.String varName) |
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.
|
int |
getSequenceIncrement()
Returns the increment interval for sequences.
|
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.
|
Util |
getUtil() |
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 |
hasTableColumn(java.lang.String objName,
java.lang.String attrName) |
boolean |
isImportedTable(java.lang.String tableName)
Returns whether a table is marked as being imported to Maximo.
|
boolean |
isMaxInst() |
boolean |
isMTEnabled()
Is Multitenancy enabled?
|
boolean |
isPreMerlin() |
boolean |
isUsingVarGraphic()
Are VarGraphic in use?
|
boolean |
isV510()
Is this database a release V510 prior or earlier?
|
void |
maxVarSetup(java.util.TreeMap<java.lang.String,java.lang.String> maxVarMap) |
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, isSQLServerpublic DatabaseInformation(java.sql.Connection con)
throws java.sql.SQLException
con - Connection to the database to store information about.java.sql.SQLExceptionpublic java.sql.Connection getConnection()
public ServerType getServerType()
MaximoDatabaseInfogetServerType in class MaximoDatabaseInfopublic void setSelectedTenants(java.util.Set<MTContext> tenants)
tenants - public java.util.Set<MTContext> getSelectedTenants() throws java.sql.SQLException
java.sql.SQLExceptionpublic boolean isPreMerlin()
throws java.sql.SQLException
java.sql.SQLExceptionpublic boolean isMTEnabled()
throws java.sql.SQLException
MaximoDatabaseInfoisMTEnabled in class MaximoDatabaseInfojava.sql.SQLExceptionpublic MTConnection getMTConnection() throws java.sql.SQLException
java.sql.SQLExceptionpublic java.sql.Connection getConnection(MTContext c) throws java.sql.SQLException
c - Context to get.java.sql.SQLExceptionpublic java.util.Set<MTContext> getSelectedUsers() throws java.sql.SQLException
java.sql.SQLExceptionThis 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.SQLExceptionpublic SQLSpecificTransform getSQLTransform() throws java.sql.SQLException
java.sql.SQLExceptionpublic java.lang.String getMaxUpgVersion()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void setPendingChanges(boolean hasPending)
hasPending - public boolean hasPendingChanges()
public int getIntegerLength()
throws java.lang.NumberFormatException,
java.sql.SQLException
java.sql.SQLExceptionjava.lang.NumberFormatExceptionpublic int getSmallIntLength()
throws java.lang.NumberFormatException,
java.sql.SQLException
java.sql.SQLExceptionjava.lang.NumberFormatExceptionpublic int getAmountLength()
throws java.lang.NumberFormatException,
java.sql.SQLException
java.sql.SQLExceptionjava.lang.NumberFormatExceptionpublic int getAmountScale()
throws java.lang.NumberFormatException,
java.sql.SQLException
java.sql.SQLExceptionjava.lang.NumberFormatExceptionpublic boolean isV510()
MaximoDatabaseInfoisV510 in class MaximoDatabaseInfopublic boolean isUsingVarGraphic()
throws java.sql.SQLException
MaximoDatabaseInfoisUsingVarGraphic in class MaximoDatabaseInfojava.sql.SQLExceptionpublic int getMaxVarCharLength()
MaximoDatabaseInfogetMaxVarCharLength in class MaximoDatabaseInfopublic int getVarCharMultiple()
throws java.sql.SQLException
MaximoDatabaseInfogetVarCharMultiple in class MaximoDatabaseInfojava.sql.SQLExceptionpublic MTStorageType getMTStorageType(java.lang.String tablename) throws java.sql.SQLException
tablename - java.sql.SQLExceptionpublic boolean isImportedTable(java.lang.String tableName)
throws java.sql.SQLException
tableName - java.sql.SQLExceptionpublic java.lang.String getSynonymMaxValue(java.lang.String synonym,
java.lang.String domainid)
throws java.sql.SQLException
synonym - domainid - java.sql.SQLExceptionpublic java.lang.String getDefaultSynonym(java.lang.String domainid,
java.lang.String maxvalue)
throws java.sql.SQLException
domainid - maxvalue - java.sql.SQLExceptionpublic java.lang.String getBaseLangCode()
throws java.sql.SQLException
java.sql.SQLExceptionpublic boolean hasExtension(java.lang.String baseTable)
throws java.sql.SQLException
java.sql.SQLExceptionpublic void resetHasExtension()
public java.util.List<java.lang.String> getNavtiveViewList()
throws java.sql.SQLException
java.sql.SQLExceptionDatabaseInformationpublic java.util.List<java.lang.String> getMaximoViewList()
throws java.sql.SQLException
dc - java.sql.SQLExceptionpublic java.lang.String getNickName()
public boolean hasTable(java.lang.String tbname)
throws java.sql.SQLException
java.sql.SQLExceptionpublic boolean hasTableColumn(java.lang.String objName,
java.lang.String attrName)
throws java.sql.SQLException
java.sql.SQLExceptionpublic Util getUtil() throws java.lang.Exception
java.lang.Exceptionpublic void maxVarSetup(java.util.TreeMap<java.lang.String,java.lang.String> maxVarMap)
public java.lang.String getMaxVarValueFromCache(java.lang.String varName)
getMaxVarValueFromCache in class MaximoDatabaseInfopublic int getSequenceIncrement()
throws MXException,
java.sql.SQLException
MaximoDatabaseInfogetSequenceIncrement in class MaximoDatabaseInfoMXExceptionjava.sql.SQLExceptionpublic boolean isMaxInst()
isMaxInst in class MaximoDatabaseInfo