protected void setSizeContraints(Statement statement) { try { executionFactory.setFetchSize(command, context, statement, fetchSize); } catch (SQLException e) { if (LogManager.isMessageToBeRecorded(LogConstants.CTX_CONNECTOR, MessageLevel.DETAIL)) { LogManager.logDetail(LogConstants.CTX_CONNECTOR, context.getRequestId(), " could not set fetch size: ", fetchSize); //$NON-NLS-1$ } } }
public QueryExecutionImpl(QueryExpression command, SalesforceConnection connection, RuntimeMetadata metadata, ExecutionContext context, SalesForceExecutionFactory salesForceExecutionFactory) { this.connection = connection; this.metadata = metadata; this.context = context; this.query = command; this.executionFactory = salesForceExecutionFactory; connectionIdentifier = context.getConnectionId(); connectorIdentifier = context.getConnectorIdentifier(); requestIdentifier = context.getRequestId(); partIdentifier = context.getPartIdentifier(); }
public boolean equals(Object obj) { if(obj == this) { return true; } if(! (obj instanceof ExecutionContext)) { return false; } ExecutionContext other = (ExecutionContext) obj; return EquivalenceUtil.areEqual(this.getRequestId(), other.getRequestId()) && EquivalenceUtil.areEqual(this.getPartIdentifier(), other.getPartIdentifier()); }
public boolean equals(Object obj) { if(obj == this) { return true; } if(! (obj instanceof ExecutionContext)) { return false; } ExecutionContext other = (ExecutionContext) obj; return EquivalenceUtil.areEqual(this.getRequestId(), other.getRequestId()) && EquivalenceUtil.areEqual(this.getPartIdentifier(), other.getPartIdentifier()); }
public boolean equals(Object obj) { if(obj == this) { return true; } if(! (obj instanceof ExecutionContext)) { return false; } ExecutionContext other = (ExecutionContext) obj; return EquivalenceUtil.areEqual(this.getRequestId(), other.getRequestId()) && EquivalenceUtil.areEqual(this.getPartIdentifier(), other.getPartIdentifier()); }
/** * Returns the source comment for the given command * @param context * @param command * @return the comment */ public String getSourceComment(ExecutionContext context, Command command) { if (addSourceComment() && context != null) { return comment.get().format(new Object[] {context.getConnectionId(), context.getRequestId(), context.getPartIdentifier(), context.getExecutionCountIdentifier(), context.getSession().getUserName(), context.getVdbName(), context.getVdbVersion(), context.isTransactional() }); } return ""; //$NON-NLS-1$ }
public void addStatementWarnings() throws SQLException { SQLWarning warning = this.statement.getWarnings(); if (warning != null) { context.addWarning(warning); if (LogManager.isMessageToBeRecorded(LogConstants.CTX_CONNECTOR, MessageLevel.DETAIL)) { while (warning != null) { LogManager.logDetail(LogConstants.CTX_CONNECTOR, context.getRequestId() + " Warning: ", warning); //$NON-NLS-1$ warning = warning.getNextWarning(); } } } this.statement.clearWarnings(); } }
public FakeExecutionContextImpl(ExecutionContext c) { super(c.getVdbName(), c.getVdbVersion(), c.getCommandPayload(), c .getConnectionId(), c.getConnectorIdentifier(), Long.valueOf(c .getRequestId()), c.getPartIdentifier(), c .getExecutionCountIdentifier()); }