Reserved counters for registration keys

Mixes In:

# new ubs_numcounterreserv_ns ()

Members

# attrs : ubsNumcounterreservAttrs static

Attributes defined in metadata. Property does not exist in real life and added for IDE

# entity : UBEntity instance

Reference to entity metadata

Methods

# addNew (ctxubMethodParams) instance

Create record with filled default values and return it to caller. Newly created record is not inserted to database. For inserting record to the database insert method should be called

Arguments:

# delete (ctxubMethodParams) instance

Delete record by ID

Arguments:

# insert (ctxubMethodParams) instance

New record insertion

Arguments:

# select (ctxubMethodParams) instance

ORM query for read records

Arguments:

# update (ctxubMethodParams) instance

Update existed record

Arguments:
  • ctx: ubMethodParams
    • mParamsobject

      Update method parameters

    • fieldListarray.<string>

      Optional attributes names. Values of this attributes will be returned in result. Additional DB query is required to return values, so if caller do not need it better to not pass a fieldList to update

# getReservedRC (ctxtubMethodParams) → boolean instance

Get first reserved number for regKey and remove returned number from reservation entity. Actual result returned as mParams.getReservedRC

Arguments:

# getReservedRegnum (regKeystring) → number instance

Gets first reserved number for regkey and remove returned number from reservation entity

Return:

Reserved number

Arguments:
  • regKey: string

    Registration Key

# reserveRC (ctxtubMethodParams) → boolean instance

Reserves some numbers for future use

Arguments:

# reserveRegnum (regkeystring, regNumnumber, reservedDateoptDate, noteoptstring) → boolean instance

Reserves numbers for future use

Return:

success

Arguments:
  • regkey: string

    Registration key

  • regNum: number

    Number to reserve

  • reservedDate: Date

    Date for reserve

  • note: string

    Note of reserve