ubs_numcounterreserv_ns

@unitybase/ubs~ ubs_numcounterreserv_ns

Reserved counters for registration keys

Constructor

new ubs_numcounterreserv_ns()

Mixes In:
mStorage   

Extends

Members

attrs static

Attributes defined in metadata. This property not exist in real life and added just for help

entity: UBEntity

Reference to entity metadata

Methods

addNew(ctx) api

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:
  1. ctx (ubMethodParams)
Mixes In:
mStorage.addNew   

delete(ctx) api

Delete data
Arguments:
  1. ctx (ubMethodParams)
    Properties
    1. mParams.execParams.ID (number)  element ID to be deleted
Mixes In:
mStorage.delete   

insert(ctx) api

Insert new row to the entity.
Arguments:
  1. ctx (ubMethodParams)
    Properties
    1. mParams.execParams (Object|TubList)  Object keys is entity attributes names, key values is a value to be inserted
Mixes In:
mStorage.insert   

select(ctx) api

Read entity data
Arguments:
  1. ctx (ubMethodParams)
    Properties
    1. mParams (UBQL)  ORM query in UBQL format
Mixes In:
mStorage.select   

update(ctx) api

Update data
Arguments:
  1. ctx (ubMethodParams)
    Properties
    1. mParams.execParams (Object|TubList)  Object keys is entity attributes names, key values is a value to be inserted
      Properties
      1. ID (number)  element ID to be updated
Mixes In:
mStorage.update   

getReservedRC(ctxt)boolean api

Get first reserved number for regKey and remove returned number from reservation entity. Actual result returned as mParams.getReservedRC
Arguments:
  1. ctxt (ubMethodParams)
    Properties
    1. mParams.execParams.regKey

getReservedRegnum(regKey)number

Gets first reserved number for regkey and remove returned number from reservation entity
Arguments:
  1. regKey (string)  Registration Key

reserveRC(ctxt)Boolean api

Reserves some numbers for future use
Arguments:
  1. ctxt (ubMethodParams)
    Properties
    1. mParams.execParams.regkey (string)
    2. mParams.execParams.regNum (number)
    3. mParams.execParams.reservedDate (Date)
    4. [mParams.execParams.note] (string)

reserveRegnum(regkey, regNum, reservedDateopt, noteopt)Boolean

Reserves numbers for future use
Arguments:
  1. regkey (String)  Registration key
  2. regNum (Number)  Number to reserve
  3. [reservedDate] (Date)  Date for reserve
  4. [note] (string)  Note of reserve