CPD Results

The following document contains the results of PMD's CPD 4.3.

Duplications

File Line
org/synchronoss/cpo/jdbc/CallableStatementCpoData.java 74
org/synchronoss/cpo/jdbc/PreparedStatementCpoData.java 44
  }

  @Override
  public void invokeSetter(Object instanceObject) throws CpoException {
    Logger localLogger = instanceObject == null ? logger : LoggerFactory.getLogger(instanceObject.getClass());
    CpoAttribute cpoAttribute = getCpoAttribute();
    Object param = transformOut(cpoAttribute.invokeGetter(instanceObject));
    JavaSqlMethod<?> javaSqlMethod = JavaSqlMethods.getJavaSqlMethod(getDataSetterParamType());
    if (javaSqlMethod == null) {
      throw new CpoException("Error Retrieveing Jdbc Method for type: " + getDataSetterParamType().getName());
    }
    localLogger.info(cpoAttribute.getDataName() + "=" + param);
    try {
      switch (javaSqlMethod.getMethodType()) {
        case JavaSqlMethod.METHOD_TYPE_BASIC:
          javaSqlMethod.getCsSetter().invoke(jcsf.getCallableStatement(), getIndex(), param);
File Line
org/synchronoss/cpo/jdbc/CallableStatementCpoData.java 99
org/synchronoss/cpo/jdbc/PreparedStatementCpoData.java 69
          javaSqlMethod.getCsSetter().invoke(jcsf.getCallableStatement(), getIndex(), ccar, ccar.getLength());
          break;
      }
    } catch (Exception e) {
      throw new CpoException("Error Invoking Jdbc Method: " + javaSqlMethod.getPsSetter().getName() + ":" + ExceptionHelper.getLocalizedMessage(e));
    }
  }
  
  @Override
  public Object transformOut(Object attributeObject) throws CpoException {
    Object retObj = attributeObject;
    CpoTransform cpoTransform = getCpoAttribute().getCpoTransform();
    
    if (cpoTransform != null) {
      if (cpoTransform instanceof JdbcCpoTransform) {
        retObj = ((JdbcCpoTransform)cpoTransform).transformOut(jcsf, attributeObject);