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, 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
MaximoDatabaseInfo
isMTEnabled
in class MaximoDatabaseInfo
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 getDefaultSynonym(java.lang.String domainid, java.lang.String maxvalue) throws java.sql.SQLException
domainid
- maxvalue
- 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
public boolean hasTableColumn(java.lang.String objName, java.lang.String attrName) throws java.sql.SQLException
java.sql.SQLException
public Util getUtil() throws java.lang.Exception
java.lang.Exception
public void maxVarSetup(java.util.TreeMap<java.lang.String,java.lang.String> maxVarMap)
public java.lang.String getMaxVarValueFromCache(java.lang.String varName)
getMaxVarValueFromCache
in class MaximoDatabaseInfo
public int getSequenceIncrement() throws MXException, java.sql.SQLException
MaximoDatabaseInfo
getSequenceIncrement
in class MaximoDatabaseInfo
MXException
java.sql.SQLException
public boolean isMaxInst()
isMaxInst
in class MaximoDatabaseInfo