|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.hardcode.gdbms.engine.values.ValueFactory
public class ValueFactory
Factoría abstracta de objetos value que dado un tipo básico, devuelve el wrapper apropiado
Field Summary | |
---|---|
static Value |
FALSE
|
static Value |
TRUE
|
Constructor Summary | |
---|---|
ValueFactory()
|
Method Summary | |
---|---|
static NullValue |
createNullValue()
Creates a new null Value |
static BooleanValue |
createValue(boolean b)
Crea un objeto de tipo Value a partir de un booleano |
static BinaryValue |
createValue(byte[] bytes)
Creates a byte array value |
static DateValue |
createValue(java.util.Date d)
Crea un objeto de tipo Date a partir de un Date |
static DoubleValue |
createValue(double d)
Crea un objeto de tipo Value a partir de un double |
static FloatValue |
createValue(float f)
Crea un objeto de tipo Value a partir de un float |
static IntValue |
createValue(int n)
Crea un objeto de tipo Value a partir de un int |
static LongValue |
createValue(long l)
Crea un objeto de tipo Value a partir de un long |
static StringValue |
createValue(java.lang.String s)
Crea un objeto de tipo Value a partir de un String |
static Value |
createValue(java.lang.String text,
int type)
Crea un Value a partir de un literal encontrado en una instrucción y su tipo |
static Value |
createValue(java.lang.String text,
java.lang.String className)
Deprecated. Use createValueWithType(String, int) instead |
static TimeValue |
createValue(java.sql.Time t)
Creates a TimeValue object |
static TimestampValue |
createValue(java.sql.Timestamp t)
Creates a TimestampValue object |
static ValueCollection |
createValue(Value[] values)
Creates an ArrayValue |
static Value |
createValueByType(java.lang.String text,
int type)
DOCUMENT ME! |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Value TRUE
public static final Value FALSE
Constructor Detail |
---|
public ValueFactory()
Method Detail |
---|
public static IntValue createValue(int n)
n
- valor que se quiere representar
public static LongValue createValue(long l)
l
- valor que se quiere representar
public static StringValue createValue(java.lang.String s)
s
- valor que se quiere representar
public static FloatValue createValue(float f)
f
- valor que se quiere representar
public static DoubleValue createValue(double d)
d
- valor que se quiere representar
public static DateValue createValue(java.util.Date d)
d
- valor que se quiere representar
public static TimeValue createValue(java.sql.Time t)
t
- Time value
public static TimestampValue createValue(java.sql.Timestamp t)
t
- Timestamp value
public static BooleanValue createValue(boolean b)
b
- valor que se quiere representar
public static ValueCollection createValue(Value[] values)
values
- DOCUMENT ME!
public static Value createValue(java.lang.String text, int type) throws SemanticException
text
- Texto del valortype
- Tipo del valor
SemanticException
- Si el tipo del literal no está soportadopublic static Value createValueByType(java.lang.String text, int type) throws java.text.ParseException, java.lang.NumberFormatException
text
- DOCUMENT ME!type
- DOCUMENT ME!
java.text.ParseException
- DOCUMENT ME!
java.lang.NumberFormatException
public static Value createValue(java.lang.String text, java.lang.String className) throws SemanticException
text
- DOCUMENT ME!className
- DOCUMENT ME!
SemanticException
- DOCUMENT ME!public static NullValue createNullValue()
public static BinaryValue createValue(byte[] bytes)
bytes
- bytes of the value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |