You are here
Home > Programming > Java > Apache Velocity Create Template DAO

Apache Velocity Create Template DAO

In computer software, a data access object (DAO) is an object that provides an abstract interface to some type of database or other persistence mechanism. By mapping application calls to the persistence layer, DAO provide some specific data operations without exposing details of the database. This isolation supports the Single responsibility principle. It separates what data accesses the application needs, in terms of domain-specific objects and data types (the public interface of the DAO), from how these needs can be satisfied with a specific DBMS, database schema, etc. sumber: wiki

Kali ini kita akan belajar untuk membuat template class DAO, untuk memulai-nya kita harus pelajari dulu Apache Velocity Generate POJO. pembahasan kali ini kita beri judul:

Apache Velocity Create Template DAO

Mari kita ikuti langkah-langkah pembelajaran Apache Velocity Create Template DAO berikut ini:

1). Karena artikel ini melanjutkan pembahasan Apache Velocity Generate POJO maka kita buka projek “Belajar Apache Velocity” dengan editor eclipse

2). Create file “dao.vm” simpan di folder “resources”

3). Buka file “dao.vm” lalu ketikkan coding dibawah ini:

4). Buka Class “GeneratorUtility”, lalu tambahkan method-method terlihat seperti coding dibawah ini:

5). Kita lanjutka ke artikel Apache Velocity Generate DAO

 

Semoga Membantu,

Salam berbagi,
Yulianto Wijaksana

Leave a Reply

Top