Ticket #242 (new task)

Opened 2 years ago

Last modified 17 months ago

createOrUpdate for field types and record types

Reported by: evert Owned by: evert
Priority: major Milestone: 1.2
Component: Repository Version:
Keywords: Cc:

Description

Support createOrUpdate mechanism for field types and record types like for records.

See also #156 and #227

Change History

comment:1 Changed 20 months ago by bruno

In [5103]:

Extended RecordTypeBuilder? and added TypeManager?.createOrUpdateFieldType and TypeManager?.createOrUpdateRecordType (re #242).

RecordTypeBuilder? now has:

  • inline creation of field types through sub-builder
  • adding field types by name instead of id
  • adding mixins (by name and id)
  • field type entries and mixins are added through sub-builders
  • names can be specified in various ways (relying on defaultNamespace, as QName objet, as two strings)
  • createOrUpdate for both field types and record types: makes that the code doesn't fail if the schema was already created earlier.

Concerning the createOrUpdate methods: to make these usable in the import library, they should return a response status as is the case for records. Only difficulty there is that we should probably avoid that that ends up in the cache, to avoid confusion.

Other changes:

  • added TypeManager?.createFieldType and newFieldType methods which takes the value type as string
  • misc small improvements in HBaseTypeManager (better arg checking, exception messages, don't use exception to check if field type exists, ...)
  • TypeManager?.updateRecordType: allow to supply object with only name and no id
  • TypeManager?.update(Field|RecordType?): clear name reservation in case exceptions occur (e.g. field type immutable attributes conflict)
  • handle missing scope & valuetype in field type on update
  • AbstractTypeManager?.newFieldType: don't validate arguments to be non-null, they can set to null afterwards anyway.

comment:2 Changed 17 months ago by bruno

  • Milestone changed from 1.1 to 1.2
Note: See TracTickets for help on using tickets.