KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > terracotta > dso > views > TransientFieldsWrapper


1 /*
2  * All content copyright (c) 2003-2007 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package org.terracotta.dso.views;
5
6 import com.terracottatech.config.DsoApplication;
7 import com.terracottatech.config.TransientFields;
8
9 public class TransientFieldsWrapper {
10   private DsoApplication fApp;
11   
12   TransientFieldsWrapper(DsoApplication dsoApp) {
13     fApp = dsoApp;
14   }
15   
16   int sizeOfFieldNameArray() {
17     TransientFields transientFields = fApp.getTransientFields();
18     return transientFields != null ? transientFields.sizeOfFieldNameArray() : 0;
19   }
20   
21   String JavaDoc getFieldNameArray(int i) {
22     TransientFields transientFields = fApp.getTransientFields();
23     return transientFields != null ? transientFields.getFieldNameArray(i) : null;
24   }
25   
26   void removeFieldName(int i) {
27     TransientFields transientFields = fApp.getTransientFields();
28     if(transientFields != null) {
29       transientFields.removeFieldName(i);
30     }
31     if(sizeOfFieldNameArray() == 0) {
32       fApp.unsetTransientFields();
33     }
34   }
35 }
36
Popular Tags