public void preInitialize(AbstractSession session) throws DescriptorException { getAttributeAccessor().setIsWriteOnly(this.isWriteOnly()); getAttributeAccessor().setIsReadOnly(this.isReadOnly()); super.preInitialize(session); } }
public Object clone() { // Bug 3037701 - clone the AttributeAccessor XMLAnyCollectionMapping mapping = null; mapping = (XMLAnyCollectionMapping) super.clone(); mapping.setContainerPolicy(this.getContainerPolicy()); mapping.setField(this.getField()); return mapping; }
protected XMLDescriptor getDescriptor(XMLRecord xmlRecord, AbstractSession session, QName rootQName) throws XMLMarshalException { if (rootQName == null) { rootQName = new QName(xmlRecord.getNamespaceURI(), xmlRecord.getLocalName()); } XMLContext xmlContext = xmlRecord.getUnmarshaller().getXMLContext(); XMLDescriptor xmlDescriptor = xmlContext.getDescriptor(rootQName); if (null == xmlDescriptor) { if (!(getKeepAsElementPolicy() == UnmarshalKeepAsElementPolicy.KEEP_UNKNOWN_AS_ELEMENT || getKeepAsElementPolicy() == UnmarshalKeepAsElementPolicy.KEEP_ALL_AS_ELEMENT)) { throw XMLMarshalException.noDescriptorWithMatchingRootElement(xmlRecord.getLocalName()); } } return xmlDescriptor; }
public void setAttributeValueInObject(Object object, Object value) throws DescriptorException { if(isWriteOnly()) { return; } super.setAttributeValueInObject(object, value); }
public Object clone() { // Bug 3037701 - clone the AttributeAccessor XMLAnyCollectionMapping mapping = null; mapping = (XMLAnyCollectionMapping) super.clone(); mapping.setContainerPolicy(this.getContainerPolicy()); mapping.setField(this.getField()); return mapping; }
protected XMLDescriptor getDescriptor(XMLRecord xmlRecord, AbstractSession session, QName rootQName) throws XMLMarshalException { if (rootQName == null) { rootQName = new QName(xmlRecord.getNamespaceURI(), xmlRecord.getLocalName()); } XMLContext xmlContext = xmlRecord.getUnmarshaller().getXMLContext(); XMLDescriptor xmlDescriptor = xmlContext.getDescriptor(rootQName); if (null == xmlDescriptor) { if (!(getKeepAsElementPolicy() == UnmarshalKeepAsElementPolicy.KEEP_UNKNOWN_AS_ELEMENT || getKeepAsElementPolicy() == UnmarshalKeepAsElementPolicy.KEEP_ALL_AS_ELEMENT)) { throw XMLMarshalException.noDescriptorWithMatchingRootElement(xmlRecord.getLocalName()); } } return xmlDescriptor; }
public void setAttributeValueInObject(Object object, Object value) throws DescriptorException { if(isWriteOnly()) { return; } super.setAttributeValueInObject(object, value); }
public void preInitialize(AbstractSession session) throws DescriptorException { getAttributeAccessor().setIsWriteOnly(this.isWriteOnly()); getAttributeAccessor().setIsReadOnly(this.isReadOnly()); super.preInitialize(session); } }
public Object clone() { // Bug 3037701 - clone the AttributeAccessor XMLAnyCollectionMapping mapping = null; mapping = (XMLAnyCollectionMapping) super.clone(); mapping.setContainerPolicy(this.getContainerPolicy()); mapping.setField(this.getField()); return mapping; }
protected XMLDescriptor getDescriptor(XMLRecord xmlRecord, AbstractSession session, QName rootQName) throws XMLMarshalException { if (rootQName == null) { rootQName = new QName(xmlRecord.getNamespaceURI(), xmlRecord.getLocalName()); } XMLContext xmlContext = xmlRecord.getUnmarshaller().getXMLContext(); XMLDescriptor xmlDescriptor = xmlContext.getDescriptor(rootQName); if (null == xmlDescriptor) { if (!(getKeepAsElementPolicy() == UnmarshalKeepAsElementPolicy.KEEP_UNKNOWN_AS_ELEMENT || getKeepAsElementPolicy() == UnmarshalKeepAsElementPolicy.KEEP_ALL_AS_ELEMENT)) { throw XMLMarshalException.noDescriptorWithMatchingRootElement(xmlRecord.getLocalName()); } } return xmlDescriptor; }
public void setAttributeValueInObject(Object object, Object value) throws DescriptorException { if(isWriteOnly()) { return; } super.setAttributeValueInObject(object, value); }
public void preInitialize(AbstractSession session) throws DescriptorException { getAttributeAccessor().setIsWriteOnly(this.isWriteOnly()); getAttributeAccessor().setIsReadOnly(this.isReadOnly()); super.preInitialize(session); }
public Object clone() { // Bug 3037701 - clone the AttributeAccessor XMLAnyCollectionMapping mapping = null; mapping = (XMLAnyCollectionMapping) super.clone(); mapping.setContainerPolicy(this.getContainerPolicy()); mapping.setField(this.getField()); return mapping; }
protected Object buildObjectForNonXMLRoot(ClassDescriptor referenceDescriptor, XMLConverter converter, ObjectBuildingQuery query, DOMRecord record, DOMRecord nestedRecord, JoinedAttributeManager joinManager, AbstractSession session, Node next, Object container, ContainerPolicy containerPolicy) { Object objectValue = null; if ((referenceDescriptor != null) && (getKeepAsElementPolicy() != UnmarshalKeepAsElementPolicy.KEEP_ALL_AS_ELEMENT)) { ObjectBuilder builder = referenceDescriptor.getObjectBuilder(); objectValue = builder.buildObject(query, nestedRecord, joinManager); if (converter != null) { objectValue = converter.convertDataValueToObjectValue(objectValue, session, record.getUnmarshaller()); } if (containerPolicy != null) { containerPolicy.addInto(objectValue, container, session); } } else { if ((getKeepAsElementPolicy() == UnmarshalKeepAsElementPolicy.KEEP_UNKNOWN_AS_ELEMENT) || (getKeepAsElementPolicy() == UnmarshalKeepAsElementPolicy.KEEP_ALL_AS_ELEMENT)) { XMLPlatformFactory.getInstance().getXMLPlatform().namespaceQualifyFragment((Element) next); objectValue = next; if (converter != null) { objectValue = converter.convertDataValueToObjectValue(objectValue, session, record.getUnmarshaller()); } if (containerPolicy != null) { containerPolicy.addInto(objectValue, container, session); } } } return objectValue; }
public Object clone() { // Bug 3037701 - clone the AttributeAccessor XMLAnyCollectionMapping mapping = null; mapping = (XMLAnyCollectionMapping) super.clone(); mapping.setContainerPolicy(this.getContainerPolicy()); mapping.setField(this.getField()); return mapping; }
protected Object buildObjectForNonXMLRoot(ClassDescriptor referenceDescriptor, XMLConverter converter, ObjectBuildingQuery query, DOMRecord record, DOMRecord nestedRecord, JoinedAttributeManager joinManager, AbstractSession session, Node next, Object container, ContainerPolicy containerPolicy) { Object objectValue = null; if ((referenceDescriptor != null) && (getKeepAsElementPolicy() != UnmarshalKeepAsElementPolicy.KEEP_ALL_AS_ELEMENT)) { ObjectBuilder builder = referenceDescriptor.getObjectBuilder(); objectValue = builder.buildObject(query, nestedRecord, joinManager); if (converter != null) { objectValue = converter.convertDataValueToObjectValue(objectValue, session, record.getUnmarshaller()); } if (containerPolicy != null) { containerPolicy.addInto(objectValue, container, session); } } else { if ((getKeepAsElementPolicy() == UnmarshalKeepAsElementPolicy.KEEP_UNKNOWN_AS_ELEMENT) || (getKeepAsElementPolicy() == UnmarshalKeepAsElementPolicy.KEEP_ALL_AS_ELEMENT)) { XMLPlatformFactory.getInstance().getXMLPlatform().namespaceQualifyFragment((Element) next); objectValue = next; if (converter != null) { objectValue = converter.convertDataValueToObjectValue(objectValue, session, record.getUnmarshaller()); } if (containerPolicy != null) { containerPolicy.addInto(objectValue, container, session); } } } return objectValue; }
public Object clone() { // Bug 3037701 - clone the AttributeAccessor XMLAnyCollectionMapping mapping = null; mapping = (XMLAnyCollectionMapping) super.clone(); mapping.setContainerPolicy(this.getContainerPolicy()); mapping.setField(this.getField()); return mapping; }
protected Object buildObjectForNonXMLRoot(ClassDescriptor referenceDescriptor, XMLConverter converter, ObjectBuildingQuery query, DOMRecord record, DOMRecord nestedRecord, JoinedAttributeManager joinManager, AbstractSession session, Node next, Object container, ContainerPolicy containerPolicy) { Object objectValue = null; if ((referenceDescriptor != null) && (getKeepAsElementPolicy() != UnmarshalKeepAsElementPolicy.KEEP_ALL_AS_ELEMENT)) { ObjectBuilder builder = referenceDescriptor.getObjectBuilder(); objectValue = builder.buildObject(query, nestedRecord, joinManager); if (converter != null) { objectValue = converter.convertDataValueToObjectValue(objectValue, session, record.getUnmarshaller()); } if (containerPolicy != null) { containerPolicy.addInto(objectValue, container, session); } } else { if ((getKeepAsElementPolicy() == UnmarshalKeepAsElementPolicy.KEEP_UNKNOWN_AS_ELEMENT) || (getKeepAsElementPolicy() == UnmarshalKeepAsElementPolicy.KEEP_ALL_AS_ELEMENT)) { XMLPlatformFactory.getInstance().getXMLPlatform().namespaceQualifyFragment((Element) next); objectValue = next; if (converter != null) { objectValue = converter.convertDataValueToObjectValue(objectValue, session, record.getUnmarshaller()); } if (containerPolicy != null) { containerPolicy.addInto(objectValue, container, session); } } } return objectValue; }