Package javax.resource.cci

Examples of javax.resource.cci.RecordFactory


  @Test
  public void testTemplateExecuteInputTrueWithCreator2()
      throws ResourceException {
    ConnectionFactory connectionFactory = mock(ConnectionFactory.class);
    RecordFactory recordFactory = mock(RecordFactory.class);
    Connection connection = mock(Connection.class);
    Interaction interaction = mock(Interaction.class);
    RecordCreator creator = mock(RecordCreator.class);

    Record inputRecord = mock(Record.class);
View Full Code Here


  @SuppressWarnings("unchecked")
  @Test
  public void testTemplateExecuteInputExtractorTrueWithCreator()
      throws ResourceException, SQLException {
    ConnectionFactory connectionFactory = mock(ConnectionFactory.class);
    RecordFactory recordFactory = mock(RecordFactory.class);
    Connection connection = mock(Connection.class);
    Interaction interaction = mock(Interaction.class);
    RecordExtractor<Object> extractor = mock(RecordExtractor.class);
    RecordCreator creator = mock(RecordCreator.class);
View Full Code Here

  @Test
  public void testTemplateExecuteInputGeneratorTrueWithCreator()
      throws ResourceException {
    ConnectionFactory connectionFactory = mock(ConnectionFactory.class);
    RecordFactory recordFactory = mock(RecordFactory.class);
    Connection connection = mock(Connection.class);
    Interaction interaction = mock(Interaction.class);
    RecordCreator generator = mock(RecordCreator.class);
    RecordCreator creator = mock(RecordCreator.class);
View Full Code Here

  @Test
  public void testTemplateExecuteInputGeneratorFalse()
      throws ResourceException {
    ConnectionFactory connectionFactory = mock(ConnectionFactory.class);
    RecordFactory recordFactory = mock(RecordFactory.class);
    Connection connection = mock(Connection.class);
    Interaction interaction = mock(Interaction.class);
    RecordCreator generator = mock(RecordCreator.class);

    Record inputRecord = mock(Record.class);
View Full Code Here

  @SuppressWarnings("unchecked")
  @Test
  public void testTemplateExecuteInputGeneratorExtractorTrueWithCreator()
      throws ResourceException, SQLException {
    ConnectionFactory connectionFactory = mock(ConnectionFactory.class);
    RecordFactory recordFactory = mock(RecordFactory.class);
    Connection connection = mock(Connection.class);
    Interaction interaction = mock(Interaction.class);
    RecordCreator generator = mock(RecordCreator.class);
    RecordExtractor<Object> extractor = mock(RecordExtractor.class);
    RecordCreator creator = mock(RecordCreator.class);
View Full Code Here

  @SuppressWarnings("unchecked")
  @Test
  public void testTemplateExecuteInputGeneratorExtractorFalse()
      throws ResourceException, SQLException {
    ConnectionFactory connectionFactory = mock(ConnectionFactory.class);
    RecordFactory recordFactory = mock(RecordFactory.class);
    Connection connection = mock(Connection.class);
    Interaction interaction = mock(Interaction.class);
    RecordCreator generator = mock(RecordCreator.class);
    RecordExtractor<Object> extractor = mock(RecordExtractor.class);
View Full Code Here

  @SuppressWarnings("unchecked")
  @Test
  public void testTemplateExecuteInputOutputResultsSetFalse()
      throws ResourceException, SQLException {
    ConnectionFactory connectionFactory = mock(ConnectionFactory.class);
    RecordFactory recordFactory = mock(RecordFactory.class);
    Connection connection = mock(Connection.class);
    Interaction interaction = mock(Interaction.class);
    Record record = mock(Record.class);
    ResultSet resultset = mock(ResultSet.class);
    RecordCreator generator = mock(RecordCreator.class);
View Full Code Here

  @Test
  public void testMappingRecordOperation() throws ResourceException {
    ConnectionFactory connectionFactory = mock(ConnectionFactory.class);
    Connection connection = mock(Connection.class);
    Interaction interaction = mock(Interaction.class);
    RecordFactory recordFactory = mock(RecordFactory.class);

    Record inputRecord = mock(Record.class);
    Record outputRecord = mock(Record.class);

    InteractionSpec interactionSpec = mock(InteractionSpec.class);
View Full Code Here

        Record outputRecordToUse = outputRecord;
        try {
          if (outputRecord != null || getOutputRecordCreator() != null) {
            // Use the CCI execute method with output record as parameter.
            if (outputRecord == null) {
              RecordFactory recordFactory = getRecordFactory(connectionFactory);
              outputRecordToUse = getOutputRecordCreator().createRecord(recordFactory);
            }
            interaction.execute(spec, inputRecord, outputRecordToUse);
          }
          else {
View Full Code Here

   * @see #getRecordFactory(javax.resource.cci.ConnectionFactory)
   * @see javax.resource.cci.RecordFactory#createIndexedRecord(String)
   */
  public IndexedRecord createIndexedRecord(String name) throws DataAccessException {
    try {
      RecordFactory recordFactory = getRecordFactory(getConnectionFactory());
      return recordFactory.createIndexedRecord(name);
    }
    catch (NotSupportedException ex) {
      throw new RecordTypeNotSupportedException("Creation of indexed Record not supported by connector", ex);
    }
    catch (ResourceException ex) {
View Full Code Here

TOP

Related Classes of javax.resource.cci.RecordFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.