Example usage for org.springframework.jca.cci.core CciTemplate setOutputRecordCreator

List of usage examples for org.springframework.jca.cci.core CciTemplate setOutputRecordCreator

Introduction

In this page you can find the example usage for org.springframework.jca.cci.core CciTemplate setOutputRecordCreator.

Prototype

public void setOutputRecordCreator(@Nullable RecordCreator creator) 

Source Link

Document

Set a RecordCreator that should be used for creating default output Records.

Usage

From source file:org.springframework.jca.cci.core.CciTemplate.java

/**
 * Create a template derived from this template instance,
 * inheriting the ConnectionFactory and other settings but
 * overriding the ConnectionSpec used for obtaining Connections.
 * @param connectionSpec the CCI ConnectionSpec that the derived template
 * instance is supposed to obtain Connections for
 * @return the derived template instance
 * @see #setConnectionSpec/*  w  ww .  j ava2 s .  c  o m*/
 */
public CciTemplate getDerivedTemplate(ConnectionSpec connectionSpec) {
    CciTemplate derived = new CciTemplate(obtainConnectionFactory(), connectionSpec);
    RecordCreator recordCreator = getOutputRecordCreator();
    if (recordCreator != null) {
        derived.setOutputRecordCreator(recordCreator);
    }
    return derived;
}