Skip to content
Snippets Groups Projects
Commit 61f80592 authored by buczekp's avatar buczekp
Browse files

[LMS-1845] don't add dynamic properties to adaptor;

ignore property type code case;

SVN: 18436
parent f0ee4cac
No related branches found
No related tags found
No related merge requests found
...@@ -45,6 +45,11 @@ public class AbstractEntityAdaptor implements IEntityAdaptor ...@@ -45,6 +45,11 @@ public class AbstractEntityAdaptor implements IEntityAdaptor
{ {
for (EntityPropertyPE property : propertiesHolder.getProperties()) for (EntityPropertyPE property : propertiesHolder.getProperties())
{ {
if (property.getEntityTypePropertyType().isDynamic())
{
// values of dynamic properties can't be referred to - it wouldn't be deterministic
continue;
}
final PropertyTypePE propertyType = final PropertyTypePE propertyType =
property.getEntityTypePropertyType().getPropertyType(); property.getEntityTypePropertyType().getPropertyType();
final String propertyTypeCode = propertyType.getCode(); final String propertyTypeCode = propertyType.getCode();
...@@ -82,7 +87,7 @@ public class AbstractEntityAdaptor implements IEntityAdaptor ...@@ -82,7 +87,7 @@ public class AbstractEntityAdaptor implements IEntityAdaptor
public IEntityPropertyAdaptor property(String propertyTypeCode) public IEntityPropertyAdaptor property(String propertyTypeCode)
{ {
return propertiesByCode.get(propertyTypeCode); return propertiesByCode.get(propertyTypeCode.toUpperCase());
} }
public String propertyValue(String propertyTypeCode) public String propertyValue(String propertyTypeCode)
......
...@@ -38,10 +38,10 @@ public class BasicConstant ...@@ -38,10 +38,10 @@ public class BasicConstant
/** Prefix of internal namespace vocabulary code. */ /** Prefix of internal namespace vocabulary code. */
public static final String INTERNAL_NAMESPACE_PREFIX = "$"; public static final String INTERNAL_NAMESPACE_PREFIX = "$";
private static final int UNI_REPLACEMENT_CHAR = 0xFFFD; private static final char UNI_REPLACEMENT_CHAR = 0xFFFD;
/** Prefix of property value that contains error message. */ /** Prefix of property value that contains error message. */
public static final String ERROR_PROPERTY_PREFIX = "" + (char) UNI_REPLACEMENT_CHAR; public static final String ERROR_PROPERTY_PREFIX = "" + UNI_REPLACEMENT_CHAR;
// placeholder // placeholder
/** Prefix of property value that contains error message. */ /** Prefix of property value that contains error message. */
......
...@@ -52,9 +52,9 @@ public class DynamicPropertyCalculatorTest extends AssertJUnit ...@@ -52,9 +52,9 @@ public class DynamicPropertyCalculatorTest extends AssertJUnit
final String entityCode = "ecode"; final String entityCode = "ecode";
IEntityPropertyAdaptor p1 = createProperty("p1", "v1"); IEntityPropertyAdaptor p1 = createProperty("P1", "v1");
IEntityPropertyAdaptor p21 = createProperty("p2", "v21"); IEntityPropertyAdaptor p21 = createProperty("P2", "v21");
IEntityPropertyAdaptor p22 = createProperty("p2", "v22"); IEntityPropertyAdaptor p22 = createProperty("P2", "v22");
calculator.setEntity(createEntity(entityCode, null)); calculator.setEntity(createEntity(entityCode, null));
assertEquals("", calculator.evalAsString()); assertEquals("", calculator.evalAsString());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment