Package io.inversion
Class Relationship
java.lang.Object
io.inversion.Relationship
- All Implemented Interfaces:
Serializable
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRelationship(String name, String type, Collection collection, Collection related, Index fkIndex1, Index fkIndex2) -
Method Summary
Modifier and TypeMethodDescriptionbuildForeignKeyFromPrimaryKey(Map<String, Object> primaryKey) buildPrimaryKeyFromForeignKey(Map<String, Object> foreignKey) booleangetName()getType()booleanbooleanbooleanbooleanbooleanbooleantoString()withCollection(Collection collection) withExclude(boolean exclude) withFkIndex1(Index fkIndex1) withFkIndex2(Index fkIndex2) withRelated(Collection related)
-
Field Details
-
REL_ONE_TO_ONE_PARENT
- See Also:
-
REL_ONE_TO_ONE_CHILD
- See Also:
-
REL_MANY_TO_ONE
- See Also:
-
REL_ONE_TO_MANY
- See Also:
-
REL_MANY_TO_MANY
- See Also:
-
name
-
type
-
fkIndex1
-
fkIndex2
-
collection
-
exclude
protected boolean exclude
-
-
Constructor Details
-
Relationship
public Relationship() -
Relationship
public Relationship(String name, String type, Collection collection, Collection related, Index fkIndex1, Index fkIndex2)
-
-
Method Details
-
isExclude
public boolean isExclude() -
withExclude
-
getCollection
- Returns:
- the collection
-
withCollection
-
getRelated
- Returns:
- the related
-
getInverse
-
withRelated
- Parameters:
related- the related to set- Returns:
- this
-
isManyToMany
public boolean isManyToMany() -
isOneToMany
public boolean isOneToMany() -
isManyToOne
public boolean isManyToOne() -
isOneToOneParent
public boolean isOneToOneParent() -
isOneToOneChild
public boolean isOneToOneChild() -
getName
- Returns:
- the name
-
withName
- Parameters:
name- the name to set- Returns:
- this
-
equals
-
toString
-
getType
- Returns:
- the type
-
withType
- Parameters:
type- the type to set- Returns:
- this
-
getFkIndex1
-
withFkIndex1
-
getFkIndex2
-
withFkIndex2
-
getPrimaryKeyTable1
-
getFk1Col1
- Returns:
- the fkCol1
-
getFk2Col1
- Returns:
- the fkCol2
-
buildPrimaryKeyFromForeignKey
-
buildForeignKeyFromPrimaryKey
-