return super.getSession().createQuery("from PipeLineElementDefect").setFirstResult(page.intValue() * 15).setMaxResults(15).list();
}
public List getPipeLineElementDefectByPipeLineElement(Integer id, Properties properties) {
Connection connection = getConnection(properties);
List list = new ArrayList();
try {
ResultSet resultSet = connection.createStatement().executeQuery("select * from pipelineelementdefect where idElement=" + id);
while (resultSet.next()) {
PipeLineElementDefect pipeLineElementDefect = new PipeLineElementDefect();
pipeLineElementDefect.setDefectId((Integer) resultSet.getInt(1));
pipeLineElementDefect.setDefectType(defectTypeDao.getDefectType((Integer) resultSet.getInt(2)));