Module is.codion.framework.domain
Interface ForeignKey.ForeignKeyDefiner
- All Superinterfaces:
Attribute.AttributeDefiner<Entity>
- Enclosing interface:
- ForeignKey
Provides
ForeignKeyDefinition.Builder instances.-
Method Summary
Modifier and TypeMethodDescriptionInstantiates aForeignKeyDefinition.Builderinstance, using the fetch depth specified byForeignKeyDefinition.FOREIGN_KEY_FETCH_DEPTHforeignKey(int fetchDepth) Instantiates aForeignKeyDefinition.Builderinstance.Instantiates aForeignKeyDefinition.Builderinstance, using the fetch depth specified byForeignKeyDefinition.FOREIGN_KEY_FETCH_DEPTH.softForeignKey(int fetchDepth) Instantiates aForeignKeyDefinition.Builderinstance.Methods inherited from interface is.codion.framework.domain.entity.attribute.Attribute.AttributeDefiner
attribute, denormalized, derived
-
Method Details
-
foreignKey
ForeignKeyDefinition.Builder foreignKey()Instantiates aForeignKeyDefinition.Builderinstance, using the fetch depth specified byForeignKeyDefinition.FOREIGN_KEY_FETCH_DEPTH- Returns:
- a new
ForeignKeyDefinition.Builder - See Also:
-
foreignKey
Instantiates aForeignKeyDefinition.Builderinstance.Fetch depth: -1: the full foreign key graph of the referenced entity is fetched. 0: the referenced entity not fetched. 1: the referenced entity is fetched, without any foreign key references. 2: the referenced entity is fetched, with a single level of foreign key references. 3: the referenced entity is fetched, with two levels of foreign key references. 4: etc...
- Parameters:
fetchDepth- the number of levels of foreign key references to fetch for this foreign key- Returns:
- a new
ForeignKeyDefinition.Builder - Throws:
IllegalArgumentException- in case fetch depth is less than 0
-
softForeignKey
ForeignKeyDefinition.Builder softForeignKey()Instantiates aForeignKeyDefinition.Builderinstance, using the fetch depth specified byForeignKeyDefinition.FOREIGN_KEY_FETCH_DEPTH. This foreign key is marked as being soft, that is, not based on a physical (table) foreign key and should not prevent deletion- Returns:
- a new
ForeignKeyDefinition.Builder - See Also:
-
softForeignKey
Instantiates aForeignKeyDefinition.Builderinstance. This foreign key is marked as being soft, that is, not based on a physical (table) foreign key and should not prevent deletionFetch depth: -1: the full foreign key graph of the referenced entity is fetched. 0: the referenced entity not fetched. 1: the referenced entity is fetched, without any foreign key references. 2: the referenced entity is fetched, with a single level of foreign key references. 3: the referenced entity is fetched, with two levels of foreign key references. 4: etc...
- Parameters:
fetchDepth- the number of levels of foreign key references to fetch for this foreign key- Returns:
- a new
ForeignKeyDefinition.Builder - Throws:
IllegalArgumentException- in case fetch depth is less than 0
-