public int getPropertyIndex(String propertyName) { return getMappings().indexOf(getMapping(propertyName)); }
@Override public Class<?> getPropertyType(String propertyName) { return getMapping(propertyName).getAttributeClassification(); }
public Class<?> getPropertyType(int propertyIndex) { return getMapping(propertyIndex).getAttributeClassification(); }
public Class<?> getPropertyType(String propertyName) { return getMapping(propertyName).getAttributeClassification(); }
public Class<?> getPropertyType(String propertyName) { return getMapping(propertyName).getAttributeClassification(); }
public String get(int index) { return DynamicTypeImpl.this.getMapping(index).getAttributeName(); }
public boolean isSet(String propertyName) { return isSet(getType().getMapping(propertyName)); }
public DynamicEntity set(String propertyName, Object value) { DatabaseMapping mapping = getType().getMapping(propertyName); checkSetType(mapping, value); Object currentValue = mapping.getAttributeValueFromObject(this); if (currentValue instanceof ValueHolderInterface) { ((ValueHolderInterface) currentValue).setValue(value); } else { mapping.setAttributeValueInObject(this, value); } return this; }
DatabaseMapping mapping = getMapping(propertyName); if (value == null) { if (mapping.isCollectionMapping() ||
DatabaseMapping mapping = getMapping(propertyName); if (value == null) { if (mapping.isCollectionMapping() ||
@SuppressWarnings("unchecked") public <T> T get(String propertyName) { DatabaseMapping mapping = getType().getMapping(propertyName); Object value = mapping.getAttributeValueFromObject(this); if (mapping.isForeignReferenceMapping() && mapping.isLazy()) { // Force basic indirection to be instantiated if (value instanceof ValueHolderInterface) { value = ((ValueHolderInterface) value).getValue(); } // Force transparent indirection to be instantiated if (value instanceof IndirectContainer) { ((IndirectContainer) value).getValueHolder().getValue(); } } try { return (T) value; } catch (ClassCastException cce) { throw DynamicException.invalidGetPropertyType(mapping, cce); } }