it.biobytes.ammentos.fieldtypes
Class StringType
java.lang.Object
it.biobytes.ammentos.fieldtypes.StringType
- All Implemented Interfaces:
- FieldType
public class StringType
- extends java.lang.Object
- implements FieldType
- Author:
- davide
Constructor Summary |
StringType()
Creates a new instance of SqlString |
Method Summary |
java.lang.Object |
addValues(java.lang.Object value1,
java.lang.Object value2)
Returns the sum of the provided values, or null if summing is not possible |
java.lang.String |
formatValue(java.lang.Object value)
|
java.lang.Object |
generateValue()
|
java.lang.Class |
getMappedClass()
Gets the underlying mappes Java class represented from elements of this
type |
java.lang.Object[] |
getPossibleValues()
|
boolean |
isNumeric()
|
java.lang.Object |
loadValue(java.sql.ResultSet rs,
Field field)
|
java.lang.Object |
parseValue(java.lang.String str)
|
void |
setParamValue(java.lang.Object fieldValue,
java.sql.PreparedStatement pstmt,
int paramIndex)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StringType
public StringType()
- Creates a new instance of SqlString
formatValue
public java.lang.String formatValue(java.lang.Object value)
- Specified by:
formatValue
in interface FieldType
loadValue
public java.lang.Object loadValue(java.sql.ResultSet rs,
Field field)
throws java.sql.SQLException
- Specified by:
loadValue
in interface FieldType
- Throws:
java.sql.SQLException
parseValue
public java.lang.Object parseValue(java.lang.String str)
throws PersistenceException
- Specified by:
parseValue
in interface FieldType
- Throws:
PersistenceException
setParamValue
public void setParamValue(java.lang.Object fieldValue,
java.sql.PreparedStatement pstmt,
int paramIndex)
throws java.sql.SQLException
- Specified by:
setParamValue
in interface FieldType
- Throws:
java.sql.SQLException
generateValue
public java.lang.Object generateValue()
throws PersistenceException
- Specified by:
generateValue
in interface FieldType
- Throws:
PersistenceException
isNumeric
public boolean isNumeric()
- Specified by:
isNumeric
in interface FieldType
getPossibleValues
public java.lang.Object[] getPossibleValues()
- Specified by:
getPossibleValues
in interface FieldType
addValues
public java.lang.Object addValues(java.lang.Object value1,
java.lang.Object value2)
- Returns the sum of the provided values, or null if summing is not possible
- Specified by:
addValues
in interface FieldType
- Parameters:
value1
- First value to addvalue2
- Second value to add
getMappedClass
public java.lang.Class getMappedClass()
- Gets the underlying mappes Java class represented from elements of this
type
- Specified by:
getMappedClass
in interface FieldType
- Returns:
- the Java class mapped from this FieldType