conn = DbPoolConnection.getInstance().getReadConnection();
String sql = "select * from template_type where id = ?";
pstm = conn.prepareStatement(sql);
pstm.setInt(1, Integer.parseInt(templateTypeId.getValue()));
rs = pstm.executeQuery();
TemplateType templateType = null;
if(rs.next())
{
templateType = new TemplateTypeImpl();
templateType.setId(DataAccessFactory.getInstance().createUUID(Integer.toString(rs.getInt("id"))));
templateType.setName(rs.getString("name"));
templateType.setDisplayIndex(rs.getInt("displayIndex"));
}
return templateType;
}catch(Exception e)
{
e.printStackTrace();