01: /*
02: * Copyright 2001-2007 Geert Bevin <gbevin[remove] at uwyn dot com> and
03: * JR Boyens <gnu-jrb[remove] at gmx dot net>
04: * Distributed under the terms of either:
05: * - the common development and distribution license (CDDL), v1.0; or
06: * - the GNU Lesser General Public License, v2.1 or later
07: * $Id: ConstrainedBean.java 3634 2007-01-08 21:42:24Z gbevin $
08: */
09: package com.uwyn.rife.database.querymanagers.generic.beans;
10:
11: import com.uwyn.rife.database.querymanagers.generic.beans.LinkBean;
12: import com.uwyn.rife.site.ConstrainedProperty;
13: import com.uwyn.rife.site.MetaData;
14:
15: public class ConstrainedBean extends MetaData {
16: private int mIdentifier = -1;
17: private Integer mLinkBean = null;
18: private String mTestString = null;
19:
20: public ConstrainedBean() {
21: }
22:
23: public void activateMetaData() {
24: addConstraint(new ConstrainedProperty("identifier")
25: .identifier(true));
26: addConstraint(new ConstrainedProperty("linkBean").manyToOne(
27: LinkBean.class, "id"));
28: }
29:
30: public void setIdentifier(int identifier) {
31: mIdentifier = identifier;
32: }
33:
34: public int getIdentifier() {
35: return mIdentifier;
36: }
37:
38: public void setLinkBean(Integer linkBean) {
39: mLinkBean = linkBean;
40: }
41:
42: public Integer getLinkBean() {
43: return mLinkBean;
44: }
45:
46: public void setTestString(String testString) {
47: this .mTestString = testString;
48: }
49:
50: public String getTestString() {
51: return mTestString;
52: }
53: }
|