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: ManyToOneDeclaration.java 3760 2007-05-14 13:37:33Z gbevin $
08: */
09: package com.uwyn.rife.database.querymanagers.generic;
10:
11: public class ManyToOneDeclaration {
12: private boolean mIsBasic = true;
13: private Class mAssociationType;
14: private String mAssociationTable;
15: private String mAssociationColumn;
16: private GenericQueryManager mAssociationManager;
17:
18: public void setIsBasic(boolean isBasic) {
19: mIsBasic = isBasic;
20: }
21:
22: public ManyToOneDeclaration isBasic(boolean isBasic) {
23: setIsBasic(isBasic);
24:
25: return this ;
26: }
27:
28: public boolean isBasic() {
29: return mIsBasic;
30: }
31:
32: public void setAssociationType(Class type) {
33: mAssociationType = type;
34: }
35:
36: public ManyToOneDeclaration associationType(Class type) {
37: setAssociationType(type);
38:
39: return this ;
40: }
41:
42: public Class getAssociationType() {
43: return mAssociationType;
44: }
45:
46: public void setAssociationTable(String associationTable) {
47: mAssociationTable = associationTable;
48: }
49:
50: public ManyToOneDeclaration associationTable(String associationTable) {
51: setAssociationTable(associationTable);
52:
53: return this ;
54: }
55:
56: public String getAssociationTable() {
57: return mAssociationTable;
58: }
59:
60: public void setAssociationColumn(String associationColumn) {
61: mAssociationColumn = associationColumn;
62: }
63:
64: public ManyToOneDeclaration associationColumn(
65: String associationColumn) {
66: setAssociationColumn(associationColumn);
67:
68: return this ;
69: }
70:
71: public String getAssociationColumn() {
72: return mAssociationColumn;
73: }
74:
75: public void setAssociationManager(
76: GenericQueryManager associationManager) {
77: mAssociationManager = associationManager;
78: }
79:
80: public ManyToOneDeclaration associationManager(
81: GenericQueryManager associationManager) {
82: setAssociationManager(associationManager);
83:
84: return this ;
85: }
86:
87: public GenericQueryManager getAssociationManager() {
88: return mAssociationManager;
89: }
90: }
|