public class EntityDerivation
extends java.lang.Object
Describe a derivation of one entity from another. This is used to extract bare entities from references in other entity types, e.g. user IDs in ratings, so that you don’t have to have explicit data source for every type of entity in the system.
Modifier and Type | Method and Description |
---|---|
static EntityDerivation |
create(EntityType t,
EntityType src,
TypedName<java.lang.Long> attr)
Create a new entity derivation.
|
static EntityDerivation |
fromJSON(com.fasterxml.jackson.databind.JsonNode node)
Parse an entity derivation from a JSON node.
|
TypedName<java.lang.Long> |
getAttribute()
Get the source attribute for the derivation.
|
EntityType |
getSourceType()
Get the source types for the derivation.
|
EntityType |
getType()
Get the entity type to be derived.
|
public static EntityDerivation create(EntityType t, EntityType src, TypedName<java.lang.Long> attr)
Create a new entity derivation.
t
- The derived entity type.src
- The source type.attr
- The attribute to derive from.public EntityType getType()
Get the entity type to be derived.
public EntityType getSourceType()
Get the source types for the derivation.
public TypedName<java.lang.Long> getAttribute()
Get the source attribute for the derivation.
public static EntityDerivation fromJSON(com.fasterxml.jackson.databind.JsonNode node)
Parse an entity derivation from a JSON node.
node
- The JSON node.