Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public void visit(CpoArgument cpoArgument) {
// ctCassandraArgument
CtCassandraArgument ctCassandraArgument = CtCassandraArgument.Factory.newInstance();

ctCassandraArgument.setAttributeName(cpoArgument.getAttributeName());
ctCassandraArgument.setAttributeName(cpoArgument.getName());

if (cpoArgument.getDescription() != null && cpoArgument.getDescription().length() > 0) {
ctCassandraArgument.setDescription(cpoArgument.getDescription());
Expand Down

This file was deleted.

125 changes: 0 additions & 125 deletions cpo-core/src/main/java/org/synchronoss/cpo/CpoCharArrayReader.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,18 @@
* ]]
*/

import java.io.StringReader;
import java.lang.reflect.InvocationTargetException;
import java.util.*;
import java.util.Map.Entry;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.synchronoss.cpo.helper.ExceptionHelper;
import org.synchronoss.cpo.meta.MethodMapEntry;
import org.synchronoss.cpo.meta.MethodMapper;
import org.synchronoss.cpo.meta.domain.CpoArgument;
import org.synchronoss.cpo.meta.domain.CpoAttribute;
import org.synchronoss.cpo.meta.domain.CpoClass;
import org.synchronoss.cpo.meta.domain.CpoFunction;
import org.synchronoss.cpo.parser.BoundExpressionParser;

/**
* JdbcPreparedStatementFactory is the object that encapsulates the creation of the actual
Expand All @@ -47,9 +46,6 @@ public abstract class CpoStatementFactory implements CpoReleasable {
/** Version Id for this class. */
private static final long serialVersionUID = 1L;

/** DOCUMENT ME! */
private static final Logger logger = LoggerFactory.getLogger(CpoStatementFactory.class);

private Logger localLogger = null;

private List<CpoReleasable> releasables = new ArrayList<>();
Expand Down Expand Up @@ -201,43 +197,16 @@ private <T> StringBuilder replaceMarker(
while ((attrOffset = source.indexOf(marker, fromIndex)) != -1) {
source.replace(attrOffset, attrOffset + mLength, replace);
fromIndex = attrOffset + rLength;
bindValues.addAll(countBindMarkers(source.substring(0, attrOffset)), jwbBindValues);
bindValues.addAll(
BoundExpressionParser.getBindMarkerIndexes(source.substring(0, attrOffset)).size(),
jwbBindValues);
}
}
// OUT.debug("ending string <"+source.toString()+">");

return source;
}

private int countBindMarkers(String source) {
StringReader reader;
int rc;
int qMarks = 0;
boolean inDoubleQuotes = false;
boolean inSingleQuotes = false;

if (source != null) {
reader = new StringReader(source);

try {
do {
rc = reader.read();
if (((char) rc) == '\'') {
inSingleQuotes = !inSingleQuotes;
} else if (((char) rc) == '"') {
inDoubleQuotes = !inDoubleQuotes;
} else if (!inSingleQuotes && !inDoubleQuotes && ((char) rc) == '?') {
qMarks++;
}
} while (rc != -1);
} catch (Exception e) {
logger.error("error counting bind markers");
}
}

return qMarks;
}

/**
* Adds a releasable object to this object. The release method on the releasable will be called
* when the PreparedStatement is executed.
Expand Down
Loading