@Override public void initialize(AbstractTransformationMapping mapping) { transformationMapping = mapping; namespaceResolver = ((XMLDescriptor)mapping.getDescriptor()).getNamespaceResolver(); }
public void initialize(AbstractTransformationMapping mapping) { transformationMapping = mapping; namespaceResolver = ((XMLDescriptor) mapping.getDescriptor()).getNamespaceResolver(); }
public void initialize(AbstractTransformationMapping mapping) { transformationMapping = mapping; namespaceResolver = ((XMLDescriptor) mapping.getDescriptor()).getNamespaceResolver(); }
public void initialize(AbstractTransformationMapping mapping) { transformationMapping = mapping; namespaceResolver = ((XMLDescriptor)mapping.getDescriptor()).getNamespaceResolver(); }
public void initialize(AbstractTransformationMapping mapping) { transformationMapping = mapping; NamespaceResolver namespaceResolver = ((XMLDescriptor) mapping.getDescriptor()).getNamespaceResolver(); xPath.setNamespaceResolver(namespaceResolver); }
public void initialize(AbstractTransformationMapping mapping) { transformationMapping = mapping; NamespaceResolver namespaceResolver = ((XMLDescriptor) mapping.getDescriptor()).getNamespaceResolver(); xPath.setNamespaceResolver(namespaceResolver); }
public void initialize(AbstractTransformationMapping mapping) { this.mapping = mapping; try { // look for the zero-argument version first fieldTransformationMethod = Helper.getDeclaredMethod(mapping.getDescriptor().getJavaClass(), methodName, new Class[0]); } catch (Exception ex) { try { // if the zero-argument version is not there, look for the one-argument version Class[] methodParameterTypes = new Class[1]; methodParameterTypes[0] = ClassConstants.PublicInterfaceSession_Class; fieldTransformationMethod = Helper.getDeclaredMethod(mapping.getDescriptor().getJavaClass(), methodName, methodParameterTypes); } catch (Exception ex2) { try { //if the one-argument version is absent, try with sessions.Session Class[] methodParameterTypes = new Class[1]; methodParameterTypes[0] = ClassConstants.SessionsSession_Class; fieldTransformationMethod = Helper.getDeclaredMethod(mapping.getDescriptor().getJavaClass(), methodName, methodParameterTypes); } catch (NoSuchMethodException exception) { throw DescriptorException.noSuchMethodWhileConvertingToMethod(methodName, mapping, exception); } catch (SecurityException exception) { throw DescriptorException.securityWhileConvertingToMethod(methodName, mapping, exception); } } } }
attributeTransformationMethod = Helper.getDeclaredMethod(mapping.getDescriptor().getJavaClass(), methodName, parameterTypes); } catch (Exception ex) { try { attributeTransformationMethod = Helper.getDeclaredMethod(mapping.getDescriptor().getJavaClass(), methodName, parameterTypes); } catch (Exception ex2) { try { parameterTypes[0] = ClassConstants.Record_Class; parameterTypes[1] = ClassConstants.PublicInterfaceSession_Class; attributeTransformationMethod = Helper.getDeclaredMethod(mapping.getDescriptor().getJavaClass(), methodName, parameterTypes); } catch (Exception ex3) { try { parameterTypes[0] = ClassConstants.Record_Class; parameterTypes[1] = ClassConstants.SessionsSession_Class; attributeTransformationMethod = Helper.getDeclaredMethod(mapping.getDescriptor().getJavaClass(), methodName, parameterTypes); } catch (NoSuchMethodException exception) { throw DescriptorException.noSuchMethodOnInitializingAttributeMethod(mapping.getAttributeMethodName(), mapping, exception);
for (Enumeration stream = getFieldToTransformers().elements(); stream.hasMoreElements();) { Object[] pair = (Object[])stream.nextElement(); pair[0] = getDescriptor().buildField(((DatabaseField)pair[0])); ((FieldTransformer)pair[1]).initialize(this); DatabaseField field = getDescriptor().buildField(transformation.getField()); String transformerClassName = "MethodBasedFieldTransformer"; FieldTransformer transformer = null;
pair[0] = getDescriptor().buildField(((DatabaseField)pair[0])); ((FieldTransformer)pair[1]).initialize(this); DatabaseField field = getDescriptor().buildField(transformation.getField()); String transformerClassName = "MethodBasedFieldTransformer"; FieldTransformer transformer = null;
pair[0] = getDescriptor().buildField(((DatabaseField)pair[0])); ((FieldTransformer)pair[1]).initialize(this); DatabaseField field = getDescriptor().buildField(transformation.getField()); String transformerClassName = "MethodBasedFieldTransformer"; FieldTransformer transformer = null;
public void initialize(AbstractTransformationMapping mapping) { this.mapping = mapping; final Class javaClass = this.mapping.getDescriptor().getJavaClass(); try { // look for the zero-argument version first fieldTransformationMethod = Helper.getDeclaredMethod(javaClass, methodName, new Class[0]); } catch (NoSuchMethodException ex) { try { // if the zero-argument version is not there, look for the one-argument version Class[] methodParameterTypes = new Class[1]; methodParameterTypes[0] = ClassConstants.PublicInterfaceSession_Class; fieldTransformationMethod = Helper.getDeclaredMethod(javaClass, methodName, methodParameterTypes); } catch (NoSuchMethodException ex2) { try { //if the one-argument version is absent, try with sessions.Session Class[] methodParameterTypes = new Class[1]; methodParameterTypes[0] = ClassConstants.SessionsSession_Class; fieldTransformationMethod = Helper.getDeclaredMethod(javaClass, methodName, methodParameterTypes); } catch (NoSuchMethodException exception) { throw DescriptorException.noSuchMethodWhileConvertingToMethod(methodName, this.mapping, exception); } catch (SecurityException exception) { throw DescriptorException.securityWhileConvertingToMethod(methodName, this.mapping, exception); } } catch (SecurityException exception) { throw DescriptorException.securityWhileConvertingToMethod(methodName, this.mapping, exception); } } catch (SecurityException exception) { throw DescriptorException.securityWhileConvertingToMethod(methodName, this.mapping, exception); } }
public void initialize(AbstractTransformationMapping mapping) { this.mapping = mapping; final Class javaClass = this.mapping.getDescriptor().getJavaClass(); try {
final Class javaClass = this.mapping.getDescriptor().getJavaClass(); try {
final Class javaClass = this.mapping.getDescriptor().getJavaClass(); try {