ManagedAttributeDescription class Null safety

Stores the specifics of database columns in ManagedObjects as indicated by Column.

This class is used internally to manage data models. For specifying these attributes, see Column.

Attributes are the scalar values of a ManagedObject (as opposed to relationship values, which are ManagedRelationshipDescription instances).

Each scalar property ManagedObject object persists is described by an instance of ManagedAttributeDescription. This class adds two properties to ManagedPropertyDescription that are only valid for non-relationship types, isPrimaryKey and defaultValue.

Inheritance

Constructors

ManagedAttributeDescription(ManagedEntity entity, String name, ManagedType type, Type? declaredType, {Serialize? transientStatus, bool primaryKey = false, String? defaultValue, bool unique = false, bool indexed = false, bool nullable = false, bool includedInDefaultResultSet = true, bool autoincrement = false, List<ManagedValidator?> validators = const [], ResponseModel? responseModel, ResponseKey? responseKey})
ManagedAttributeDescription.transient(ManagedEntity entity, String name, ManagedType type, Type declaredType, Serialize? transientStatus, {ResponseKey? responseKey})

Properties

autoincrement bool
Whether or not this property should use an auto-incrementing scheme.
finalinherited
declaredType Type?
The type of the variable that this property represents.
finalinherited
defaultValue String?
The default value for this attribute.
final
entity ManagedEntity
A reference to the ManagedEntity that contains this property.
finalinherited
enumerationValueMap Map<String, dynamic>
Contains lookup table for string value of an enumeration to the enumerated value.
read-only
hashCode int
The hash code for this object.
read-onlyinherited
isEnumeratedValue bool
Whether or not this attribute is represented by a Dart enum.
read-only
isIncludedInDefaultResultSet bool
Whether or not this property is returned in the default set of Query.returningProperties.
finalinherited
isIndexed bool
Whether or not this property should be indexed by a PersistentStore.
finalinherited
isNullable bool
Whether or not this property can be null.
finalinherited
isPrimaryKey bool
Whether or not this attribute is the primary key for its ManagedEntity.
final
isPrivate bool
Whether or not this attribute is private or not.
read-onlyinherited
isTransient bool
Whether or not this attribute is backed directly by the database.
read-only
isUnique bool
Whether or not this property must be unique to across all instances represented by entity.
finalinherited
name String
The identifying name of this property.
finalinherited
responseKey ResponseKey?
finalinherited
responseModel ResponseModel?
finalinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
transientStatus Serialize?
The validity of a transient attribute as input, output or both.
final
type ManagedType?
The value type of this property.
finalinherited
validators List<ManagedValidator?>
ManagedValidators for this instance.
read-onlyinherited

Methods

convertFromPrimitiveValue(dynamic value) → dynamic
Converts a value to a more complex value from a primitive value according to this instance's definition.
override
convertToPrimitiveValue(dynamic value) → dynamic
Converts a value from a more complex value into a primitive value according to this instance's definition.
override
documentSchemaObject(APIDocumentContext context) → APISchemaObject
Returns an APISchemaObject that represents this property.
override
isAssignableWith(dynamic dartValue) bool
Whether or not a the argument can be assigned to this property.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

make<T>(ManagedEntity entity, String name, ManagedType type, {Serialize? transientStatus, bool primaryKey = false, String? defaultValue, bool unique = false, bool indexed = false, bool nullable = false, bool includedInDefaultResultSet = true, bool autoincrement = false, List<ManagedValidator> validators = const [], ResponseKey? responseKey, ResponseModel? responseModel}) ManagedAttributeDescription