KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > snapper > business > LanguageListImpl


1 /*
2  * snapper
3  *
4  * Enhydra super-servlet business object
5  *
6  */

7
8 package org.enhydra.snapper.business;
9
10 // Enhydra SuperServlet specification imports
11
import org.enhydra.dods.DODS;
12 import org.enhydra.snapper.spec.*;
13 import org.enhydra.snapper.data.*;
14
15 import com.lutris.appserver.server.sql.DBTransaction;
16
17 // Standard imports
18
//import java.text.DateFormat;
19

20 public class LanguageListImpl implements LanguageList {
21     
22     
23     public Language[] getList(DBTransaction dbt){
24         Language[] languageArray = null;
25         try {
26             dbt = DODS.getDatabaseManager().createTransaction();
27             LanguageQuery query = new LanguageQuery(dbt);
28             //set query
29
//query.setQueryOwner(PersonDO.createExisting(owner.getHandle()));
30
// Order discs alphabetically by artist
31
query.addOrderByNAME();
32             LanguageDO[] DOarray = query.getDOArray();
33             languageArray = new LanguageImpl[ DOarray.length ];
34             for ( int i = 0; i < DOarray.length; i++ )
35                 languageArray[i] = new LanguageImpl(DOarray[i]);
36         }catch(Exception JavaDoc ex) {
37             System.out.println(ex.toString());
38         }
39         
40         
41         return languageArray;
42     }
43     
44 }
45
Popular Tags