Merge pull request 'AL-4824' (!256) from AL-4824 into master
Reviewed-on: adm/ModelWeb#256 Reviewed-by: fabio <fabio.faria@rjconsultores.com.br>master
commit
b4d86177c1
2
pom.xml
2
pom.xml
|
@ -3,7 +3,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>br.com.rjconsultores</groupId>
|
||||
<artifactId>ModelWeb</artifactId>
|
||||
<version>1.97.0</version>
|
||||
<version>1.98.0</version>
|
||||
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
|
|
|
@ -16,4 +16,8 @@ public interface FormaPagoDAO extends GenericDAO<FormaPago, Short> {
|
|||
public List<FormaPago> buscarPorDescricao(String descpago);
|
||||
|
||||
public List<FormaPago> buscarTodosExceto(Integer... idFormaPago);
|
||||
|
||||
public List<FormaPago> buscarNotIn(Short... idsFormaPago);
|
||||
|
||||
public List<FormaPago> buscarIn(Short... idsFormaPago);
|
||||
}
|
||||
|
|
|
@ -55,4 +55,24 @@ public class FormaPagoHibernateDAO extends GenericHibernateDAO<FormaPago, Short>
|
|||
return c.list();
|
||||
|
||||
}
|
||||
|
||||
public List<FormaPago> buscarNotIn(Short... idsFormaPago) {
|
||||
Criteria c = this.makeCriteria();
|
||||
for (Short id : idsFormaPago) {
|
||||
c.add(Restrictions.ne("formapagoId", id));
|
||||
}
|
||||
c.add(Restrictions.eq(ACTIVO, Boolean.TRUE));
|
||||
c.addOrder(Order.asc("descpago"));
|
||||
return c.list();
|
||||
|
||||
}
|
||||
|
||||
public List<FormaPago> buscarIn(Short... idFormaPago) {
|
||||
Criteria c = this.makeCriteria();
|
||||
c.add(Restrictions.in("formapagoId", idFormaPago));
|
||||
c.add(Restrictions.eq(ACTIVO, Boolean.TRUE));
|
||||
c.addOrder(Order.asc("descpago"));
|
||||
return c.list();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,4 +22,8 @@ public interface FormaPagoService extends GenericService<FormaPago, Short> {
|
|||
* @return
|
||||
*/
|
||||
public List<FormaPago> buscarFormasPagoExceptoEspeciales();
|
||||
|
||||
public List<FormaPago> buscarNotIn(Short... idFormaPago);
|
||||
|
||||
public List<FormaPago> buscarIn(Short... idFormaPago);
|
||||
}
|
||||
|
|
|
@ -103,4 +103,12 @@ public class FormaPagoServiceImpl implements FormaPagoService {
|
|||
public List<FormaPago> buscarFormasPagoExceptoEspeciales() {
|
||||
return formaPagoDAO.buscarTodosExceto(formasPagoEspeciales);
|
||||
}
|
||||
|
||||
public List<FormaPago> buscarNotIn(Short... idFormaPago) {
|
||||
return formaPagoDAO.buscarNotIn(idFormaPago);
|
||||
}
|
||||
|
||||
public List<FormaPago> buscarIn(Short... idFormaPago) {
|
||||
return formaPagoDAO.buscarIn(idFormaPago);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue