OPENJPA-1115 Wrap non-null sequence property values so they are processed as a single property value.

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@830338 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jeremy Bauer 2009-10-27 21:02:34 +00:00
parent 71f9f409c0
commit ad1029fde4

View File

@ -344,12 +344,23 @@ public class SequenceMetaData
* Add standard properties to the given properties buffer.
*/
protected void addStandardProperties(StringBuffer props) {
appendProperty(props, PROP_SEQUENCE, "\"" + _sequence + "\"");
appendProperty(props, PROP_SEQUENCE, wrapValue(_sequence));
appendProperty(props, PROP_INITIAL_VALUE, _initial);
appendProperty(props, PROP_ALLOCATE, _allocate);
appendProperty(props, PROP_INCREMENT, _increment);
appendProperty(props, PROP_SCHEMA, "\"" + _schema + "\"");
appendProperty(props, PROP_CATALOG, "\"" + _catalog + "\"");
appendProperty(props, PROP_SCHEMA, wrapValue(_schema));
appendProperty(props, PROP_CATALOG, wrapValue(_catalog));
}
/**
* Wraps property values that may contain spaces or other special characters
* in double quotes so they are processed as a single valued argument.
*/
protected String wrapValue(String value) {
if (value != null) {
return "\"" + value + "\"";
}
return value;
}
/**