01: /*
02: * Copyright 2001-2007 Geert Bevin <gbevin[remove] at uwyn dot com>
03: * Distributed under the terms of either:
04: * - the common development and distribution license (CDDL), v1.0; or
05: * - the GNU Lesser General Public License, v2.1 or later
06: * $Id: MOFirstBean.java 3670 2007-02-26 23:31:23Z gbevin $
07: */
08: package com.uwyn.rifetestmodels;
09:
10: import com.uwyn.rife.site.ConstrainedProperty;
11: import com.uwyn.rife.site.MetaData;
12:
13: public class MOFirstBean extends MetaData {
14: private Integer mIdentifier;
15: private MOSecondBean mSecondBean = null;
16: private MOSecondBean mSecondBean2 = null;
17: private MOThirdBean mThirdBean = null;
18: private String mFirstString = null;
19:
20: public MOFirstBean() {
21: }
22:
23: public void activateMetaData() {
24: addConstraint(new ConstrainedProperty("identifier")
25: .identifier(true));
26: addConstraint(new ConstrainedProperty("secondBean").manyToOne());
27: addConstraint(new ConstrainedProperty("secondBean2").manyToOne(
28: MOSecondBean.class, "identifier"));
29: addConstraint(new ConstrainedProperty("thirdBean")
30: .manyToOne(MOThirdBean.class));
31: }
32:
33: public void setIdentifier(Integer identifier) {
34: mIdentifier = identifier;
35: }
36:
37: public Integer getIdentifier() {
38: return mIdentifier;
39: }
40:
41: public void setSecondBean(MOSecondBean secondBean) {
42: mSecondBean = secondBean;
43: }
44:
45: public MOSecondBean getSecondBean() {
46: return mSecondBean;
47: }
48:
49: public void setSecondBean2(MOSecondBean secondBean) {
50: mSecondBean2 = secondBean;
51: }
52:
53: public MOSecondBean getSecondBean2() {
54: return mSecondBean2;
55: }
56:
57: public void setThirdBean(MOThirdBean thirdBean) {
58: mThirdBean = thirdBean;
59: }
60:
61: public MOThirdBean getThirdBean() {
62: return mThirdBean;
63: }
64:
65: public void setFirstString(String firstString) {
66: mFirstString = firstString;
67: }
68:
69: public String getFirstString() {
70: return mFirstString;
71: }
72:
73: public static String getStaticFirstString() {
74: return "test";
75: }
76: }
|