KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > jdon > model > ModelForm


1 /**
2  * Copyright 2003-2006 the original author or authors.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6
7        http://www.apache.org/licenses/LICENSE-2.0
8
9   * Unless required by applicable law or agreed to in writing, software
10   * distributed under the License is distributed on an "AS IS" BASIS,
11   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12   * See the License for the specific language governing permissions and
13   * limitations under the License.
14   */

15
16 package com.jdon.model;
17
18 import com.jdon.strutsutil.ViewForm;
19
20
21 /**
22  * the model mapping in the presentation layer.
23  * if you need jdon's CRUD, your all actionForm must extends this class.
24  * donot need extends Struts's ActionForm again.
25  *
26  * @author banq
27  */

28 public abstract class ModelForm extends ViewForm {
29
30   public final static String JavaDoc VIEW_STR = "view";
31   public final static String JavaDoc CREATE_STR = "create";
32   public final static String JavaDoc EDIT_STR = "edit";
33   public final static String JavaDoc UPDATE_STR = "update";
34   public final static String JavaDoc DELETE_STR = "delete";
35   public final static String JavaDoc ADD_STR = "add";
36   public final static String JavaDoc REMOVE_STR = "remove";
37
38
39   private String JavaDoc action;
40                          
41
42   public void setAction(String JavaDoc action) {
43     this.action = action;
44   }
45   public String JavaDoc getAction() {
46     return action;
47   }
48   
49   public String JavaDoc getJdonActionType() {
50     return action;
51   }
52   public void setJdonActionType(String JavaDoc jdonActionType) {
53     this.action = jdonActionType;
54   }
55
56   public String JavaDoc getMethod() {
57       return action;
58     }
59     public void setMethod(String JavaDoc method) {
60       this.action = method;
61     }
62   
63   
64 }
65
Popular Tags