js185064's picture
Personal Website:
Day Job:
blog icon Recent Articles

iBatis and MyBatis support custom types to override JDBC and other types when using the iBatis or MyBatis frameworks. A custom data type gives you the ability to deal with any kind of special input and output handling you may need for a database data type. For example, a User Defined Type (UDT)  that represents a point would require an X and Y Position to be entered for input and an X and Y position to be retrieved from the database. The custom data type gives you a clearly defined programmatic mechanism to do this.

iBatis is now called MyBatis (iBatis 3.0). MyBatis is no longer sponsored by Apache. It is now supported on Google code. The MyBatis framework is a lightweight data mapping framework and persistence API. It couples objects with stored procedures or SQL statements using an XML descriptor.  The Teradata Plug-in for Eclipse allows you to switch between creating projects that use MyBatis or iBatis using the Teradata Project preferences. When you switch to use MyBatis, you can use new features like User Generated Keys.

User Generated Keys are unique identifiers returned from MyBatis during an insert operation. This tutorial will go through creating a Web service using user generated keys with MyBatis.

The iBatis (MyBatis) Stored Procedure Wizard allows you to right click on a Stored Procedure in the Teradata plug-in for Eclipse and quickly create a Web service.

The iBatis Stored Procedure Wizard wraps a Stored Procedure into an iBatis or MyBatis SQL Map. The generated SQL map can then be used to create a Web service or it can be used to create a Java application that uses the iBatis or MyBatis frame works.

Apache Ant allows the user to run a SQL task using JDBC. The Teradata SQL Ant Wizard allows you to wrap selected SQL Statements into an Ant build script from the Eclipse DTP SQL Editor.

The XML Ant build script generated from the Wizard runs the selected SQL statements inside or outside of Eclipse. The Ant build script will facilitate a consistent setup of test or base production environments. This creates a mechanism to run SQL reports and to integrate with build or schedule tools. 

CRUD is defined as the following functions of persistent storage:

  • Create — Insert a row into a Database Table
  • Read — Selecting information from a Database Table
  • Update — Update a row for a Database Table
  • Delete — Remove a row from a Database Table

The iBatis CRUD Wizard will generate the SQL and the iBatis code for all the CRUD operations for a selected database table in the Teradata Plug-in for Eclipse.  The generated iBatis SQL map can then be used to create a Web Service or used to create a Java application that uses the iBatis frame work. This will give you a quick and easy way to create an application that can do basic operations on a Teradata database table.

The iBatis DAO with Web Services Wizard will generate a Web Service from an iBatis SQL Map. The wizard derives all of the information needed from the iBatis SQL Map to generate the following components to create a Web service:

  • DAO (Data Access Object)
  • WSDL (Web Service Definition Language)
  • XSD (XML Schema Definition)
  • Spring Configuration files

The wizard will then use the Eclipse Web Tools Platform (WTP) and Apache Axis to generate the server and client classes for the Web service. The generated classes will include code that supports Query Bands via the Teradata Access Session Manager.


Teradata 13.0 supports a Java User Defined Function (JUDF) capability, which returns an Aggregate. Aggregate functions produce summary results. In the last Article, you were shown how simple it is to create a Table JUDF using Teradata tools. Now, in this article you will be shown how easy it is to create an Aggregate JUDF using the Teradata Plug-in from Eclipse. The Teradata JUDF Wizard and Editor simplify the process of creating, installing and editing an Aggregate JUDF.

Teradata 13.0 supports Table Java User Defined Functions (JUDF). A Table Java User Defined Function returns a table of data a row at a time in a loop to the caller of the function. This article will show you how to use the Teradata Plug-in for Eclipse to quickly create a Table Java User Defined Function.

The iBatis framework is a lightweight data mapping framework and persistence API. It couples objects with stored procedures or SQL statements using a XML descriptor. The iBatis SQL Map wizard allows you to quickly generate an iBatis SQL map for a given SQL statement or stored procedure.

The Teradata project is an extension of a Java project in Eclipse and it can be created by using the Teradata Project Wizard. This new type of project is set up based on Teradata Standards which can be overridden with preferences. The Teradata project will give you access to Teradata libraries. These libraries will give you access to Java Stored procedure utilities and new query banding functionality. The Teradata Plug-in for Eclipse Wizards are enhanced to take advantage of the new functionality from the Teradata libraries.

blog icon Recent Reference

js185064 hasn't created any reference articles.