KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > nightlabs > ipanema > person > TextPersonDataField


1 /*
2  * Created on Nov 21, 2004
3  * by alex
4  *
5  */

6 package com.nightlabs.ipanema.person;
7
8 /**
9  * @author Alexander Bieber <alex[AT]nightlabs[DOT]de>
10  */

11 /**
12  * @jdo.persistence-capable
13  * identity-type = "application"
14  * persistence-capable-superclass="com.nightlabs.ipanema.person.AbstractPersonDataField"
15  * detachable = "true"
16  *
17  * @jdo.inheritance strategy = "new-table"
18  *
19  * @jdo.fetch-group name="FetchGroupsPerson.fullData" fetch-group-names="default, values"
20  */

21 public class TextPersonDataField extends AbstractPersonDataField {
22     
23     /**
24      *
25      */

26     public TextPersonDataField() {
27         super();
28     }
29     /**
30      * @param _personDataBlock
31      * @param _personStructField
32      */

33     public TextPersonDataField(PersonDataBlock _personDataBlock,
34             AbstractPersonStructField _personStructField) {
35         super(_personDataBlock, _personStructField);
36     }
37     /**
38      * @jdo.field persistence-modifier="persistent"
39      */

40     protected String JavaDoc text;
41     
42     /**
43      * Returns the value of this TextPersonDataField
44      * @return
45      */

46     public String JavaDoc getText() {
47         return text;
48     }
49     /**
50      * Sets the value of this TextPersonDataField
51      * @param text The value to set
52      */

53     public void setText(String JavaDoc text) {
54         this.text = text;
55     }
56     /**
57      * @see com.nightlabs.ipanema.person.AbstractPersonDataField#isEmpty()
58      */

59     public boolean isEmpty() {
60         if (getText() == null)
61             return true;
62         return getText().equals("");
63     }
64     /**
65      * @see com.nightlabs.ipanema.person.AbstractPersonDataField#localizedToString(java.lang.String)
66      */

67     public String JavaDoc localizedToString(String JavaDoc languageID) {
68         return getText();
69     }
70 }
71
Popular Tags