aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/com/healthmarketscience/jackcess/impl/RelationshipImpl.java
diff options
context:
space:
mode:
authorJames Ahlborn <jtahlborn@yahoo.com>2016-07-19 03:45:53 +0000
committerJames Ahlborn <jtahlborn@yahoo.com>2016-07-19 03:45:53 +0000
commit060172ce30489655622702db9f3c6ce119636735 (patch)
tree638c511e967525b90b39e7dad4d2c130f5a50c8e /src/main/java/com/healthmarketscience/jackcess/impl/RelationshipImpl.java
parentf2578a5a48195e58c2ce37b274c05f4514276bcc (diff)
downloadjackcess-060172ce30489655622702db9f3c6ce119636735.tar.gz
jackcess-060172ce30489655622702db9f3c6ce119636735.zip
reorg to prep for RelationshipBuilder; move remaining table creation logic from TableBuilder to TableCreator
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/branches/mutateops@1002 f203690c-595d-4dc9-a70b-905162fa7fd2
Diffstat (limited to 'src/main/java/com/healthmarketscience/jackcess/impl/RelationshipImpl.java')
-rw-r--r--src/main/java/com/healthmarketscience/jackcess/impl/RelationshipImpl.java23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/main/java/com/healthmarketscience/jackcess/impl/RelationshipImpl.java b/src/main/java/com/healthmarketscience/jackcess/impl/RelationshipImpl.java
index 8775448..4563992 100644
--- a/src/main/java/com/healthmarketscience/jackcess/impl/RelationshipImpl.java
+++ b/src/main/java/com/healthmarketscience/jackcess/impl/RelationshipImpl.java
@@ -33,20 +33,20 @@ public class RelationshipImpl implements Relationship
{
/** flag indicating one-to-one relationship */
- private static final int ONE_TO_ONE_FLAG = 0x00000001;
+ public static final int ONE_TO_ONE_FLAG = 0x00000001;
/** flag indicating no referential integrity */
- private static final int NO_REFERENTIAL_INTEGRITY_FLAG = 0x00000002;
+ public static final int NO_REFERENTIAL_INTEGRITY_FLAG = 0x00000002;
/** flag indicating cascading updates (requires referential integrity) */
- private static final int CASCADE_UPDATES_FLAG = 0x00000100;
+ public static final int CASCADE_UPDATES_FLAG = 0x00000100;
/** flag indicating cascading deletes (requires referential integrity) */
- private static final int CASCADE_DELETES_FLAG = 0x00001000;
+ public static final int CASCADE_DELETES_FLAG = 0x00001000;
/** flag indicating cascading null on delete (requires referential
integrity) */
- private static final int CASCADE_NULL_FLAG = 0x00002000;
+ public static final int CASCADE_NULL_FLAG = 0x00002000;
/** flag indicating left outer join */
- private static final int LEFT_OUTER_JOIN_FLAG = 0x01000000;
+ public static final int LEFT_OUTER_JOIN_FLAG = 0x01000000;
/** flag indicating right outer join */
- private static final int RIGHT_OUTER_JOIN_FLAG = 0x02000000;
+ public static final int RIGHT_OUTER_JOIN_FLAG = 0x02000000;
/** the name of this relationship */
private final String _name;
@@ -127,6 +127,15 @@ public class RelationshipImpl implements Relationship
public boolean isRightOuterJoin() {
return hasFlag(RIGHT_OUTER_JOIN_FLAG);
}
+
+ public JoinType getJoinType() {
+ if(isLeftOuterJoin()) {
+ return JoinType.LEFT_OUTER;
+ } else if(isRightOuterJoin()) {
+ return JoinType.RIGHT_OUTER;
+ }
+ return JoinType.INNER;
+ }
private boolean hasFlag(int flagMask) {
return((getFlags() & flagMask) != 0);