Ticket #923 (closed Enhancement: fixed)

Opened 5 years ago

Last modified 5 years ago

Core API: ChildTopics accessors which don't throw

Reported by: jri Owned by: jri
Priority: Major Milestone: Release 4.8
Component: DeepaMehta Standard Distribution Version: 4.7
Keywords: Cc: dgf, Malte
Complexity: 3 Area: Application Framework / API
Module: deepamehta-core

Description

The ChildTopics accessors (e.g. getTopic()) and convenience accessors (e.g. getLong()) should have counterparts which return null instead of throwing an exception in case no such child topic exists.

Change History

comment:1 Changed 5 years ago by jri

  • Status changed from new to accepted

comment:2 Changed 5 years ago by Jörg Richter <jri@…>

In 86c6b056a21a3ee4e5470d2c8067ddacaffb58ed/deepamehta:

Core API: optional ChildTopics? accessors (#923).

The ChildTopics accessors and convenience accessors have counterparts which return null instead of throwing an exception in case no such child topic exists.

8 new methods in ChildTopics:

// === Accessors ===

RelatedTopic getTopicOrNull(String assocDefUri);

List<RelatedTopic> getTopicsOrNull(String assocDefUri);

// === Convenience Accessors ===

String getStringOrNull(String assocDefUri);

Integer getIntOrNull(String assocDefUri);

Long getLongOrNull(String assocDefUri);

Double getDoubleOrNull(String assocDefUri);

Boolean getBooleanOrNull(String assocDefUri);

Object getObjectOrNull(String assocDefUri);

See #923.

comment:3 Changed 5 years ago by jri

  • Status changed from accepted to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.