public class DatabaseType
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.util.Set<java.lang.String> |
CRYPTOTYPES |
static java.util.Set<java.lang.String> |
DATETIMETYPES |
static java.util.Set<java.lang.String> |
DECIMALTYPES |
static java.util.Set<java.lang.String> |
FLOATTYPES |
static java.util.Set<java.lang.String> |
INTEGERTYPES |
static java.util.Set<java.lang.String> |
STRINGTYPES |
static java.util.Set<java.lang.String> |
TAKESLENGTH |
| Constructor and Description |
|---|
DatabaseType() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getDatabaseType(java.lang.String maxtype,
java.lang.Integer length,
java.lang.Integer scale,
MaximoDatabaseInfo mdi)
Give the native database definition for the given maxtype & parameters.
|
static java.lang.String |
getDatabaseType(java.lang.String maxtype,
java.lang.Integer length,
java.lang.Integer scale,
MaximoDatabaseInfo mdi,
boolean typeOnly)
Give the native database definition for the given maxtype & parameters.
|
static java.lang.String |
getDatabaseTypeOnly(java.lang.String maxType,
int length,
MaximoDatabaseInfo mdi)
Returns just the native database type, without length or scale parameter.
|
static java.lang.String |
getDatabaseTypeOnly(java.lang.String maxType,
java.lang.String lengthStr,
MaximoDatabaseInfo mdi)
Return the native database type.
|
static AttributeStorage |
getMaxDef(DatabaseInformation di,
java.lang.String dbType,
java.lang.Integer dbLength,
java.lang.Integer dbScale)
Given a database definition, create a Maximo definition
|
static int |
getVarCharColumnLength(int length,
MaximoDatabaseInfo mdi)
Returns the length to create a field with, considering the VarCharMultiple.
|
static boolean |
needLength(java.lang.String maxtype)
Does the MaxType require a length value?
|
static boolean |
needScale(java.lang.String maxtype)
Does the MaxType require a scale value?
|
static boolean |
varCharMultipleAffected(java.lang.String dbType)
Is this database type one of the kinds that is affected by the MaxVar VARCHARMULTIPLE setting?
|
public static final java.util.Set<java.lang.String> STRINGTYPES
public static final java.util.Set<java.lang.String> DATETIMETYPES
public static final java.util.Set<java.lang.String> INTEGERTYPES
public static final java.util.Set<java.lang.String> DECIMALTYPES
public static final java.util.Set<java.lang.String> FLOATTYPES
public static final java.util.Set<java.lang.String> CRYPTOTYPES
public static final java.util.Set<java.lang.String> TAKESLENGTH
public static java.lang.String getDatabaseTypeOnly(java.lang.String maxType,
java.lang.String lengthStr,
MaximoDatabaseInfo mdi)
throws java.lang.Exception
maxType - ALN, YORN, etc..length - Needed in some case.server - Type of Database ServerMXExceptionjava.lang.Exceptionpublic static java.lang.String getDatabaseTypeOnly(java.lang.String maxType,
int length,
MaximoDatabaseInfo mdi)
throws java.lang.Exception
maxtype - ALN, UPPER, YORN, etc...length - Length of the field, ignored for types that don't take a length, i.e. YORNs.mdi - Object that gives information about the database.MXExceptionjava.lang.Exceptionpublic static java.lang.String getDatabaseType(java.lang.String maxtype,
java.lang.Integer length,
java.lang.Integer scale,
MaximoDatabaseInfo mdi)
throws java.sql.SQLException
maxtype - ALN, UPPER, YORN, etc...length - Length of the field, ignored for types that don't take a length, i.e. YORNs.scale - Scale for types that take a scale.mdi - Object that gives information about the database.MXExceptionjava.sql.SQLExceptionpublic static java.lang.String getDatabaseType(java.lang.String maxtype,
java.lang.Integer length,
java.lang.Integer scale,
MaximoDatabaseInfo mdi,
boolean typeOnly)
throws java.sql.SQLException
maxtype - ALN, UPPER, YORN, etc...length - Length of the field, ignored for types that don't take a length, i.e. YORNs.scale - Scale for types that take a scale.mdi - Object that gives information about the database.typeOnly - If true, the length & scale will be left off the returned string, only giving the native database type.MXExceptionjava.sql.SQLExceptionpublic static int getVarCharColumnLength(int length,
MaximoDatabaseInfo mdi)
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean needScale(java.lang.String maxtype)
maxtype - public static boolean needLength(java.lang.String maxtype)
maxtype - public static boolean varCharMultipleAffected(java.lang.String dbType)
dbType - The database type.public static AttributeStorage getMaxDef(DatabaseInformation di, java.lang.String dbType, java.lang.Integer dbLength, java.lang.Integer dbScale) throws java.sql.SQLException
dbType - dbLength - dbScale - java.sql.SQLException