[OLINGO-573] Minor clean up after merge with master
This commit is contained in:
parent
3f79ced17a
commit
7119be1f26
|
@ -565,10 +565,6 @@ public class DataCreator {
|
|||
return new PropertyImpl(null, name, ValueType.COLLECTION_PRIMITIVE, Arrays.asList(values));
|
||||
}
|
||||
|
||||
protected static Property createComplex(final String name, String type, final Property... properties) {
|
||||
return createComplex(name, properties);
|
||||
}
|
||||
|
||||
protected static Property createComplex(final String name, final Property... properties) {
|
||||
ComplexValue complexValue = new ComplexValueImpl();
|
||||
for (final Property property : properties) {
|
||||
|
@ -577,11 +573,6 @@ public class DataCreator {
|
|||
return new PropertyImpl(null, name, ValueType.COMPLEX, complexValue);
|
||||
}
|
||||
|
||||
protected static Property createComplexCollection(final String name, String type, final List<Property>...
|
||||
propertiesList) {
|
||||
return createComplexCollection(name, propertiesList);
|
||||
}
|
||||
|
||||
protected static Property createComplexCollection(final String name, final List<Property>... propertiesList) {
|
||||
List<ComplexValue> complexCollection = new ArrayList<ComplexValue>();
|
||||
for (final List<Property> properties : propertiesList) {
|
||||
|
|
|
@ -217,12 +217,10 @@ public class DataProvider {
|
|||
} else {
|
||||
if (edmProperty.isCollection()) {
|
||||
@SuppressWarnings("unchecked")
|
||||
Property newProperty2 = DataCreator.createComplexCollection(propertyName, edmProperty
|
||||
.getType().getFullQualifiedName().getFullQualifiedNameAsString());
|
||||
Property newProperty2 = DataCreator.createComplexCollection(propertyName);
|
||||
newProperty = newProperty2;
|
||||
} else {
|
||||
newProperty = DataCreator.createComplex(propertyName, edmProperty.getType()
|
||||
.getFullQualifiedName().getFullQualifiedNameAsString());
|
||||
newProperty = DataCreator.createComplex(propertyName);
|
||||
createProperties((EdmComplexType) edmProperty.getType(), newProperty.asComplex().getValue());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,7 +31,6 @@ import org.apache.olingo.commons.core.data.EntitySetImpl;
|
|||
import org.apache.olingo.commons.core.edm.primitivetype.EdmPrimitiveTypeFactory;
|
||||
import org.apache.olingo.server.api.uri.UriParameter;
|
||||
import org.apache.olingo.server.tecsvc.data.DataProvider.DataProviderException;
|
||||
import org.apache.olingo.server.tecsvc.provider.ComplexTypeProvider;
|
||||
|
||||
public class FunctionData {
|
||||
|
||||
|
@ -81,12 +80,12 @@ public class FunctionData {
|
|||
} else if (name.equals("UFCRTCollString")) {
|
||||
return data.get("ESCollAllPrim").getEntities().get(0).getProperty("CollPropertyString");
|
||||
} else if (name.equals("UFCRTCTTwoPrim")) {
|
||||
return DataCreator.createComplex(name, ComplexTypeProvider.nameCTTwoPrim.getFullQualifiedNameAsString(),
|
||||
return DataCreator.createComplex(name,
|
||||
DataCreator.createPrimitive("PropertyInt16", 16),
|
||||
DataCreator.createPrimitive("PropertyString", "UFCRTCTTwoPrim string value"));
|
||||
} else if (name.equals("UFCRTCTTwoPrimParam")) {
|
||||
try {
|
||||
return DataCreator.createComplex(name,ComplexTypeProvider.nameCTTwoPrim.getFullQualifiedNameAsString(),
|
||||
return DataCreator.createComplex(name,
|
||||
DataCreator.createPrimitive("PropertyInt16",
|
||||
EdmPrimitiveTypeFactory.getInstance(EdmPrimitiveTypeKind.Int16).valueOfString(
|
||||
getParameterText("ParameterInt16", parameters),
|
||||
|
@ -100,7 +99,7 @@ public class FunctionData {
|
|||
throw new DataProviderException("Error in function " + name + ".", e);
|
||||
}
|
||||
} else if (name.equals("UFCRTCollCTTwoPrim")) {
|
||||
return DataCreator.createComplexCollection(name,ComplexTypeProvider.nameCTTwoPrim.getFullQualifiedNameAsString(),
|
||||
return DataCreator.createComplexCollection(name,
|
||||
Arrays.asList(DataCreator.createPrimitive("PropertyInt16", 16),
|
||||
DataCreator.createPrimitive("PropertyString", "Test123")),
|
||||
Arrays.asList(DataCreator.createPrimitive("PropertyInt16", 17),
|
||||
|
|
Loading…
Reference in New Issue