public class EntityDefaults extends Object
Descriptor for the default characteristics of an entity type.
Constructor and Description |
---|
EntityDefaults(EntityType type,
Collection<TypedName<?>> attrs,
List<TypedName<?>> cols,
Class<? extends EntityBuilder> bld,
List<EntityDerivation> derivs)
Construct a set of entity defaults.
|
EntityDefaults(EntityType type,
List<TypedName<?>> cols)
Construct a set of entity defaults where all common attributes are default columns.
|
Modifier and Type | Method and Description |
---|---|
TypedName<?> |
getAttributeDefaults(String name)
Look up the default attribute descriptor (typed name) for a particular attribute name.
|
Set<TypedName<?>> |
getCommonAttributes()
Get the set of attributes that can typically be associated with this entity type.
|
Class<? extends EntityBuilder> |
getDefaultBuilder()
Get the default entity builder for this entity type.
|
List<TypedName<?>> |
getDefaultColumns()
Get the default columns for an entity type.
|
List<EntityDerivation> |
getDefaultDerivations()
Get the default entity derivations.
|
EntityType |
getEntityType()
Get the entity type this set of defaults describes.
|
static EntityDefaults |
lookup(EntityType type)
Look up the defaults for a particular entity type.
|
public EntityDefaults(EntityType type, List<TypedName<?>> cols)
Construct a set of entity defaults where all common attributes are default columns.
type
- The entity type.cols
- The default column layout.public EntityDefaults(EntityType type, Collection<TypedName<?>> attrs, List<TypedName<?>> cols, Class<? extends EntityBuilder> bld, List<EntityDerivation> derivs)
Construct a set of entity defaults.
type
- The entity type.attrs
- The well-known attributes.cols
- The default column layout.@Nullable public static EntityDefaults lookup(EntityType type)
Look up the defaults for a particular entity type.
type
- The entity type.public EntityType getEntityType()
Get the entity type this set of defaults describes.
public TypedName<?> getAttributeDefaults(String name)
Look up the default attribute descriptor (typed name) for a particular attribute name.
name
- The attribute name.null
if the attribute is not predefined for the entity type.public Set<TypedName<?>> getCommonAttributes()
Get the set of attributes that can typically be associated with this entity type.
public List<TypedName<?>> getDefaultColumns()
Get the default columns for an entity type. These are used as defaults when reading entities of this type from a columnar storage format.
public Class<? extends EntityBuilder> getDefaultBuilder()
Get the default entity builder for this entity type.
public List<EntityDerivation> getDefaultDerivations()
Get the default entity derivations.