title: What pattern fits between a façade and a DAO?
body: <p>I'm in the process of designing part of my companies architecture for its Java EE web applications. I'm pretty clear on the reasons to use a façade and one or more DAOs. The problem I have is this:</p>
  
  <p>There will be some logic that definitely belongs in the integration tier because it's all about keeping the data model consistent. Except the logic goes beyond simply maintaining referential integrity and other 'raw' persistence tasks which will be handled by JPA and Hibernate. I don't class this as business logic because it's separate to any business function. However, my understanding is that a DAO should only implement the logic required to access and persist objects to the data source.</p>
  
  <p>My conclusion is that I need a 'business object'-like pattern which is appropriate for the integration tier. I've looked around and the closest thing I have found (yet still not quite right to my mind) is the <a href="http://java.sun.com/blueprints/corej2eepatterns/Patterns/TransferObjectAssembler.html" rel="nofollow noreferrer">Sun Transfer Object Assembler pattern</a>.</p>
  
  <p>Either there's a gap in my understanding of Java EE or there is a pattern out there that will fit. </p>