1 19 20 21 package org.apache.cayenne.jpa.map; 22 23 import javax.persistence.GeneratedValue; 24 import javax.persistence.GenerationType; 25 26 public class JpaGeneratedValue { 27 28 protected String generator; 29 protected GenerationType strategy = GenerationType.AUTO; 30 31 public JpaGeneratedValue() { 32 33 } 34 35 public JpaGeneratedValue(GeneratedValue annotation) { 36 this.generator = annotation.generator(); 37 this.strategy = annotation.strategy(); 38 } 39 40 public String getGenerator() { 41 return generator; 42 } 43 44 public void setGenerator(String generator) { 45 this.generator = generator; 46 } 47 48 public GenerationType getStrategy() { 49 return strategy; 50 } 51 52 public void setStrategy(GenerationType strategy) { 53 this.strategy = strategy; 54 } 55 } 56 | Popular Tags |