/** * 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 void initialize(AbstractSession session) throws DescriptorException { super.initialize(session); if(variableAttributeAccessor == null){ if(variableAttributeName != null){ this.variableAttributeAccessor = new InstanceVariableAttributeAccessor(); this.variableAttributeAccessor.setAttributeName(variableAttributeName); }else if(variableGetMethodName != null){ this.variableAttributeAccessor = new MethodAttributeAccessor(); this.variableAttributeAccessor.setAttributeName("VARIABLE"); ((MethodAttributeAccessor)this.variableAttributeAccessor).setGetMethodName(variableGetMethodName); if(variableSetMethodName == null){ this.variableAttributeAccessor.setIsWriteOnly(true); }else{ ((MethodAttributeAccessor)this.variableAttributeAccessor).setSetMethodName(variableSetMethodName); } } } this.variableAttributeAccessor.initializeAttributes(this.getReferenceClass()); }
public void initialize(AbstractSession session) throws DescriptorException { super.initialize(session); if(variableAttributeAccessor == null){ if(variableAttributeName != null){ this.variableAttributeAccessor = new InstanceVariableAttributeAccessor(); this.variableAttributeAccessor.setAttributeName(variableAttributeName); }else if(variableGetMethodName != null){ this.variableAttributeAccessor = new MethodAttributeAccessor(); this.variableAttributeAccessor.setAttributeName("VARIABLE"); ((MethodAttributeAccessor)this.variableAttributeAccessor).setGetMethodName(variableGetMethodName); if(variableSetMethodName == null){ this.variableAttributeAccessor.setIsWriteOnly(true); }else{ ((MethodAttributeAccessor)this.variableAttributeAccessor).setSetMethodName(variableSetMethodName); } } } this.variableAttributeAccessor.initializeAttributes(this.getReferenceClass()); }
/** * Sets the method name to be used when accessing the value of the back pointer * on the target object of this mapping. If the specified method doesn't exist * on the reference class of this mapping, a DescriptorException will be thrown * during initialize. * * @param methodName - the getter method to be used. */ public void setBidirectionalTargetGetMethodName(String methodName) { if (methodName == null) { return; } if(this.bidirectionalTargetAccessor == null) { bidirectionalTargetAccessor = new MethodAttributeAccessor(); } // This is done because setting attribute name by defaults create InstanceVariableAttributeAccessor if (!getBidirectionalTargetAccessor().isMethodAttributeAccessor()) { String attributeName = this.bidirectionalTargetAccessor.getAttributeName(); setBidirectionalTargetAccessor(new MethodAttributeAccessor()); getBidirectionalTargetAccessor().setAttributeName(attributeName); } ((MethodAttributeAccessor)getBidirectionalTargetAccessor()).setGetMethodName(methodName); }
/** * Sets the method name to be used when accessing the value of the back pointer * on the target object of this mapping. If the specified method doesn't exist * on the reference class of this mapping, a DescriptorException will be thrown * during initialize. * * @param methodName - the getter method to be used. */ public void setBidirectionalTargetGetMethodName(String methodName) { if (methodName == null) { return; } if(this.bidirectionalTargetAccessor == null) { bidirectionalTargetAccessor = new MethodAttributeAccessor(); } // This is done because setting attribute name by defaults create InstanceVariableAttributeAccessor if (!getBidirectionalTargetAccessor().isMethodAttributeAccessor()) { String attributeName = this.bidirectionalTargetAccessor.getAttributeName(); setBidirectionalTargetAccessor(new MethodAttributeAccessor()); getBidirectionalTargetAccessor().setAttributeName(attributeName); } ((MethodAttributeAccessor)getBidirectionalTargetAccessor()).setGetMethodName(methodName); }
/** * Sets the method name to be used when accessing the value of the back pointer * on the target object of this mapping. If the specified method doesn't exist * on the reference class of this mapping, a DescriptorException will be thrown * during initialize. * * @param methodName - the getter method to be used. */ public void setBidirectionalTargetGetMethodName(String methodName) { if (methodName == null) { return; } if(this.bidirectionalTargetAccessor == null) { bidirectionalTargetAccessor = new MethodAttributeAccessor(); } // This is done because setting attribute name by defaults create InstanceVariableAttributeAccessor if (!getBidirectionalTargetAccessor().isMethodAttributeAccessor()) { String attributeName = this.bidirectionalTargetAccessor.getAttributeName(); setBidirectionalTargetAccessor(new MethodAttributeAccessor()); getBidirectionalTargetAccessor().setAttributeName(attributeName); } ((MethodAttributeAccessor)getBidirectionalTargetAccessor()).setGetMethodName(methodName); }
aa.setAttributeName(locProp.getPropertyName()); aa.setSetMethodName(locProp.getSetMethodName()); aa.setGetMethodName(locProp.getGetMethodName()); descriptor.setLocationAccessor(aa); } else {
aa.setAttributeName(locProp.getPropertyName()); aa.setSetMethodName(locProp.getSetMethodName()); aa.setGetMethodName(locProp.getGetMethodName()); descriptor.setLocationAccessor(aa); } else {
this.variableAttributeAccessor = new MethodAttributeAccessor(); this.variableAttributeAccessor.setAttributeName("VARIABLE"); ((MethodAttributeAccessor)this.variableAttributeAccessor).setGetMethodName(variableGetMethodName); if(variableSetMethodName == null){ this.variableAttributeAccessor.setIsWriteOnly(true);
this.variableAttributeAccessor = new MethodAttributeAccessor(); this.variableAttributeAccessor.setAttributeName("VARIABLE"); ((MethodAttributeAccessor)this.variableAttributeAccessor).setGetMethodName(variableGetMethodName); if(variableSetMethodName == null){ this.variableAttributeAccessor.setIsWriteOnly(true);