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: ManyToOneAssociationDeclaration.java 3716 2007-04-11 06:21:18Z gbevin $
08: */
09: package com.uwyn.rife.database.querymanagers.generic;
10:
11: public class ManyToOneAssociationDeclaration {
12: private Class mMainType;
13: private String mMainProperty;
14: private Class mCollectionType;
15: private ManyToOneDeclaration mMainDeclaration;
16:
17: public void setMainType(Class type) {
18: mMainType = type;
19: }
20:
21: public ManyToOneAssociationDeclaration mainType(Class type) {
22: setMainType(type);
23:
24: return this ;
25: }
26:
27: public Class getMainType() {
28: return mMainType;
29: }
30:
31: public void setMainProperty(String mainProperty) {
32: mMainProperty = mainProperty;
33: }
34:
35: public ManyToOneAssociationDeclaration mainProperty(
36: String mainProperty) {
37: setMainProperty(mainProperty);
38: return this ;
39: }
40:
41: public String getMainProperty() {
42: return mMainProperty;
43: }
44:
45: public void setCollectionType(Class type) {
46: mCollectionType = type;
47: }
48:
49: public ManyToOneAssociationDeclaration collectionType(Class type) {
50: setCollectionType(type);
51:
52: return this ;
53: }
54:
55: public Class getCollectionType() {
56: return mCollectionType;
57: }
58:
59: public void setMainDeclaration(ManyToOneDeclaration mainDeclaration) {
60: mMainDeclaration = mainDeclaration;
61: }
62:
63: public ManyToOneAssociationDeclaration mainDeclaration(
64: ManyToOneDeclaration mainDeclaration) {
65: setMainDeclaration(mainDeclaration);
66:
67: return this ;
68: }
69:
70: public ManyToOneDeclaration getMainDeclaration() {
71: return mMainDeclaration;
72: }
73: }
|