APIdia Launch Partner
Top Description Fields Constructors Methods
io.github.spannm.jackcess.impl

public Class RelationshipImpl

extends Object
implements Relationship
Class Inheritance
All Implemented Interfaces
io.github.spannm.jackcess.Relationship
Imports
io.github.spannm.jackcess.Column, .Relationship, .Table, io.github.spannm.jackcess.util.ToStringBuilder, java.util.ArrayList, .Collections, .List

Information about a relationship between two tables in the database.

Field Summary

Modifier and TypeField and Description
public static final int
CASCADE_DELETES_FLAG

flag indicating cascading deletes (requires referential integrity)

public static final int
CASCADE_NULL_FLAG

flag indicating cascading null on delete (requires referential integrity)

public static final int
CASCADE_UPDATES_FLAG

flag indicating cascading updates (requires referential integrity)

private final int
flags

the various flags describing this relationship

private final List<Column>
fromColumns

the columns in the "to" table in this relationship (aligned w/ toColumns list)

private final Table
fromTable

the "from" table in this relationship

public static final int
LEFT_OUTER_JOIN_FLAG

flag indicating left outer join

private final String
name

the name of this relationship

public static final int
NO_REFERENTIAL_INTEGRITY_FLAG

flag indicating no referential integrity

public static final int
ONE_TO_ONE_FLAG

flag indicating one-to-one relationship

public static final int
RIGHT_OUTER_JOIN_FLAG

flag indicating right outer join

private final List<Column>
toColumns

the columns in the "from" table in this relationship (aligned w/ toColumns list)

private final Table
toTable

the "to" table in this relationship

Constructor Summary

AccessConstructor and Description
public
RelationshipImpl(String name, Table fromTable, Table toTable, int flags, int numCols)

public
RelationshipImpl(String name, Table fromTable, Table toTable, int flags, List<? extends Column> fromCols, List<? extends Column> toCols)

Method Summary

Modifier and TypeMethod and Description
public boolean
cascadeDeletes()

Implements io.github.spannm.jackcess.Relationship.cascadeDeletes.

Returns true if deletes of "from" table rows cascade to delete the corresponding "to" table rows (only meaningful if hasReferentialIntegrity is true).

public boolean
cascadeNullOnDelete()

Implements io.github.spannm.jackcess.Relationship.cascadeNullOnDelete.

Returns true if deletes of "from" table rows null out the corresponding foreign key in the "to" table rows, rather than deleting them (only meaningful if hasReferentialIntegrity is true).

public boolean
cascadeUpdates()

Implements io.github.spannm.jackcess.Relationship.cascadeUpdates.

Returns true if updates to the "from" table's key are cascaded to the "to" table (only meaningful if hasReferentialIntegrity is true).

public int
public List<Column>
getFromColumns()

Implements io.github.spannm.jackcess.Relationship.getFromColumns.

Returns the columns of getFromTable which participate in this relationship, in the same order as the corresponding columns returned by getToColumns.

public Table
getFromTable()

Implements io.github.spannm.jackcess.Relationship.getFromTable.

Returns the "one" (or referenced) side table of this relationship.

public Relationship.JoinType
getJoinType()

Implements io.github.spannm.jackcess.Relationship.getJoinType.

Returns the join type used when this relationship is followed.

public String
getName()

Implements io.github.spannm.jackcess.Relationship.getName.

Returns the name of this relationship.

public List<Column>
getToColumns()

Implements io.github.spannm.jackcess.Relationship.getToColumns.

Returns the columns of getToTable which participate in this relationship, in the same order as the corresponding columns returned by getFromColumns.

public Table
getToTable()

Implements io.github.spannm.jackcess.Relationship.getToTable.

Returns the "many" (or referencing) side table of this relationship.

private boolean
hasFlag(int flagMask)

public boolean
hasReferentialIntegrity()

Implements io.github.spannm.jackcess.Relationship.hasReferentialIntegrity.

Returns true if this relationship enforces referential integrity.

public boolean
isLeftOuterJoin()

Implements io.github.spannm.jackcess.Relationship.isLeftOuterJoin.

Returns true if this relationship is enforced as a left outer join.

public boolean
isOneToOne()

Implements io.github.spannm.jackcess.Relationship.isOneToOne.

Returns true if this relationship enforces a one-to-one association, false if one-to-many.

public boolean
isRightOuterJoin()

Implements io.github.spannm.jackcess.Relationship.isRightOuterJoin.

Returns true if this relationship is enforced as a right outer join.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

CASCADE_DELETES_FLAGback to summary
public static final int CASCADE_DELETES_FLAG

flag indicating cascading deletes (requires referential integrity)

CASCADE_NULL_FLAGback to summary
public static final int CASCADE_NULL_FLAG

flag indicating cascading null on delete (requires referential integrity)

CASCADE_UPDATES_FLAGback to summary
public static final int CASCADE_UPDATES_FLAG

flag indicating cascading updates (requires referential integrity)

flagsback to summary
private final int flags

the various flags describing this relationship

fromColumnsback to summary
private final List<Column> fromColumns

the columns in the "to" table in this relationship (aligned w/ toColumns list)

fromTableback to summary
private final Table fromTable

the "from" table in this relationship

LEFT_OUTER_JOIN_FLAGback to summary
public static final int LEFT_OUTER_JOIN_FLAG

flag indicating left outer join

nameback to summary
private final String name

the name of this relationship

NO_REFERENTIAL_INTEGRITY_FLAGback to summary
public static final int NO_REFERENTIAL_INTEGRITY_FLAG

flag indicating no referential integrity

ONE_TO_ONE_FLAGback to summary
public static final int ONE_TO_ONE_FLAG

flag indicating one-to-one relationship

RIGHT_OUTER_JOIN_FLAGback to summary
public static final int RIGHT_OUTER_JOIN_FLAG

flag indicating right outer join

toColumnsback to summary
private final List<Column> toColumns

the columns in the "from" table in this relationship (aligned w/ toColumns list)

toTableback to summary
private final Table toTable

the "to" table in this relationship

Constructor Detail

RelationshipImplback to summary
public RelationshipImpl(String name, Table fromTable, Table toTable, int flags, int numCols)
RelationshipImplback to summary
public RelationshipImpl(String name, Table fromTable, Table toTable, int flags, List<? extends Column> fromCols, List<? extends Column> toCols)

Method Detail

cascadeDeletesback to summary
public boolean cascadeDeletes()

Implements io.github.spannm.jackcess.Relationship.cascadeDeletes.

Doc from io.github.spannm.jackcess.Relationship.cascadeDeletes.

Returns true if deletes of "from" table rows cascade to delete the corresponding "to" table rows (only meaningful if hasReferentialIntegrity is true).

Annotations
@Override
cascadeNullOnDeleteback to summary
public boolean cascadeNullOnDelete()

Implements io.github.spannm.jackcess.Relationship.cascadeNullOnDelete.

Doc from io.github.spannm.jackcess.Relationship.cascadeNullOnDelete.

Returns true if deletes of "from" table rows null out the corresponding foreign key in the "to" table rows, rather than deleting them (only meaningful if hasReferentialIntegrity is true).

Annotations
@Override
cascadeUpdatesback to summary
public boolean cascadeUpdates()

Implements io.github.spannm.jackcess.Relationship.cascadeUpdates.

Doc from io.github.spannm.jackcess.Relationship.cascadeUpdates.

Returns true if updates to the "from" table's key are cascaded to the "to" table (only meaningful if hasReferentialIntegrity is true).

Annotations
@Override
getFlagsback to summary
public int getFlags()
getFromColumnsback to summary
public List<Column> getFromColumns()

Implements io.github.spannm.jackcess.Relationship.getFromColumns.

Doc from io.github.spannm.jackcess.Relationship.getFromColumns.

Returns the columns of getFromTable which participate in this relationship, in the same order as the corresponding columns returned by getToColumns.

Annotations
@Override
getFromTableback to summary
public Table getFromTable()

Implements io.github.spannm.jackcess.Relationship.getFromTable.

Doc from io.github.spannm.jackcess.Relationship.getFromTable.

Returns the "one" (or referenced) side table of this relationship.

Annotations
@Override
getJoinTypeback to summary
public Relationship.JoinType getJoinType()

Implements io.github.spannm.jackcess.Relationship.getJoinType.

Doc from io.github.spannm.jackcess.Relationship.getJoinType.

Returns the join type used when this relationship is followed.

Annotations
@Override
getNameback to summary
public String getName()

Implements io.github.spannm.jackcess.Relationship.getName.

Doc from io.github.spannm.jackcess.Relationship.getName.

Returns the name of this relationship.

Annotations
@Override
getToColumnsback to summary
public List<Column> getToColumns()

Implements io.github.spannm.jackcess.Relationship.getToColumns.

Doc from io.github.spannm.jackcess.Relationship.getToColumns.

Returns the columns of getToTable which participate in this relationship, in the same order as the corresponding columns returned by getFromColumns.

Annotations
@Override
getToTableback to summary
public Table getToTable()

Implements io.github.spannm.jackcess.Relationship.getToTable.

Doc from io.github.spannm.jackcess.Relationship.getToTable.

Returns the "many" (or referencing) side table of this relationship.

Annotations
@Override
hasFlagback to summary
private boolean hasFlag(int flagMask)
hasReferentialIntegrityback to summary
public boolean hasReferentialIntegrity()

Implements io.github.spannm.jackcess.Relationship.hasReferentialIntegrity.

Doc from io.github.spannm.jackcess.Relationship.hasReferentialIntegrity.

Returns true if this relationship enforces referential integrity.

Annotations
@Override
isLeftOuterJoinback to summary
public boolean isLeftOuterJoin()

Implements io.github.spannm.jackcess.Relationship.isLeftOuterJoin.

Doc from io.github.spannm.jackcess.Relationship.isLeftOuterJoin.

Returns true if this relationship is enforced as a left outer join.

Annotations
@Override
isOneToOneback to summary
public boolean isOneToOne()

Implements io.github.spannm.jackcess.Relationship.isOneToOne.

Doc from io.github.spannm.jackcess.Relationship.isOneToOne.

Returns true if this relationship enforces a one-to-one association, false if one-to-many.

Annotations
@Override
isRightOuterJoinback to summary
public boolean isRightOuterJoin()

Implements io.github.spannm.jackcess.Relationship.isRightOuterJoin.

Doc from io.github.spannm.jackcess.Relationship.isRightOuterJoin.

Returns true if this relationship is enforced as a right outer join.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override