public String getAttributeName() { return oxmAccessor.getAttributeName(); } }
/** * Allow any initialization to be performed with the descriptor class. */ public void initializeAttributes(Class descriptorClass) throws DescriptorException { if (getAttributeName() == null) { throw DescriptorException.attributeNameNotSpecified(); } }
/** * Gets the name of the backpointer attribute on the target object. Used to * populate the backpointer. */ public String getBidirectionalTargetAttributeName() { if(this.bidirectionalTargetAccessor == null) { return null; } return this.getBidirectionalTargetAccessor().getAttributeName(); }
/** * PUBLIC: * Return the name of the attribute set in the mapping. */ public String getAttributeName() { // The attribute name on the attributeAccessor will always override any attribute already set // Use the attributeAccessor attribute over the current attribute name if (attributeName == null) { attributeName = getAttributeAccessor().getAttributeName(); } return attributeName; }
/** * Gets the name of the backpointer attribute on the target object. Used to * populate the backpointer. */ public String getBidirectionalTargetAttributeName() { if(this.bidirectionalTargetAccessor == null) { return null; } return this.getBidirectionalTargetAccessor().getAttributeName(); }
/** * Gets the name of the backpointer attribute on the target object. Used to * populate the backpointer. */ public String getBidirectionalTargetAttributeName() { if(this.bidirectionalTargetAccessor == null) { return null; } return this.getBidirectionalTargetAccessor().getAttributeName(); }
/** * Allow any initialization to be performed with the descriptor class. */ public void initializeAttributes(Class descriptorClass) throws DescriptorException { if (getAttributeName() == null) { throw DescriptorException.attributeNameNotSpecified(); } }
/** * PUBLIC: * Return the name of the attribute set in the mapping. */ @Override public String getAttributeName() { // The attribute name on the attributeAccessor will always override any attribute already set // Use the attributeAccessor attribute over the current attribute name if (attributeName == null) { attributeName = getAttributeAccessor().getAttributeName(); } return attributeName; }
/** * Allow any initialization to be performed with the descriptor class. */ public void initializeAttributes(Class descriptorClass) throws DescriptorException { if (getAttributeName() == null) { throw DescriptorException.attributeNameNotSpecified(); } }
/** * PUBLIC: * Return the name of the attribute set in the mapping. */ @Override public String getAttributeName() { // The attribute name on the attributeAccessor will always override any attribute already set // Use the attributeAccessor attribute over the current attribute name if (attributeName == null) { attributeName = getAttributeAccessor().getAttributeName(); } return attributeName; }
/** * ADVANCED: * Set the attributeAccessor. * The attribute accessor is responsible for setting and retrieving the attribute value * from the object for this mapping. * This can be set to an implementor of AttributeAccessor if the attribute * requires advanced conversion of the mapping value, or a real attribute does not exist. */ public void setAttributeAccessor(AttributeAccessor attributeAccessor) { String attributeName = getAttributeName(); this.attributeAccessor = attributeAccessor; if (attributeAccessor.getAttributeName() == null) { attributeAccessor.setAttributeName(attributeName); } this.attributeName = null; }
/** * ADVANCED: * Set the attributeAccessor. * The attribute accessor is responsible for setting and retrieving the attribute value * from the object for this mapping. * This can be set to an implementor of AttributeAccessor if the attribute * requires advanced conversion of the mapping value, or a real attribute does not exist. */ @Override public void setAttributeAccessor(AttributeAccessor attributeAccessor) { String attributeName = getAttributeName(); this.attributeAccessor = attributeAccessor; if (attributeAccessor.getAttributeName() == null) { attributeAccessor.setAttributeName(attributeName); } this.attributeName = null; }
/** * ADVANCED: * Set the attributeAccessor. * The attribute accessor is responsible for setting and retrieving the attribute value * from the object for this mapping. * This can be set to an implementor of AttributeAccessor if the attribute * requires advanced conversion of the mapping value, or a real attribute does not exist. */ @Override public void setAttributeAccessor(AttributeAccessor attributeAccessor) { String attributeName = getAttributeName(); this.attributeAccessor = attributeAccessor; if (attributeAccessor.getAttributeName() == null) { attributeAccessor.setAttributeName(attributeName); } this.attributeName = null; }
public void setAttributeValueInObject(Object object, Object value) { if(isChangeTracking) { Object oldValue = getAttributeValueFromObject(object); PropertyChangeListener listener = ((ChangeTracker)object)._persistence_getPropertyChangeListener(); if(listener != null) { listener.propertyChange(new PropertyChangeEvent(object, oxmAccessor.getAttributeName(), value, oldValue)); } } if(isValueHolderProperty) { ValueHolderInterface vh = (ValueHolderInterface)ormAccessor.getAttributeValueFromObject(object); if(vh == null) { vh = new ValueHolder(); ((ValueHolder)vh).setIsNewlyWeavedValueHolder(true); } vh.setValue(value); ormAccessor.setAttributeValueInObject(object, vh); } oxmAccessor.setAttributeValueInObject(object, value); }
/** * PUBLIC: * This method is invoked reflectively on the reference object to return the value of the * attribute in the object. This method sets the name of the getMethodName. */ public void setGetMethodName(String methodName) { if (methodName == null) { return; } // This is done because setting attribute name by defaults create InstanceVariableAttributeAccessor if (getAttributeAccessor() instanceof InstanceVariableAttributeAccessor) { String attributeName = this.attributeAccessor.getAttributeName(); setAttributeAccessor(new MethodAttributeAccessor()); getAttributeAccessor().setAttributeName(attributeName); } ((MethodAttributeAccessor)getAttributeAccessor()).setGetMethodName(methodName); }
/** * PUBLIC: * This method is invoked reflectively on the reference object to return the value of the * attribute in the object. This method sets the name of the getMethodName. */ public void setGetMethodName(String methodName) { if (methodName == null) { return; } // This is done because setting attribute name by defaults create InstanceVariableAttributeAccessor if (getAttributeAccessor() instanceof InstanceVariableAttributeAccessor) { String attributeName = this.attributeAccessor.getAttributeName(); setAttributeAccessor(new MethodAttributeAccessor()); getAttributeAccessor().setAttributeName(attributeName); } ((MethodAttributeAccessor)getAttributeAccessor()).setGetMethodName(methodName); }
/** * PUBLIC: * This method is invoked reflectively on the reference object to return the value of the * attribute in the object. This method sets the name of the getMethodName. */ public void setGetMethodName(String methodName) { if (methodName == null) { return; } // This is done because setting attribute name by defaults create InstanceVariableAttributeAccessor if (getAttributeAccessor() instanceof InstanceVariableAttributeAccessor) { String attributeName = this.attributeAccessor.getAttributeName(); setAttributeAccessor(new MethodAttributeAccessor()); getAttributeAccessor().setAttributeName(attributeName); } ((MethodAttributeAccessor)getAttributeAccessor()).setGetMethodName(methodName); }
/** * PUBLIC: * Set the methodName used to set the value for the mapping's attribute into the object. */ public void setSetMethodName(String methodName) { if (methodName == null) { return; } // This is done because setting attribute name by defaults create InstanceVariableAttributeAccessor if (!getAttributeAccessor().isMethodAttributeAccessor()) { String attributeName = this.attributeAccessor.getAttributeName(); setAttributeAccessor(new MethodAttributeAccessor()); getAttributeAccessor().setAttributeName(attributeName); } ((MethodAttributeAccessor)getAttributeAccessor()).setSetMethodName(methodName); }
/** * PUBLIC: * Set the methodName used to set the value for the mapping's attribute into the object. */ public void setSetMethodName(String methodName) { if (methodName == null) { return; } // This is done because setting attribute name by defaults create InstanceVariableAttributeAccessor if (!getAttributeAccessor().isMethodAttributeAccessor()) { String attributeName = this.attributeAccessor.getAttributeName(); setAttributeAccessor(new MethodAttributeAccessor()); getAttributeAccessor().setAttributeName(attributeName); } ((MethodAttributeAccessor)getAttributeAccessor()).setSetMethodName(methodName); }
/** * PUBLIC: * Set the methodName used to set the value for the mapping's attribute into the object. */ public void setSetMethodName(String methodName) { if (methodName == null) { return; } // This is done because setting attribute name by defaults create InstanceVariableAttributeAccessor if (!getAttributeAccessor().isMethodAttributeAccessor()) { String attributeName = this.attributeAccessor.getAttributeName(); setAttributeAccessor(new MethodAttributeAccessor()); getAttributeAccessor().setAttributeName(attributeName); } ((MethodAttributeAccessor)getAttributeAccessor()).setSetMethodName(methodName); }