public Object valueFromRow(AbstractRecord row, JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, CacheKey cacheKey, AbstractSession executionSession, boolean isTargetProtected, Boolean[] wasCacheUsed) throws DatabaseException { Object fieldValue = row.get(this.getField()); // BUG#2667762 there could be whitespace in the row instead of null if ((fieldValue == null) || (fieldValue instanceof String)) { return null; } XMLRecord nestedRow = (XMLRecord) this.getDescriptor().buildNestedRowFromFieldValue(fieldValue); // Check the policy to see if this DOM record represents null if (getNullPolicy().valueIsNull((Element) nestedRow.getDOM())) { return null; } return valueFromRow(fieldValue, nestedRow, joinManager, sourceQuery, executionSession, isTargetProtected); }
public Object valueFromRow(AbstractRecord row, JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, AbstractSession executionSession) throws DatabaseException { Object fieldValue = row.get(this.getField()); // BUG#2667762 there could be whitespace in the row instead of null if ((fieldValue == null) || (fieldValue instanceof String)) { return null; } XMLRecord nestedRow = (XMLRecord) this.getDescriptor().buildNestedRowFromFieldValue(fieldValue); // Check the policy to see if this DOM record represents null if (getNullPolicy().valueIsNull((Element) nestedRow.getDOM())) { return null; } return valueFromRow(fieldValue, nestedRow, joinManager, sourceQuery, executionSession); }
public Object valueFromRow(AbstractRecord row, JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, CacheKey cacheKey, AbstractSession executionSession, boolean isTargetProtected, Boolean[] wasCacheUsed) throws DatabaseException { Object fieldValue = row.get(this.getField()); // BUG#2667762 there could be whitespace in the row instead of null if ((fieldValue == null) || (fieldValue instanceof String)) { return null; } XMLRecord nestedRow = (XMLRecord) this.getDescriptor().buildNestedRowFromFieldValue(fieldValue); // Check the policy to see if this DOM record represents null if (getNullPolicy().valueIsNull((Element) nestedRow.getDOM())) { return null; } return valueFromRow(fieldValue, nestedRow, joinManager, sourceQuery, executionSession, isTargetProtected); }
if ((uri != null) && uri.length() > 0) { frag.setNamespaceURI(uri); String prefix = ((XMLDescriptor) getDescriptor()).getNonNullNamespaceResolver().resolveNamespaceURI(uri); if ((prefix != null) && prefix.length() > 0) { xpath = prefix + XMLConstants.COLON + xpath;
if ((uri != null) && uri.length() > 0) { frag.setNamespaceURI(uri); String prefix = ((XMLDescriptor) getDescriptor()).getNonNullNamespaceResolver().resolveNamespaceURI(uri); if ((prefix != null) && prefix.length() > 0) { xpath = prefix + XMLConstants.COLON + xpath;
if ((uri != null) && uri.length() > 0) { frag.setNamespaceURI(uri); String prefix = ((XMLDescriptor) getDescriptor()).getNonNullNamespaceResolver().resolveNamespaceURI(uri); if ((prefix != null) && prefix.length() > 0) { xpath = prefix + XMLConstants.COLON + xpath;
protected void initializeReferenceDescriptorAndField(AbstractSession session){ if (this.referenceClass != null) { super.initialize(session); } else { //below should be the same as AbstractCompositeObjectMapping.initialize if (this.field == null) { throw DescriptorException.fieldNameNotSetInMapping(this); } setField(getDescriptor().buildField(this.field)); setFields(collectFields()); // initialize the converter - if necessary if (hasConverter()) { getConverter().initialize(this, session); } } } /**
protected void initializeReferenceDescriptorAndField(AbstractSession session){ if (this.referenceClass != null) { super.initialize(session); } else { //below should be the same as AbstractCompositeObjectMapping.initialize if (this.field == null) { throw DescriptorException.fieldNameNotSetInMapping(this); } setField(getDescriptor().buildField(this.field)); setFields(collectFields()); // initialize the converter - if necessary if (hasConverter()) { getConverter().initialize(this, session); } } } /**
ClassDescriptor jaxbDescriptor = project.getDescriptorForAlias(jpaMapping.getDescriptor().getAlias()); if (jaxbDescriptor != null) { Class clazz = jpaMapping.getReferenceClass();
ClassDescriptor jaxbDescriptor = project.getDescriptorForAlias(jpaMapping.getDescriptor().getAlias()); if (jaxbDescriptor != null) { Class clazz = jpaMapping.getReferenceClass();
if (uri != null && uri.length() > 0) { frag.setNamespaceURI(uri); String prefix = ((XMLDescriptor)xmlCompositeObjectMapping.getDescriptor()).getNonNullNamespaceResolver().resolveNamespaceURI(uri); if (prefix != null && prefix.length() > 0) { xpath = prefix + XMLConstants.COLON + xpath;
/** * INTERNAL: * The mapping is initialized with the given session. This mapping is fully initialized * after this. */ public void initialize(AbstractSession session) throws DescriptorException { //modified so that reference class on composite mappings is no longer mandatory if ((getReferenceClass() == null) && (getReferenceClassName() != null)) { setReferenceClass(session.getDatasourcePlatform().getConversionManager().convertClassNameToClass(getReferenceClassName())); } if (getReferenceClass() != null) { super.initialize(session); } else { //below should be the same as AbstractCompositeObjectMapping.initialize if (getField() == null) { throw DescriptorException.fieldNameNotSetInMapping(this); } setField(getDescriptor().buildField(getField())); setFields(collectFields()); // initialize the converter - if necessary if (hasConverter()) { getConverter().initialize(this, session); } } if(null != getContainerAccessor()) { getContainerAccessor().initializeAttributes(this.referenceClass); } }
XMLRecord nestedRow = (XMLRecord) this.getDescriptor().buildNestedRowFromFieldValue(fieldValue);
XMLRecord nestedRow = (XMLRecord) this.getDescriptor().buildNestedRowFromFieldValue(fieldValue);
XMLRecord nestedRow = (XMLRecord) this.getDescriptor().buildNestedRowFromFieldValue(fieldValue);