/** * INTERNAL: * Used during initialization of DirectMapMapping. Sets the descriptor associated with * the key. */ public void setDescriptorForKeyMapping(ClassDescriptor descriptor){ ((DatabaseMapping)keyMapping).setDescriptor(descriptor); }
/** * INTERNAL: * Used during initialization of DirectMapMapping. Sets the descriptor associated with * the key. */ public void setDescriptorForKeyMapping(ClassDescriptor descriptor){ ((DatabaseMapping)keyMapping).setDescriptor(descriptor); }
/** * INTERNAL: * Used during initialization of DirectMapMapping. Sets the descriptor associated with * the key * @param descriptor */ public void setDescriptorForKeyMapping(ClassDescriptor descriptor){ ((DatabaseMapping)keyMapping).setDescriptor(descriptor); }
/** * INTERNAL: * Set the mappings. */ public void setMappings(Vector<DatabaseMapping> mappings) { // This is used from XML reader so must ensure that all mapping's descriptor has been set. for (Enumeration mappingsEnum = mappings.elements(); mappingsEnum.hasMoreElements();) { DatabaseMapping mapping = (DatabaseMapping)mappingsEnum.nextElement(); // For CR#2646, if the mapping already points to the parent descriptor then leave it. if (mapping.getDescriptor() == null) { mapping.setDescriptor(this); } } this.mappings = mappings; }
/** * INTERNAL: * Set the mappings. */ public void setMappings(Vector<DatabaseMapping> mappings) { // This is used from XML reader so must ensure that all mapping's descriptor has been set. for (Enumeration mappingsEnum = mappings.elements(); mappingsEnum.hasMoreElements();) { DatabaseMapping mapping = (DatabaseMapping)mappingsEnum.nextElement(); // For CR#2646, if the mapping already points to the parent descriptor then leave it. if (mapping.getDescriptor() == null) { mapping.setDescriptor(this); } } this.mappings = mappings; }
/** * INTERNAL: * Set the mappings. */ public void setMappings(Vector<DatabaseMapping> mappings) { // This is used from XML reader so must ensure that all mapping's descriptor has been set. for (Enumeration mappingsEnum = mappings.elements(); mappingsEnum.hasMoreElements();) { DatabaseMapping mapping = (DatabaseMapping)mappingsEnum.nextElement(); // For CR#2646, if the mapping already points to the parent descriptor then leave it. if (mapping.getDescriptor() == null) { mapping.setDescriptor(this); } } this.mappings = mappings; }
/** * PUBLIC: * Add a database mapping to the receiver. Perform any required * initialization of both the mapping and the receiving descriptor * as a result of adding the new mapping. */ public DatabaseMapping addMapping(DatabaseMapping mapping) { // For CR#2646, if the mapping already points to the parent descriptor then leave it. if (mapping.getDescriptor() == null) { mapping.setDescriptor(this); } getMappings().add(mapping); return mapping; }
/** * PUBLIC: * Add a database mapping to the receiver. Perform any required * initialization of both the mapping and the receiving descriptor * as a result of adding the new mapping. */ public DatabaseMapping addMapping(DatabaseMapping mapping) { // For CR#2646, if the mapping already points to the parent descriptor then leave it. if (mapping.getDescriptor() == null) { mapping.setDescriptor(this); } getMappings().add(mapping); return mapping; }
/** * PUBLIC: * Add a database mapping to the receiver. Perform any required * initialization of both the mapping and the receiving descriptor * as a result of adding the new mapping. */ public DatabaseMapping addMapping(DatabaseMapping mapping) { // For CR#2646, if the mapping already points to the parent descriptor then leave it. if (mapping.getDescriptor() == null) { mapping.setDescriptor(this); } getMappings().addElement(mapping); return mapping; }
public void preInitialize(AbstractSession session){ super.preInitialize(session); if(inlineMapping != null){ inlineMapping.setDescriptor(this.descriptor); inlineMapping.preInitialize(session); } }
public void preInitialize(AbstractSession session){ super.preInitialize(session); if(inlineMapping != null){ inlineMapping.setDescriptor(this.descriptor); inlineMapping.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); 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); } }
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.setAttributeName(this.getAttributeName()); if(nextMapping.getAttributeAccessor() == temporaryAccessor){ nextMapping.setAttributeAccessor(getAttributeAccessor()); } nextMapping.setDescriptor(getDescriptor()); nextMapping.preInitialize(session); } }
((XMLMapping)nextMapping).setIsWriteOnly(this.isWriteOnly()); nextMapping.setDescriptor(getDescriptor());
((XMLMapping)nextMapping).setIsWriteOnly(this.isWriteOnly()); nextMapping.setDescriptor(getDescriptor());
xmlMapping.setDescriptor(containingDescriptor); XMLMapping mapping = (XMLMapping)getContainingType().getXmlDescriptor().getMappingForAttributeName(getName()); if (mapping != null) {
xmlMapping.setDescriptor(containingDescriptor); XMLMapping mapping = (XMLMapping)getContainingType().getXmlDescriptor().getMappingForAttributeName(getName()); if (mapping != null) {
mapping.setDescriptor(clonedDescriptor); mappingsVector.addElement(mapping);