diff options
author | James Ahlborn <jtahlborn@yahoo.com> | 2016-07-19 03:45:53 +0000 |
---|---|---|
committer | James Ahlborn <jtahlborn@yahoo.com> | 2016-07-19 03:45:53 +0000 |
commit | 060172ce30489655622702db9f3c6ce119636735 (patch) | |
tree | 638c511e967525b90b39e7dad4d2c130f5a50c8e /src/main/java/com/healthmarketscience/jackcess/impl/RelationshipImpl.java | |
parent | f2578a5a48195e58c2ce37b274c05f4514276bcc (diff) | |
download | jackcess-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.java | 23 |
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); |