SHARE
TWEET

Untitled

a guest Jun 16th, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class EcrCustomizer implements DescriptorCustomizer {
  2.   public void customize(ClassDescriptor descriptor) {
  3.     StoredProcedureCall updateByIdCall = new StoredProcedureCall();
  4.     updateByIdCall.setProcedureName("update_ecr_by_id");
  5.     updateByIdCall.addNamedArgument("id", "id", Long.class);
  6.     updateByIdCall.addNamedArgument("name", "name", Long.class);
  7.     descriptor.getQueryManager().setUpdateCall(updateByIdCall);
  8.   }
  9. }
  10.  
  11. @Customizer(value = EcrCustomizer.class)
  12. @Table(name = "ecr")
  13. public class Ecr{
  14.     @Id
  15.     private Long id;
  16.     @Column(name = "name_ecr")
  17.     private String  name;
  18.     ..setters/getters
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top