Skip to content

Commit

Permalink
Support "schema" / "catalog" of SequenceGenerator /
Browse files Browse the repository at this point in the history
<sequence-generator>. Fixes #72
  • Loading branch information
andyjefferson committed Feb 28, 2017
1 parent 51036ca commit f2ebfe3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
Expand Up @@ -3504,6 +3504,17 @@ private void processSequenceGeneratorAnnotation(PackageMetaData pmd, Map<String,
seqmd.setDatastoreSequence(seqName);
seqmd.setInitialValue(initialValue.intValue());
seqmd.setAllocationSize(allocationSize.intValue());

String catalogName = (String)annotationValues.get("catalog");
if (!StringUtils.isWhitespace(catalogName))
{
seqmd.setCatalogName(catalogName);
}
String schemaName = (String)annotationValues.get("schema");
if (!StringUtils.isWhitespace(schemaName))
{
seqmd.setSchemaName(schemaName);
}
}

/**
Expand Down
Expand Up @@ -558,6 +558,16 @@ else if (localName.equals("sequence-generator"))
seqmd.setDatastoreSequence(datastoreSeqName);
seqmd.setInitialValue(initValue);
seqmd.setAllocationSize(allocSize);
String catalogName = getAttr(attrs, "catalog");
if (StringUtils.isWhitespace(catalogName))
{
seqmd.setCatalogName(catalogName);
}
String schemaName = getAttr(attrs, "schema");
if (StringUtils.isWhitespace(schemaName))
{
seqmd.setSchemaName(schemaName);
}
}
else if (localName.equals("table-generator"))
{
Expand Down

0 comments on commit f2ebfe3

Please sign in to comment.