Tabnine Logo
MethodBasedFieldTransformation.getMethodName
Code IndexAdd Tabnine to your IDE (free)

How to use
getMethodName
method
in
org.eclipse.persistence.internal.descriptors.MethodBasedFieldTransformation

Best Java code snippets using org.eclipse.persistence.internal.descriptors.MethodBasedFieldTransformation.getMethodName (Showing top 15 results out of 315)

origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

  public FieldTransformer buildTransformer() throws Exception {
    return new MethodBasedFieldTransformer(getMethodName());
  }
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

  public FieldTransformer buildTransformer() throws Exception {
    return new MethodBasedFieldTransformer(getMethodName());
  }
}
origin: com.haulmont.thirdparty/eclipselink

  public FieldTransformer buildTransformer() throws Exception {
    return new MethodBasedFieldTransformer(getMethodName());
  }
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL:
 * Required for reverse compatibility and test cases:
 * @return a hash table containing the fieldName and their respective method names
 */
public Hashtable getFieldNameToMethodNames() {
  Hashtable table = new Hashtable(getFieldTransformations().size());
  Iterator transformations = getFieldTransformations().iterator();
  while (transformations.hasNext()) {
    FieldTransformation transformation = (FieldTransformation)transformations.next();
    if (transformation instanceof MethodBasedFieldTransformation) {
      table.put(transformation.getField().getQualifiedName(), ((MethodBasedFieldTransformation)transformation).getMethodName());
    }
  }
  return table;
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * Required for reverse compatibility and test cases:
 * @return a hash table containing the fieldName and their respective method names
 */
public Hashtable getFieldNameToMethodNames() {
  Hashtable table = new Hashtable(getFieldTransformations().size());
  Iterator transformations = getFieldTransformations().iterator();
  while (transformations.hasNext()) {
    FieldTransformation transformation = (FieldTransformation)transformations.next();
    if (transformation instanceof MethodBasedFieldTransformation) {
      table.put(transformation.getField().getQualifiedName(), ((MethodBasedFieldTransformation)transformation).getMethodName());
    }
  }
  return table;
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 * Required for reverse compatibility and test cases:
 * @return a hash table containing the fieldName and their respective method names
 */
public Hashtable getFieldNameToMethodNames() {
  Hashtable table = new Hashtable(getFieldTransformations().size());
  Iterator transformations = getFieldTransformations().iterator();
  while (transformations.hasNext()) {
    FieldTransformation transformation = (FieldTransformation)transformations.next();
    if (transformation instanceof MethodBasedFieldTransformation) {
      table.put(transformation.getField().getQualifiedName(), ((MethodBasedFieldTransformation)transformation).getMethodName());
    }
  }
  return table;
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * Needed for backwards compatibility
 */
public Vector getFieldNameToMethodNameAssociations() {
  Vector associations = new Vector();
  for (Iterator source = getFieldTransformations().iterator(); source.hasNext();) {
    FieldTransformation tf = (FieldTransformation)source.next();
    if (tf instanceof MethodBasedFieldTransformation) {
      Association ass = new Association();
      ass.setKey(tf.getField().getQualifiedName());
      ass.setValue(((MethodBasedFieldTransformation)tf).getMethodName());
      associations.addElement(ass);
    }
  }
  return associations;
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL:
 * Needed for backwards compatibility
 */
public Vector getFieldNameToMethodNameAssociations() {
  Vector associations = new Vector();
  for (Iterator source = getFieldTransformations().iterator(); source.hasNext();) {
    FieldTransformation tf = (FieldTransformation)source.next();
    if (tf instanceof MethodBasedFieldTransformation) {
      Association ass = new Association();
      ass.setKey(tf.getField().getQualifiedName());
      ass.setValue(((MethodBasedFieldTransformation)tf).getMethodName());
      associations.addElement(ass);
    }
  }
  return associations;
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 * Needed for backwards compatibility
 */
public Vector getFieldNameToMethodNameAssociations() {
  Vector associations = new Vector();
  for (Iterator source = getFieldTransformations().iterator(); source.hasNext();) {
    FieldTransformation tf = (FieldTransformation)source.next();
    if (tf instanceof MethodBasedFieldTransformation) {
      Association ass = new Association();
      ass.setKey(tf.getField().getQualifiedName());
      ass.setValue(((MethodBasedFieldTransformation)tf).getMethodName());
      associations.addElement(ass);
    }
  }
  return associations;
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

MethodBasedFieldTransformation methodTransformation = (MethodBasedFieldTransformation) transformation;
try {
  Class returnType = Helper.getDeclaredMethod(mapping.getDescriptor().getJavaClass(), methodTransformation.getMethodName(), null).getReturnType();
  getFieldDefFromDBField(methodTransformation.getField()).setType(returnType);
} catch (NoSuchMethodException ex) {
origin: com.haulmont.thirdparty/eclipselink

MethodBasedFieldTransformation methodTransformation = (MethodBasedFieldTransformation) transformation; 
try {
  Class returnType = Helper.getDeclaredMethod(mapping.getDescriptor().getJavaClass(), methodTransformation.getMethodName(), null).getReturnType();
  getFieldDefFromDBField(methodTransformation.getField()).setType(returnType);
} catch (NoSuchMethodException ex) {
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

MethodBasedFieldTransformation methodTransformation = (MethodBasedFieldTransformation) transformation; 
try {
  Class returnType = Helper.getDeclaredMethod(mapping.getDescriptor().getJavaClass(), methodTransformation.getMethodName(), null).getReturnType();
  getFieldDefFromDBField(methodTransformation.getField(), false).setType(returnType);
} catch (NoSuchMethodException ex) {
origin: org.eclipse.persistence/org.eclipse.persistence.core

protected void addTransformationMappingLines(NonreflectiveMethodDefinition method, String mappingName, TransformationMapping mapping) {
  if (!mapping.isWriteOnly()) {
    if (mapping.getAttributeMethodName() != null) {
      method.addLine(mappingName + ".setAttributeTransformation(\"" + mapping.getAttributeMethodName() + "\");");
    } else {
      method.addLine(mappingName + ".setAttributeTransformer(new " + mapping.getAttributeTransformerClassName() + "());");
    }
  }
  Iterator fieldTransformations = mapping.getFieldTransformations().iterator();
  while (fieldTransformations.hasNext()) {
    FieldTransformation trans = (FieldTransformation)fieldTransformations.next();
    String fieldName = trans.getFieldName();
    if (trans instanceof MethodBasedFieldTransformation) {
      String methodName = ((MethodBasedFieldTransformation)trans).getMethodName();
      method.addLine(mappingName + ".addFieldTransformation(\"" + fieldName + "\", \"" + methodName + "\");");
    } else {
      String transformerClass = ((TransformerBasedFieldTransformation)trans).getTransformerClassName();
      method.addLine(mappingName + ".addFieldTransformer(\"" + fieldName + "\", new " + transformerClass + "());");
    }
  }
  IndirectionPolicy policy = mapping.getIndirectionPolicy();
  if (policy instanceof ContainerIndirectionPolicy) {
    String containerClassName = ((ContainerIndirectionPolicy)policy).getContainerClassName();
    method.addLine(mappingName + ".useContainerIndirection(" + containerClassName + ".class);");
  } else if (policy instanceof BasicIndirectionPolicy) {
    method.addLine(mappingName + ".useBasicIndirection();");
  }
  method.addLine(mappingName + ".setIsMutable(" + mapping.isMutable() + ");");
}
origin: com.haulmont.thirdparty/eclipselink

protected void addTransformationMappingLines(NonreflectiveMethodDefinition method, String mappingName, TransformationMapping mapping) {
  if (!mapping.isWriteOnly()) {
    if (mapping.getAttributeMethodName() != null) {
      method.addLine(mappingName + ".setAttributeTransformation(\"" + mapping.getAttributeMethodName() + "\");");
    } else {
      method.addLine(mappingName + ".setAttributeTransformer(new " + mapping.getAttributeTransformerClassName() + "());");
    }
  }
  Iterator fieldTransformations = mapping.getFieldTransformations().iterator();
  while (fieldTransformations.hasNext()) {
    FieldTransformation trans = (FieldTransformation)fieldTransformations.next();
    String fieldName = trans.getFieldName();
    if (trans instanceof MethodBasedFieldTransformation) {
      String methodName = ((MethodBasedFieldTransformation)trans).getMethodName();
      method.addLine(mappingName + ".addFieldTransformation(\"" + fieldName + "\", \"" + methodName + "\");");
    } else {
      String transformerClass = ((TransformerBasedFieldTransformation)trans).getTransformerClassName();
      method.addLine(mappingName + ".addFieldTransformer(\"" + fieldName + "\", new " + transformerClass + "());");
    }
  }
  IndirectionPolicy policy = mapping.getIndirectionPolicy();
  if (policy instanceof ContainerIndirectionPolicy) {
    String containerClassName = ((ContainerIndirectionPolicy)policy).getContainerClassName();
    method.addLine(mappingName + ".useContainerIndirection(" + containerClassName + ".class);");
  } else if (policy instanceof BasicIndirectionPolicy) {
    method.addLine(mappingName + ".useBasicIndirection();");
  }
  method.addLine(mappingName + ".setIsMutable(" + mapping.isMutable() + ");");
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

protected void addTransformationMappingLines(NonreflectiveMethodDefinition method, String mappingName, TransformationMapping mapping) {
  if (!mapping.isWriteOnly()) {
    if (mapping.getAttributeMethodName() != null) {
      method.addLine(mappingName + ".setAttributeTransformation(\"" + mapping.getAttributeMethodName() + "\");");
    } else {
      method.addLine(mappingName + ".setAttributeTransformer(new " + mapping.getAttributeTransformerClassName() + "());");
    }
  }
  Iterator fieldTransformations = mapping.getFieldTransformations().iterator();
  while (fieldTransformations.hasNext()) {
    FieldTransformation trans = (FieldTransformation)fieldTransformations.next();
    String fieldName = trans.getFieldName();
    if (trans instanceof MethodBasedFieldTransformation) {
      String methodName = ((MethodBasedFieldTransformation)trans).getMethodName();
      method.addLine(mappingName + ".addFieldTransformation(\"" + fieldName + "\", \"" + methodName + "\");");
    } else {
      String transformerClass = ((TransformerBasedFieldTransformation)trans).getTransformerClassName();
      method.addLine(mappingName + ".addFieldTransformer(\"" + fieldName + "\", new " + transformerClass + "());");
    }
  }
  IndirectionPolicy policy = mapping.getIndirectionPolicy();
  if (policy instanceof ContainerIndirectionPolicy) {
    String containerClassName = ((ContainerIndirectionPolicy)policy).getContainerClassName();
    method.addLine(mappingName + ".useContainerIndirection(" + containerClassName + ".class);");
  } else if (policy instanceof BasicIndirectionPolicy) {
    method.addLine(mappingName + ".useBasicIndirection();");
  }
  method.addLine(mappingName + ".setIsMutable(" + mapping.isMutable() + ");");
}
org.eclipse.persistence.internal.descriptorsMethodBasedFieldTransformationgetMethodName

Popular methods of MethodBasedFieldTransformation

  • <init>
  • getField
  • setField
  • setMethodName

Popular in Java

  • Finding current android device location
  • compareTo (BigDecimal)
  • setContentView (Activity)
  • addToBackStack (FragmentTransaction)
  • Socket (java.net)
    Provides a client-side TCP socket.
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • Collectors (java.util.stream)
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now