public void preInitialize(AbstractSession session) throws DescriptorException { getAttributeAccessor().setIsWriteOnly(this.isWriteOnly()); getAttributeAccessor().setIsReadOnly(this.isReadOnly()); super.preInitialize(session); ArrayList<XMLMapping> mappingsList = new ArrayList<XMLMapping>(); mappingsList.addAll(getChoiceElementMappings().values()); for(XMLMapping next:getChoiceElementMappingsByClass().values()) { if(!(mappingsList.contains(next))) { mappingsList.add(next); } } for(XMLMapping next:getChoiceElementMappingsByClass().values()) { if(!(mappingsList.contains(next))) { mappingsList.add(next); } } Iterator<XMLMapping> mappings = mappingsList.iterator(); while(mappings.hasNext()){ DatabaseMapping nextMapping = (DatabaseMapping)mappings.next(); nextMapping.setDescriptor(getDescriptor()); nextMapping.setAttributeName(this.getAttributeName()); if(nextMapping.getAttributeAccessor() == temporaryAccessor){ nextMapping.setAttributeAccessor(getAttributeAccessor()); } nextMapping.preInitialize(session); } }
public void preInitialize(AbstractSession session) throws DescriptorException { getAttributeAccessor().setIsWriteOnly(this.isWriteOnly()); getAttributeAccessor().setIsReadOnly(this.isReadOnly()); super.preInitialize(session); ArrayList<XMLMapping> mappingsList = new ArrayList<XMLMapping>(); mappingsList.addAll(getChoiceElementMappings().values()); for(XMLMapping next:getChoiceElementMappingsByClass().values()) { if(!(mappingsList.contains(next))) { mappingsList.add(next); } } for(XMLMapping next:getChoiceElementMappingsByClass().values()) { if(!(mappingsList.contains(next))) { mappingsList.add(next); } } Iterator<XMLMapping> mappings = mappingsList.iterator(); while(mappings.hasNext()){ DatabaseMapping nextMapping = (DatabaseMapping)mappings.next(); nextMapping.setDescriptor(getDescriptor()); nextMapping.setAttributeName(this.getAttributeName()); if(nextMapping.getAttributeAccessor() == temporaryAccessor){ nextMapping.setAttributeAccessor(getAttributeAccessor()); } nextMapping.preInitialize(session); } }
public void preInitialize(AbstractSession session) throws DescriptorException { getAttributeAccessor().setIsWriteOnly(this.isWriteOnly()); getAttributeAccessor().setIsReadOnly(this.isReadOnly()); super.preInitialize(session); Iterator<XMLMapping> mappings = getChoiceElementMappings().values().iterator(); while(mappings.hasNext()){ DatabaseMapping nextMapping = (DatabaseMapping)mappings.next(); nextMapping.setDescriptor(getDescriptor()); nextMapping.setAttributeName(this.getAttributeName()); if(nextMapping.getAttributeAccessor() == temporaryAccessor){ nextMapping.setAttributeAccessor(getAttributeAccessor()); } nextMapping.preInitialize(session); } }