![JAR search and dependency download from the Maven repository](/logo.png)
ee.telekom.workflow.util.AbstractRowMapper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of workflow-engine Show documentation
Show all versions of workflow-engine Show documentation
Telekom-workflow-engine core provides the runtime environment for workflow execution together with all the supporting services (clustering, persistence, error handling etc).
package ee.telekom.workflow.util;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Date;
import org.springframework.jdbc.core.RowMapper;
import ee.telekom.workflow.core.node.NodeStatus;
import ee.telekom.workflow.core.workflowinstance.WorkflowInstanceStatus;
import ee.telekom.workflow.graph.WorkItemStatus;
public abstract class AbstractRowMapper implements RowMapper{
protected String getString( ResultSet rs, String columnLabel ) throws SQLException{
return rs.getString( columnLabel );
}
protected Integer getInteger( ResultSet rs, String columnLabel ) throws SQLException{
Integer value = rs.getInt( columnLabel );
return rs.wasNull() ? null : value;
}
protected Long getLong( ResultSet rs, String columnLabel ) throws SQLException{
Long value = rs.getLong( columnLabel );
return rs.wasNull() ? null : value;
}
protected Date getDate( ResultSet rs, String columnLabel ) throws SQLException{
return rs.getTimestamp( columnLabel );
}
protected Boolean getBoolean( ResultSet rs, String columnLabel ) throws SQLException{
String value = rs.getString( columnLabel );
return YesNoUtil.asBoolean( value );
}
protected WorkflowInstanceStatus getWorkflowInstanceStatus( ResultSet rs, String columnLabel ) throws SQLException{
String value = rs.getString( columnLabel );
return value == null ? null : WorkflowInstanceStatus.valueOf( value );
}
protected WorkItemStatus getWorkItemStatus( ResultSet rs, String columnLabel ) throws SQLException{
String value = rs.getString( columnLabel );
return value == null ? null : WorkItemStatus.valueOf( value );
}
protected NodeStatus getNodeStatus( ResultSet rs, String columnLabel ) throws SQLException{
String value = rs.getString( columnLabel );
return value == null ? null : NodeStatus.valueOf( value );
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy