public class EntityDefaults
extends java.lang.Object
Descriptor for the default characteristics of an entity type.
Constructor and Description |
---|
EntityDefaults(EntityType type,
java.util.Collection<TypedName<?>> attrs,
java.util.List<TypedName<?>> cols,
java.lang.Class<? extends EntityBuilder> bld,
java.util.List<EntityDerivation> derivs)
Construct a set of entity defaults.
|
EntityDefaults(EntityType type,
java.util.List<TypedName<?>> cols)
Construct a set of entity defaults where all common attributes are default columns.
|
Modifier and Type | Method and Description |
---|---|
TypedName<?> |
getAttributeDefaults(java.lang.String name)
Look up the default attribute descriptor (typed name) for a particular attribute name.
|
java.util.Set<TypedName<?>> |
getCommonAttributes()
Get the set of attributes that can typically be associated with this entity type.
|
java.lang.Class<? extends EntityBuilder> |
getDefaultBuilder()
Get the default entity builder for this entity type.
|
java.util.List<TypedName<?>> |
getDefaultColumns()
Get the default columns for an entity type.
|
java.util.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, java.util.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, java.util.Collection<TypedName<?>> attrs, java.util.List<TypedName<?>> cols, java.lang.Class<? extends EntityBuilder> bld, java.util.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(java.lang.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 java.util.Set<TypedName<?>> getCommonAttributes()
Get the set of attributes that can typically be associated with this entity type.
public java.util.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 java.lang.Class<? extends EntityBuilder> getDefaultBuilder()
Get the default entity builder for this entity type.
public java.util.List<EntityDerivation> getDefaultDerivations()
Get the default entity derivations.