public SequenceMetadata setDatastoreSequence(String seq) { getInternal().setDatastoreSequence(seq); return this; }
/** * Process a @SequenceGenerator annotation. * @param pmd Package MetaData to add the sequence to * @param annotationValues The annotation info */ private void processSequenceGeneratorAnnotation(PackageMetaData pmd, HashMap<String, Object> annotationValues) { // Sequence generator, so store it against the package that we are under String name = (String)annotationValues.get("name"); String seqName = (String)annotationValues.get("sequenceName"); if (StringUtils.isWhitespace(seqName)) { seqName = name; // Fallback to the name of the sequence definition } Integer initialValue = (Integer)annotationValues.get("initialValue"); if (initialValue == null) { initialValue = Integer.valueOf(1); // JPA default } Integer allocationSize = (Integer)annotationValues.get("allocationSize"); if (allocationSize == null) { allocationSize = Integer.valueOf(50); // JPA default } SequenceMetaData seqmd = pmd.newSequenceMetadata(name, null); seqmd.setDatastoreSequence(seqName); seqmd.setInitialValue(initialValue.intValue()); seqmd.setAllocationSize(allocationSize.intValue()); }
seqmd.setDatastoreSequence(seqSeq); if (seqSize != null)
seqmd.setDatastoreSequence(datastoreSeqName); seqmd.setInitialValue(initValue); seqmd.setAllocationSize(allocSize);
SequenceMetaData seqmd = pmd.newSequenceMetadata(getAttr(attrs, "name"), getAttr(attrs, "strategy")); seqmd.setFactoryClass(getAttr(attrs, "factory-class")); seqmd.setDatastoreSequence(getAttr(attrs, "datastore-sequence")); String seqSize = getAttr(attrs, "allocation-size"); if (seqSize != null)