Journal

class app.portfolio.journal.journal.Journal[source]

Bases: LoggableHierarchicalModel, EntityImpl[Annotated[MutableSet[Annotation], InstanceOf()], MutableSet[Uid]]

Inheritance diagram of Journal

Inheritance Diagram for Journal

Methods

add_dependency(record_or_uid)

can_modify(field)

commit()

delete()

freeze()

get_diff()

get_field(field, *[, wrap])

get_original_field(field)

has_field(field)

is_computed_field(field)

is_field_alias(field)

is_field_edited(field)

is_model_field(field)

iter_children_uids()

mark_superseded()

model_post_init(context)

notify_dependents()

on_journalled_collection_edit(collection)

remove_dependency(record_or_uid)

set_field(field, value)

sort_key()

update(**kwargs)

Attributes

PROPAGATE_TO_CHILDREN

children_uids

committed

deleted

dirty

entity

entity_or_none

extra_dependencies

frozen

has_diff

instance_name

is_journal

marked_for_deletion

model_config

Configuration for the model, should be a dictionary conforming to ConfigDict.

notified_dependents

session

superseded

uid

version

record

instance_parent_weakref

PROPAGATE_TO_CHILDREN: ClassVar[bool] = False
add_dependency(record_or_uid: EntityRecord | Uid) None[source]
Parameters:

record_or_uid (EntityRecord | Uid)

Return type:

None

can_modify(field: str) bool[source]
Parameters:

field (str)

Return type:

bool

property children_uids: Iterable[Uid][source]
commit() EntityRecord | None[source]
Return type:

EntityRecord | None

property committed: bool
delete() None[source]
Return type:

None

property deleted: bool
property dirty: bool
property entity: Entity
property entity_or_none: Entity | None
property extra_dependencies: UidProxyMutableSet[__annotationlib_name_1__]
freeze() None[source]
Return type:

None

property frozen: bool
get_diff() frozendict[str, Any][source]
Return type:

frozendict[str, Any]

get_field(field: str, *, wrap: bool = True) Any[source]
Parameters:
Return type:

Any

get_original_field(field: str) Any[source]
Parameters:

field (str)

Return type:

Any

property has_diff: bool
has_field(field: str) bool[source]
Parameters:

field (str)

Return type:

bool

property instance_name: str
is_computed_field(field: str) bool[source]
Parameters:

field (str)

Return type:

bool

is_field_alias(field: str) bool[source]
Parameters:

field (str)

Return type:

bool

is_field_edited(field: str) bool[source]
Parameters:

field (str)

Return type:

bool

property is_journal: bool
is_model_field(field: str) bool[source]
Parameters:

field (str)

Return type:

bool

iter_children_uids() Iterable[Uid][source]
Return type:

Iterable[Uid]

mark_superseded() None[source]
Return type:

None

property marked_for_deletion: bool
model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True, 'serialize_by_alias': True, 'validate_assignment': True, 'validate_by_alias': True}

Configuration for the model, should be a dictionary conforming to ConfigDict.

model_post_init(context: Any) None
Parameters:

context (Any)

Return type:

None

property notified_dependents: bool
notify_dependents() None[source]
Return type:

None

on_journalled_collection_edit(collection: JournalledCollection) None[source]
Parameters:

collection (JournalledCollection)

Return type:

None

record: Annotated[EntityRecord, InstanceOf()]
remove_dependency(record_or_uid: EntityRecord | Uid) None[source]
Parameters:

record_or_uid (EntityRecord | Uid)

Return type:

None

property session: Session
set_field(field: str, value: T) T[source]
Parameters:
  • field (str)

  • value (T)

Return type:

T

sort_key() SupportsRichComparison[source]
Return type:

SupportsRichComparison

property superseded: bool
property uid: Uid
update(**kwargs: Any) None[source]
Parameters:

kwargs (Any)

Return type:

None

property version: int