@Override public OProperty setCustom(final String iName, final String iValue) { delegate.setCustom(iName, iValue); return this; }
@Override protected void setValue(OProperty object, String param, String value) { object.setCustom(param, value); }
@Override protected void setValue(OProperty object, String param, String value) { object.setCustom(param, value); }
public OrientVertexProperty setOrdered(final boolean iOrdered) { delegate.setCustom(ORDERED, Boolean.toString(iOrdered)); return this; } }
@Override protected void addCustom(String key, String value) { getModelObject().setCustom(key, value); }
public <V> void setValue(OProperty property, V value) { if(OProperty.class.isAssignableFrom(javaClass) && value instanceof OProperty) { OProperty valueProperty = (OProperty)value; boolean fullNameRequired = !Objects.equals(property.getOwnerClass(), valueProperty.getOwnerClass()); property.setCustom(name, fullNameRequired?valueProperty.getFullName():valueProperty.getName()); } else { if(defaultValue!=null && defaultValue.equals(value)) value = null; String stringValue = value!=null?value.toString():null; if(stringValue!=null && stringValue.length()==0) stringValue=null; if(encode) stringValue = encodeCustomValue(stringValue); property.setCustom(name, stringValue); } }
Object oldValue = property.getCustom(customName); Object finalValue = customPropertyValue.execute((OIdentifiable) null, ctx); property.setCustom(customName, finalValue == null ? null : "" + finalValue);
newProperty.setType(OType.STRING); assertEquals(OType.STRING, newProperty.getType()); newProperty.setCustom("myCustom", "myCustomValue"); assertEquals("myCustomValue", newProperty.getCustom("myCustom")); assertTrue(newProperty.compareTo(toCompare)<0);