@Id @GeneratedValue(strategy = GenerationType.TABLE, generator = "dog") @TableGenerator( name = "dog", table = "sequences", pkColumnName = "key", pkColumnValue = "dog", valueColumnName = "seed" ) public Long getId() { return id; }
public static String generationTypeToGeneratorStrategyName(GenerationType generatorEnum, boolean useNewGeneratorMappings) { switch ( generatorEnum ) { case IDENTITY: return "identity"; case AUTO: return useNewGeneratorMappings ? "enhanced-sequence" : "native"; case TABLE: return useNewGeneratorMappings ? "enhanced-table" : MultipleHiLoPerTableGenerator.class.getName(); case SEQUENCE: return useNewGeneratorMappings ? "enhanced-sequence" : "seqhilo"; } throw new AssertionFailure( "Unknown GeneratorType: " + generatorEnum ); }
@Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = COLUMN_NAME__ID) public long getId() { if (idProperty == null) { return _id; } else { return idProperty.get(); } }
@Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "srva_event_id", nullable = false) @Access(value = AccessType.PROPERTY) @Override public Long getId() { return id; }
@Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(nullable = false) @Access(value = AccessType.PROPERTY) @Override public Long getId() { return id; }
@Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = ID, columnDefinition = NORMAL_KEY_DEF) @XmlTransient @Override public long getId() { return id; }
@Override @Id @GeneratedValue(strategy = GenerationType.AUTO) public long getId() { return id; }
private GeneratedValue buildGeneratedValue(Element element) { Element subElement = element != null ? element.element( "generated-value" ) : null; if ( subElement != null ) { AnnotationDescriptor ad = new AnnotationDescriptor( GeneratedValue.class ); String strategy = subElement.attributeValue( "strategy" ); if ( "TABLE".equalsIgnoreCase( strategy ) ) { ad.setValue( "strategy", GenerationType.TABLE ); } else if ( "SEQUENCE".equalsIgnoreCase( strategy ) ) { ad.setValue( "strategy", GenerationType.SEQUENCE ); } else if ( "IDENTITY".equalsIgnoreCase( strategy ) ) { ad.setValue( "strategy", GenerationType.IDENTITY ); } else if ( "AUTO".equalsIgnoreCase( strategy ) ) { ad.setValue( "strategy", GenerationType.AUTO ); } else if ( StringHelper.isNotEmpty( strategy ) ) { throw new AnnotationException( "Unknown GenerationType: " + strategy + ". " + SCHEMA_VALIDATION ); } copyStringAttribute( ad, subElement, "generator", false ); return AnnotationFactory.create( ad ); } else { return null; } }
private IdGenerator checkGeneratedValueAnnotation() { IdGenerator generator = null; AnnotationInstance generatedValueAnnotation = JandexHelper.getSingleAnnotation( annotations(), JPADotNames.GENERATED_VALUE ); if ( generatedValueAnnotation != null ) { String name = JandexHelper.getValue( generatedValueAnnotation, "generator", String.class ); if ( StringHelper.isNotEmpty( name ) ) { generator = getContext().getMetadataImplementor().getIdGenerator( name ); if ( generator == null ) { throw new MappingException( String.format( "Unable to find named generator %s", name ), null ); } } else { GenerationType genType = JandexHelper.getEnumValue( generatedValueAnnotation, "strategy", GenerationType.class ); String strategy = EnumConversionHelper.generationTypeToGeneratorStrategyName( genType, getContext().getMetadataImplementor().getOptions().useNewIdentifierGenerators() ); generator = new IdGenerator( null, strategy, null ); } } return generator; }
@Id @SequenceGenerator(name = "ID_SEQ") @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "ID_SEQ") @Column(name = "ID", nullable = false) public Long getId() { return id; }
@TableGenerator( name="vendorPartGen", table="PERSISTENCE_ORDER_SEQUENCE_GENERATOR", pkColumnName="GEN_KEY", valueColumnName="GEN_VALUE", pkColumnValue="VENDOR_PART_ID", allocationSize=10) @Id @GeneratedValue(strategy=GenerationType.TABLE, generator="vendorPartGen") public Long getVendorPartNumber() { return vendorPartNumber; }
@Id @GeneratedValue(strategy = GenerationType.AUTO) //@GeneratedValue(strategy = GenerationType.AUTO, generator = "uuid-string") //@GeneratedValue(generator = "system-uuid") //@GenericGenerator(name = "system-uuid", strategy = "uuid") //@Column(length = 32) public Long getId() { return id; }
@Id @Column(name = "id") @GeneratedValue(strategy = GenerationType.AUTO) @Override public Long getId() { return id; }
@Id @GeneratedValue(strategy = GenerationType.TABLE, generator="gen_camp") @TableGenerator(name="gen_camp", table="hel_idgen", pkColumnName="taula", valueColumnName="valor") @Column(name="id") public Long getId() { return id; }
@Id @GeneratedValue(strategy = GenerationType.TABLE, generator="gen_registre") @TableGenerator(name="gen_registre", table="hel_idgen", pkColumnName="taula", valueColumnName="valor") @Column(name="id") public Long getId() { return id; }
@Id @GeneratedValue(strategy = GenerationType.TABLE, generator="gen_tasca") @TableGenerator(name="gen_tasca", table="hel_idgen", pkColumnName="taula", valueColumnName="valor") @Column(name="id") public Long getId() { return id; }
@Id @GeneratedValue(strategy = GenerationType.TABLE, generator="gen_termini") @TableGenerator(name="gen_termini", table="hel_idgen", pkColumnName="taula", valueColumnName="valor") @Column(name="id") public Long getId() { return id; }
@Id @GeneratedValue(strategy=GenerationType.IDENTITY) /*@GeneratedValue(strategy=GenerationType.SEQUENCE,generator="mseq") @SequenceGenerator(name="mseq",sequenceName="SEQ_RP_REPORT_SQL",allocationSize=1)*/ @Column(name="sql_id") public Long getSqlId() { return this.sqlId; }
@Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "id") public long getId() { if (this.idProperty == null) { return _id; } else { return idProperty.get(); } }
@Id @GeneratedValue(strategy = GenerationType.TABLE, generator="gen_area_membre") @TableGenerator(name="gen_area_membre", table="hel_idgen", pkColumnName="taula", valueColumnName="valor") @Column(name="id") public Long getId() { return id; }
@Id @GeneratedValue(strategy = GenerationType.TABLE, generator="gen_document_store") @TableGenerator(name="gen_document_store", table="hel_idgen", pkColumnName="taula", valueColumnName="valor") @Column(name="id") public Long getId() { return id; }
@Id @Column(name = "log_date_id", unique = true, nullable = false) @SequenceGenerator(name="log_date_id_seq",schema="version30",sequenceName="log_date_id_seq", allocationSize=1) @GeneratedValue(strategy=GenerationType.SEQUENCE,generator="log_date_id_seq") public int getLogDateId() { return this.logDateId; }
@Id @GeneratedValue(strategy = GenerationType.TABLE, generator="gen_entorn") @TableGenerator(name="gen_entorn", table="hel_idgen", pkColumnName="taula", valueColumnName="valor") @Column(name="id") public Long getId() { return id; }
@Id @GeneratedValue(strategy = GenerationType.TABLE, generator="gen_festiu") @TableGenerator(name="gen_festiu", table="hel_idgen", pkColumnName="taula", valueColumnName="valor") @Column(name="id") public Long getId() { return id; }
@Id @GeneratedValue(strategy = GenerationType.TABLE, generator="gen_expedient_tipus_seqany") @TableGenerator(name="gen_expedient_tipus_seqany", table="hel_idgen", pkColumnName="taula", valueColumnName="valor") @Column(name="id") public Long getId() { return id; }
@Id @GeneratedValue(strategy = GenerationType.TABLE, generator="gen_expedient_log") @TableGenerator(name="gen_expedient_log", table="hel_idgen", pkColumnName="taula", valueColumnName="valor") @Column(name="id") public Long getId() { return id; }
@Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = COLUMN_NAME__ID) public long getId() { if (this.idProperty == null) { return _id; } else { return idProperty.get(); } }
@Id @GeneratedValue(strategy = GenerationType.TABLE, generator="gen_estat") @TableGenerator(name="gen_estat", table="hel_idgen", pkColumnName="taula", valueColumnName="valor") @Column(name="id") public Long getId() { return id; }
@Id @GeneratedValue(strategy = GenerationType.TABLE, generator="gen_area_tipus") @TableGenerator(name="gen_area_tipus", table="hel_idgen", pkColumnName="taula", valueColumnName="valor") @Column(name="id") public Long getId() { return id; }
@Id @Column(name = "contributor_id", unique = true, nullable = false) @SequenceGenerator(name="contributor_id_seq",schema="version30",sequenceName="contributor_id_seq", allocationSize=1) @GeneratedValue(strategy=GenerationType.SEQUENCE,generator="contributor_id_seq") public int getContributorId() { return this.contributorId; }
@Id @GeneratedValue(strategy = GenerationType.TABLE, generator="gen_map_sistra") @TableGenerator(name="gen_map_sistra", table="hel_idgen", pkColumnName="taula", valueColumnName="valor") @Column(name="id") public Long getId() { return id; }
@Override @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Access(value = AccessType.PROPERTY) @Column(name = "occupation_nomination_id", nullable = false) public Long getId() { return this.id; }
@Id @GeneratedValue(strategy = GenerationType.TABLE, generator="gen_area_jbpmid") @TableGenerator(name="gen_area_jbpmid", table="hel_idgen", pkColumnName="taula", valueColumnName="valor") @Column(name="id") public Long getId() { return id; }
@Id @GeneratedValue(strategy = GenerationType.TABLE, generator="gen_expedient_tipus") @TableGenerator(name="gen_expedient_tipus", table="hel_idgen", pkColumnName="taula", valueColumnName="valor") @Column(name="id") public Long getId() { return id; }
@Id @GeneratedValue(strategy = GenerationType.TABLE, generator="gen_area") @TableGenerator(name="gen_area", table="hel_idgen", pkColumnName="taula", valueColumnName="valor") @Column(name="id") public Long getId() { return id; }
/** * @return the internalID */ @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column int getInternalID() { return internalID; }