|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectpt.moredata.dao.util.DataTypes
DataTypeInfo.java Company MoreData
| Field Summary | |
static int |
ARRAY
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type ARRAY. |
static int |
BIGINT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type BIGINT. |
static int |
BINARY
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type BINARY. |
static int |
BIT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type BIT. |
static int |
BLOB
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type BLOB. |
static int |
BOOLEAN
The constant in the Java programming language, somtimes referred to as a type code, that identifies the generic SQL type BOOLEAN. |
static int |
CHAR
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type CHAR. |
static int |
CLOB
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type CLOB. |
static int |
DATALINK
The constant in the Java programming language, somtimes referred to as a type code, that identifies the generic SQL type DATALINK. |
static int |
DATE
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type DATE. |
static int |
DECIMAL
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type DECIMAL. |
static int |
DISTINCT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type DISTINCT. |
static int |
DOUBLE
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type DOUBLE. |
static int |
FLOAT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type FLOAT. |
static int |
IMAGE
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type BLOB for a image. |
static int |
INTEGER
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type INTEGER. |
static int |
JAVA_OBJECT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type JAVA_OBJECT. |
static int |
LONGVARBINARY
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type LONGVARBINARY. |
static int |
LONGVARCHAR
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type LONGVARCHAR. |
static int |
NULL
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type NULL. |
static int |
NUMERIC
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type NUMERIC. |
static int |
OTHER
The constant in the Java programming language that indicates that the SQL type is database-specific and gets mapped to a Java object that can be accessed via the methods getObject and setObject. |
static int |
REAL
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type REAL. |
static int |
REF
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type REF. |
static int |
SMALLINT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type SMALLINT. |
static int |
STRUCT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type STRUCT. |
static int |
TIME
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type TIME. |
static int |
TIMESTAMP
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type TIMESTAMP. |
static int |
TINYINT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type TINYINT. |
static int |
VARBINARY
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type VARBINARY. |
static int |
VARCHAR
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type VARCHAR. |
| Method Summary | |
static int |
getColLength(int _dataType,
int _tamanho,
java.lang.String _format)
Retorna o número de colunas que o objecto irá ocupar depois de formatado |
static int |
getColLength(int _dataType,
java.lang.Object _object,
java.lang.String _format)
Retorna o número de colunas que o objecto irá ocupar depois de formatado |
static int |
getColLength(java.lang.String _dataType,
int _tamanho,
java.lang.String _format)
Retorna o número de colunas que o objecto irá ocupar depois de formatado |
static java.lang.String |
getDataTypeDescription(int dataType)
Devolve uma string representativa do tipo de dados convertido de inteiro para string |
static DataTypeInfo |
getDataTypeInfo(int type)
Devolve informacao diversa sobre um tipo de dados |
static java.lang.String[] |
getDataTypes()
Devolve um array que contem strings com todos os tipos de dados suportados. |
static java.lang.String |
getFormatedNumber(int _dataType,
java.lang.Object value,
java.lang.String formato)
|
static java.lang.String |
getFormatedString(int _dataType,
java.lang.Object value,
java.lang.String formato)
Devolve o valor enviado como string convertido para o objecto do tipo enviado como parametro |
static java.lang.Object |
getObjectValue(int dataType,
java.lang.String value,
java.lang.String datePattern)
Deprecated. Use method getObject(int, String, String, String) insted. |
static java.lang.Object |
getObjectValue(int dataType,
java.lang.String value,
java.lang.String datePattern,
java.lang.String numberPattern)
Converts a String value into a more specific Object. |
static long |
getSqlChars(int _dataType)
Devolve o valor enviado para o maxValue do DDataField |
static int |
getSqlDataType(java.lang.String strDataType)
Devolve o identificador unico (inteiro) do tipo de dados a partir da string |
static java.lang.String |
makeFormat(int type)
|
static java.lang.String |
makeFormat(int type,
boolean separador)
|
static java.lang.String |
numberMask(int _nd,
boolean separador)
|
static void |
validateObjectType(int _dataType,
java.lang.Object value)
Valida se o tipo de objecto enviado e compativel com o tipo de dados que se pensa estar a gerir |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int BIT
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
BIT.
public static final int TINYINT
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
TINYINT.
public static final int SMALLINT
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
SMALLINT.
public static final int INTEGER
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
INTEGER.
public static final int BIGINT
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
BIGINT.
public static final int FLOAT
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
FLOAT.
public static final int REAL
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
REAL.
public static final int DOUBLE
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
DOUBLE.
public static final int NUMERIC
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
NUMERIC.
public static final int DECIMAL
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
DECIMAL.
public static final int CHAR
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
CHAR.
public static final int VARCHAR
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
VARCHAR.
public static final int LONGVARCHAR
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
LONGVARCHAR.
public static final int DATE
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
DATE.
public static final int TIME
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
TIME.
public static final int TIMESTAMP
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
TIMESTAMP.
public static final int BINARY
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
BINARY.
public static final int VARBINARY
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
VARBINARY.
public static final int LONGVARBINARY
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
LONGVARBINARY.
public static final int NULL
The constant in the Java programming language, sometimes referred
to as a type code, that identifies the generic SQL type
NULL.
public static final int OTHER
getObject and setObject.
public static final int JAVA_OBJECT
JAVA_OBJECT.
public static final int DISTINCT
DISTINCT.
public static final int STRUCT
STRUCT.
public static final int ARRAY
ARRAY.
public static final int BLOB
BLOB.
public static final int CLOB
CLOB.
public static final int REF
REF.
public static final int DATALINK
DATALINK.
public static final int BOOLEAN
BOOLEAN.
public static final int IMAGE
BLOB for a image.
| Method Detail |
public static int getSqlDataType(java.lang.String strDataType)
throws java.lang.NullPointerException
strDataType - nome do tipo de dados
java.lang.NullPointerException - Se a string for nula.
java.lang.IllegalArgumentException - Se a string nao representar nenhum tipo
de dados.
public static java.lang.String getDataTypeDescription(int dataType)
throws java.lang.IllegalArgumentException
dataType - inteiro associado ao tipo de dados
java.lang.IllegalArgumentExceptionpublic static java.lang.String[] getDataTypes()
public static DataTypeInfo getDataTypeInfo(int type)
type - tipo de dados a procurar
public static java.lang.Object getObjectValue(int dataType,
java.lang.String value,
java.lang.String datePattern)
throws java.text.ParseException,
java.lang.NumberFormatException
| Data Type | Returned Object | ||||||
|---|---|---|---|---|---|---|---|
|
java.lang.Integer | ||||||
| BIGINT | java.lang.Long | ||||||
| REAL | java.lang.Float | ||||||
|
java.lang.Double | ||||||
|
java.math.BigDecimal | ||||||
| DATE | java.util.Date | ||||||
| TIME | java.util.Time | ||||||
| TIMESTAMP | java.util.TimeStamp | ||||||
|
the same java.lang.String | ||||||
|
the same java.lang.String | ||||||
|
java.lang.Boolean | ||||||
| DATALINK | java.net.URL | ||||||
| NULL | null | ||||||
|
the same java.lang.String |
dataType - The Object type to be created.value - The String value.datePattern - A pattern to be used with SimpleDateFormat. this is
for parsing dates only. If is null no pattern will
be used
java.lang.NumberFormatException - if the String does not
contain a parsable number.
ParseEception - if the String cannot be parsed.
java.text.ParseException
public static java.lang.Object getObjectValue(int dataType,
java.lang.String value,
java.lang.String datePattern,
java.lang.String numberPattern)
throws java.text.ParseException,
java.lang.NumberFormatException
| Data Type | Returned Object | ||||||
|---|---|---|---|---|---|---|---|
|
java.lang.Integer | ||||||
| BIGINT | java.lang.Long | ||||||
| REAL | java.lang.Float | ||||||
|
java.lang.Double | ||||||
|
java.math.BigDecimal | ||||||
| DATE | java.util.Date | ||||||
| TIME | java.util.Time | ||||||
| TIMESTAMP | java.util.TimeStamp | ||||||
|
the same java.lang.String | ||||||
|
the same java.lang.String | ||||||
|
java.lang.Boolean | ||||||
| DATALINK | java.net.URL | ||||||
| NULL | null | ||||||
|
the same java.lang.String |
dataType - The Object type to be created.value - The String value.datePattern - A pattern to be used with SimpleDateFormat. this is
for parsing dates only. If is null no pattern will
be usednumberPattern - A pattern to be used with DecimalFormat. this is
for parsing numbers only. If is null no pattern will
be used
java.lang.NumberFormatException - if the String does not
contain a parsable number.
ParseEception - if the String cannot be parsed.
java.text.ParseException
public static void validateObjectType(int _dataType,
java.lang.Object value)
public static java.lang.String getFormatedNumber(int _dataType,
java.lang.Object value,
java.lang.String formato)
public static java.lang.String getFormatedString(int _dataType,
java.lang.Object value,
java.lang.String formato)
public static long getSqlChars(int _dataType)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic static java.lang.String makeFormat(int type)
public static java.lang.String makeFormat(int type,
boolean separador)
public static java.lang.String numberMask(int _nd,
boolean separador)
public static int getColLength(int _dataType,
java.lang.Object _object,
java.lang.String _format)
_dataType - Tipo de Dados do Objecto_object - Objecto que deseja formatar_format - Formato segundo o qual o Objectop vai ser formatado
public static int getColLength(int _dataType,
int _tamanho,
java.lang.String _format)
_dataType - Tipo de Dados do Objecto_tamanho - Tamanho do Objecto que deseja formatar_format - Formato segundo o qual o Objectop vai ser formatado
public static int getColLength(java.lang.String _dataType,
int _tamanho,
java.lang.String _format)
_dataType - Tipo de Dados do Objecto em String_tamanho - Tamanho do Objecto que deseja formatar_format - Formato segundo o qual o Objecto vai ser formatado
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||