Home Manual Reference Source Repository
public class | source

CrudSetBase

Extends:

ResourceBaseCrudBase → CrudSetBase

Crud base for resource sets

Static Member Summary

Static Public Members
public static get

Get the foreign key name

Member Summary

Public Members
public get

Get items associated with the set

Protected Members
protected get abstract

Child constructor

Inherited Summary

From class ResourceBase
public static get

Returns if the resource is readonly

public static get abstract

Resource name

public static get

Resource path template

public static get

Returns the url key of the resource

protected static get

Protected read-only fields

public get

api: Mapcreator: *

Get api instance

public set

api(value: Mapcreator)

Set the api instance

public get

Auto generated Resource base url

public get

List fields that contain object data

public get

If the resource can be owned by an organisation

public get

url: string: *

Auto generated resource url

public

Clone the object

public

Refresh the resource by requesting it from the server again

public

reset(fields: Array<string> | string | null)

Resets model instance to it's original state

public

Clean up instance and commit all changes locally.

public

static(Target: string | Class, Constructor: Class?, seedData: Object<string, *>): SimpleResourceProxy

Static proxy generation

public

toObject(camelCaseKeys: boolean): {}

Transform instance to object

public

String representation of the resource, similar to Python's repr

protected

_guessType(name: string, value: *): *

Guess type based on property name

protected

Macro for resource listing

protected

Moves new fields to this._properties and turns them into a getter/setter

From class CrudBase
public

Delete item

public

Restore item

public

Save item.

protected

Build data for create operation

protected

Update existing item

Static Public Members

public static get foreignKeyName: string: * source

Get the foreign key name

Return:

string

Foreign key name

Example:

api.fontFamilies.select(1).constructor.foreignKeyName === 'fontFamilyId'

Public Members

public get items: SimpleResourceProxy: * source

Get items associated with the set

Return:

SimpleResourceProxy

A proxy for accessing the resource

Protected Members

protected get abstract _Child: Class<ResourceBase> source

Child constructor

Return:

Class<ResourceBase>

Child constructor