0

Hello all,

I am using Spring Specification in my application.
In application I am having layered object design, So for each layer I am having a different DTO.
e.g. For Business Layer (services) I have PersonBusinessEntity and for persistance Layer (repositories) I have PersonJPAEntity.

While tranferring DTO from one layer to another, it is transformed in respective type of entity.
So from in manager I am getting to PersonBusinessEntity and transformed to PersonJPAentity to call
repository.

Both entities have same set of fields except few ones which are required as per layer in which they are processing.
e.g encryptionKeyId is only is PersonJPAEntity used to
encrpty / decrypt data in saving / fetching operation.

In case of specification I am getting specification of type at service / business layer then I need to transform it to specification of type.

So my quqstion is, is it possible to tranform Specification to Specification given that T and T1 both having same set of field which required by specification? Or Is is not even possible as Specification is tightly bound with JPA entity ?

Please assist, Thanks in advance.

Sanjay Jain
  • 3,518
  • 8
  • 59
  • 93

0 Answers0