Class StringColumnTranslator
- java.lang.Object
-
- com.adaptris.core.services.jdbc.types.FormattableColumnTranslator
-
- com.adaptris.core.services.jdbc.types.StringColumnTranslator
-
- All Implemented Interfaces:
ColumnTranslator
,ColumnWriter
public class StringColumnTranslator extends FormattableColumnTranslator implements ColumnWriter
Column Translator implementation for handling string typesIn the adapter configuration file this class is aliased as jdbc-type-string-column-translator which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Constructor Summary
Constructors Constructor Description StringColumnTranslator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
translate(JdbcResultRow rs, int column)
Translate the column into a String.java.lang.String
translate(JdbcResultRow rs, java.lang.String columnName)
Translate the column into a String.void
write(JdbcResultRow rs, int column, java.io.OutputStream out)
Write the column into the specified outputstream.void
write(JdbcResultRow rs, java.lang.String columnName, java.io.OutputStream out)
Write the column into the specified outputstream.-
Methods inherited from class com.adaptris.core.services.jdbc.types.FormattableColumnTranslator
getFormat, setFormat, toString
-
-
-
-
Method Detail
-
translate
public java.lang.String translate(JdbcResultRow rs, int column) throws java.sql.SQLException, java.io.IOException
Description copied from interface:ColumnTranslator
Translate the column into a String.- Specified by:
translate
in interfaceColumnTranslator
- Parameters:
rs
- the result setcolumn
- the column index- Returns:
- The String representation of the column
- Throws:
java.sql.SQLException
java.io.IOException
-
translate
public java.lang.String translate(JdbcResultRow rs, java.lang.String columnName) throws java.sql.SQLException, java.io.IOException
Description copied from interface:ColumnTranslator
Translate the column into a String.- Specified by:
translate
in interfaceColumnTranslator
- Parameters:
rs
- the result setcolumnName
- the column name- Returns:
- The String representation of the column
- Throws:
java.sql.SQLException
java.io.IOException
-
write
public void write(JdbcResultRow rs, int column, java.io.OutputStream out) throws java.sql.SQLException, java.io.IOException
Description copied from interface:ColumnWriter
Write the column into the specified outputstream.- Specified by:
write
in interfaceColumnWriter
- Parameters:
rs
- the result setcolumn
- the column indexout
- the outputstream- Throws:
java.sql.SQLException
java.io.IOException
-
write
public void write(JdbcResultRow rs, java.lang.String columnName, java.io.OutputStream out) throws java.sql.SQLException, java.io.IOException
Description copied from interface:ColumnWriter
Write the column into the specified outputstream.- Specified by:
write
in interfaceColumnWriter
- Parameters:
rs
- the result setcolumnName
- the column nameout
- the outputstream- Throws:
java.sql.SQLException
java.io.IOException
-
-