Class JDBCValueMappings.AbstractValueReaderWriter<JALO,DB>
- java.lang.Object
-
- de.hybris.platform.persistence.property.JDBCValueMappings.AbstractValueReaderWriter<JALO,DB>
-
- All Implemented Interfaces:
JDBCValueMappings.PrimitiveValueReader,JDBCValueMappings.PrimitiveValueWriter,JDBCValueMappings.ValueReader<JALO,DB>,JDBCValueMappings.ValueWriter<JALO,DB>
- Direct Known Subclasses:
JDBCValueMappings.BlobValueWriter,JDBCValueMappings.DefaultDateTimestampValueReaderWriter,JDBCValueMappings.DefaultIntegerValueReaderWriter,JDBCValueMappings.DefaultLongReaderWriter,JDBCValueMappings.DefaultStringValueReaderWriter,JDBCValueMappings.ItemPropertyValueReaderWriter,JDBCValueMappings.ItemReaderWriter,JDBCValueMappings.PKReaderWriter
- Enclosing class:
- JDBCValueMappings
public abstract static class JDBCValueMappings.AbstractValueReaderWriter<JALO,DB> extends java.lang.Object implements JDBCValueMappings.ValueReader<JALO,DB>, JDBCValueMappings.ValueWriter<JALO,DB>
-
-
Constructor Summary
Constructors Constructor Description AbstractValueReaderWriter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description JALOconvertValueToJava(DB value)DBconvertValueToSQL(JALO value)booleangetBoolean(java.sql.ResultSet rs, int idx)booleangetBoolean(java.sql.ResultSet rs, java.lang.String fieldName)bytegetByte(java.sql.ResultSet rs, int idx)bytegetByte(java.sql.ResultSet rs, java.lang.String fieldName)chargetChar(java.sql.ResultSet rs, int idx)chargetChar(java.sql.ResultSet rs, java.lang.String fieldName)doublegetDouble(java.sql.ResultSet rs, int idx)doublegetDouble(java.sql.ResultSet rs, java.lang.String fieldName)floatgetFloat(java.sql.ResultSet rs, int idx)floatgetFloat(java.sql.ResultSet rs, java.lang.String fieldName)intgetInt(java.sql.ResultSet rs, int idx)intgetInt(java.sql.ResultSet rs, java.lang.String fieldName)longgetLong(java.sql.ResultSet rs, int idx)longgetLong(java.sql.ResultSet rs, java.lang.String fieldName)shortgetShort(java.sql.ResultSet rs, int idx)shortgetShort(java.sql.ResultSet rs, java.lang.String fieldName)JALOgetValue(java.sql.ResultSet rs, int idx)JALOgetValue(java.sql.ResultSet rs, java.lang.String fieldName)protected abstract DBreadValue(java.sql.ResultSet rs, int idx)protected abstract DBreadValue(java.sql.ResultSet rs, java.lang.String fieldName)voidsetPrimitive(java.sql.PreparedStatement stmt, int fieldIndex, boolean value)voidsetPrimitive(java.sql.PreparedStatement stmt, int fieldIndex, byte value)voidsetPrimitive(java.sql.PreparedStatement stmt, int fieldIndex, char value)voidsetPrimitive(java.sql.PreparedStatement stmt, int fieldIndex, double value)voidsetPrimitive(java.sql.PreparedStatement stmt, int fieldIndex, float value)voidsetPrimitive(java.sql.PreparedStatement stmt, int fieldIndex, int value)voidsetPrimitive(java.sql.PreparedStatement stmt, int fieldIndex, long value)voidsetPrimitive(java.sql.PreparedStatement stmt, int fieldIndex, short value)voidsetPrimitive(java.sql.PreparedStatement stmt, int fieldIndex, java.lang.String value)voidsetValue(java.sql.PreparedStatement stmt, int fieldIndex, JALO value)java.lang.StringtoString()protected abstract voidwriteValue(java.sql.PreparedStatement stmt, int fieldIndex, DB value)
-
-
-
Method Detail
-
convertValueToJava
public JALO convertValueToJava(DB value)
- Specified by:
convertValueToJavain interfaceJDBCValueMappings.ValueReader<JALO,DB>
-
getValue
public final JALO getValue(java.sql.ResultSet rs, java.lang.String fieldName) throws java.sql.SQLException
- Specified by:
getValuein interfaceJDBCValueMappings.ValueReader<JALO,DB>- Throws:
java.sql.SQLException
-
getValue
public final JALO getValue(java.sql.ResultSet rs, int idx) throws java.sql.SQLException
- Specified by:
getValuein interfaceJDBCValueMappings.ValueReader<JALO,DB>- Throws:
java.sql.SQLException
-
readValue
protected abstract DB readValue(java.sql.ResultSet rs, java.lang.String fieldName) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
readValue
protected abstract DB readValue(java.sql.ResultSet rs, int idx) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
convertValueToSQL
public DB convertValueToSQL(JALO value)
- Specified by:
convertValueToSQLin interfaceJDBCValueMappings.ValueWriter<JALO,DB>
-
setValue
public final void setValue(java.sql.PreparedStatement stmt, int fieldIndex, JALO value) throws java.sql.SQLException- Specified by:
setValuein interfaceJDBCValueMappings.ValueWriter<JALO,DB>- Throws:
java.sql.SQLException
-
setPrimitive
public final void setPrimitive(java.sql.PreparedStatement stmt, int fieldIndex, java.lang.String value) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
setPrimitive
public final void setPrimitive(java.sql.PreparedStatement stmt, int fieldIndex, long value) throws java.sql.SQLException- Specified by:
setPrimitivein interfaceJDBCValueMappings.PrimitiveValueWriter- Throws:
java.sql.SQLException
-
setPrimitive
public final void setPrimitive(java.sql.PreparedStatement stmt, int fieldIndex, byte value) throws java.sql.SQLException- Specified by:
setPrimitivein interfaceJDBCValueMappings.PrimitiveValueWriter- Throws:
java.sql.SQLException
-
setPrimitive
public final void setPrimitive(java.sql.PreparedStatement stmt, int fieldIndex, short value) throws java.sql.SQLException- Specified by:
setPrimitivein interfaceJDBCValueMappings.PrimitiveValueWriter- Throws:
java.sql.SQLException
-
setPrimitive
public final void setPrimitive(java.sql.PreparedStatement stmt, int fieldIndex, float value) throws java.sql.SQLException- Specified by:
setPrimitivein interfaceJDBCValueMappings.PrimitiveValueWriter- Throws:
java.sql.SQLException
-
setPrimitive
public final void setPrimitive(java.sql.PreparedStatement stmt, int fieldIndex, boolean value) throws java.sql.SQLException- Specified by:
setPrimitivein interfaceJDBCValueMappings.PrimitiveValueWriter- Throws:
java.sql.SQLException
-
setPrimitive
public final void setPrimitive(java.sql.PreparedStatement stmt, int fieldIndex, double value) throws java.sql.SQLException- Specified by:
setPrimitivein interfaceJDBCValueMappings.PrimitiveValueWriter- Throws:
java.sql.SQLException
-
setPrimitive
public final void setPrimitive(java.sql.PreparedStatement stmt, int fieldIndex, int value) throws java.sql.SQLException- Specified by:
setPrimitivein interfaceJDBCValueMappings.PrimitiveValueWriter- Throws:
java.sql.SQLException
-
setPrimitive
public final void setPrimitive(java.sql.PreparedStatement stmt, int fieldIndex, char value) throws java.sql.SQLException- Specified by:
setPrimitivein interfaceJDBCValueMappings.PrimitiveValueWriter- Throws:
java.sql.SQLException
-
getShort
public final short getShort(java.sql.ResultSet rs, java.lang.String fieldName) throws java.sql.SQLException- Specified by:
getShortin interfaceJDBCValueMappings.PrimitiveValueReader- Returns:
0if the db-entry was null- Throws:
java.sql.SQLException
-
getShort
public final short getShort(java.sql.ResultSet rs, int idx) throws java.sql.SQLException- Specified by:
getShortin interfaceJDBCValueMappings.PrimitiveValueReader- Returns:
0if the db-entry was null- Throws:
java.sql.SQLException
-
getLong
public final long getLong(java.sql.ResultSet rs, java.lang.String fieldName) throws java.sql.SQLException- Specified by:
getLongin interfaceJDBCValueMappings.PrimitiveValueReader- Returns:
0Lif the db-entry was null- Throws:
java.sql.SQLException
-
getLong
public final long getLong(java.sql.ResultSet rs, int idx) throws java.sql.SQLException- Specified by:
getLongin interfaceJDBCValueMappings.PrimitiveValueReader- Returns:
0lif the db-entry was null- Throws:
java.sql.SQLException
-
getDouble
public final double getDouble(java.sql.ResultSet rs, java.lang.String fieldName) throws java.sql.SQLException- Specified by:
getDoublein interfaceJDBCValueMappings.PrimitiveValueReader- Returns:
0dif the db-entry was null- Throws:
java.sql.SQLException
-
getDouble
public final double getDouble(java.sql.ResultSet rs, int idx) throws java.sql.SQLException- Specified by:
getDoublein interfaceJDBCValueMappings.PrimitiveValueReader- Returns:
0dif the db-entry was null- Throws:
java.sql.SQLException
-
getChar
public final char getChar(java.sql.ResultSet rs, java.lang.String fieldName) throws java.sql.SQLException- Specified by:
getCharin interfaceJDBCValueMappings.PrimitiveValueReader- Returns:
' 'if the db-entry was null- Throws:
java.sql.SQLException
-
getChar
public final char getChar(java.sql.ResultSet rs, int idx) throws java.sql.SQLException- Specified by:
getCharin interfaceJDBCValueMappings.PrimitiveValueReader- Returns:
'0'if the db-entry was null- Throws:
java.sql.SQLException
-
getByte
public final byte getByte(java.sql.ResultSet rs, java.lang.String fieldName) throws java.sql.SQLException- Specified by:
getBytein interfaceJDBCValueMappings.PrimitiveValueReader- Returns:
0if the db-entry was null- Throws:
java.sql.SQLException
-
getByte
public final byte getByte(java.sql.ResultSet rs, int idx) throws java.sql.SQLException- Specified by:
getBytein interfaceJDBCValueMappings.PrimitiveValueReader- Returns:
0if the db-entry was null- Throws:
java.sql.SQLException
-
getFloat
public final float getFloat(java.sql.ResultSet rs, java.lang.String fieldName) throws java.sql.SQLException- Specified by:
getFloatin interfaceJDBCValueMappings.PrimitiveValueReader- Returns:
0dif the db-entry was null- Throws:
java.sql.SQLException
-
getFloat
public final float getFloat(java.sql.ResultSet rs, int idx) throws java.sql.SQLException- Specified by:
getFloatin interfaceJDBCValueMappings.PrimitiveValueReader- Returns:
0dif the db-entry was null- Throws:
java.sql.SQLException
-
getInt
public final int getInt(java.sql.ResultSet rs, java.lang.String fieldName) throws java.sql.SQLException- Specified by:
getIntin interfaceJDBCValueMappings.PrimitiveValueReader- Returns:
0if the db-entry was null- Throws:
java.sql.SQLException
-
getInt
public final int getInt(java.sql.ResultSet rs, int idx) throws java.sql.SQLException- Specified by:
getIntin interfaceJDBCValueMappings.PrimitiveValueReader- Returns:
0if the db-entry was null- Throws:
java.sql.SQLException
-
getBoolean
public final boolean getBoolean(java.sql.ResultSet rs, java.lang.String fieldName) throws java.sql.SQLException- Specified by:
getBooleanin interfaceJDBCValueMappings.PrimitiveValueReader- Returns:
falseif the db-entry was null- Throws:
java.sql.SQLException
-
getBoolean
public final boolean getBoolean(java.sql.ResultSet rs, int idx) throws java.sql.SQLException- Specified by:
getBooleanin interfaceJDBCValueMappings.PrimitiveValueReader- Returns:
falseif the db-entry was null- Throws:
java.sql.SQLException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
writeValue
protected abstract void writeValue(java.sql.PreparedStatement stmt, int fieldIndex, DB value) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
-