All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sforce.ws.codegen.templates.connectionWrapper.st Maven / Gradle / Ivy

connectionWrapper(gen) ::= <<
package $gen.packageName$;

/**
 * This is a generated class for the SObject Enterprise API.
 * Do not edit this file, as your changes will be lost.
 */
public class $gen.className$ implements $gen.interfaceName$ {

  private $gen.connectionClassName$ connection;

  public $gen.className$($gen.connectionClassName$ connection) {
    this.connection = connection;
  }

$gen.operations: { op |
  @Override
  public $op.returnTypeInterface$ $op.operationName$($op.argsWithInterfaces$)
       throws com.sforce.ws.ConnectionException {
       $ if (op.hasReturnType)$return $endif$connection.$op.operationName$($op.argsWithCasts$);
  \}

}$

@SuppressWarnings("unchecked")
  private  T[] castArray(Class clazz, U[] array) {
      if (array == null) {
          return null;
      }
      T[] retVal = (T[]) java.lang.reflect.Array.newInstance(clazz, array.length);
      for (int i=0; i < array.length; i++) {
          retVal[i] = (T)array[i];
      }

      return retVal;
  }
}

>>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy