Home Manual Reference Source Test
public class | source

Attribute

The Attribute class represents a single model attribute, like 'account_id'. Subclasses of {Attribute} like {AttributeDateTime} know how to covert between the JSON representation of that type and the javascript representation. The Attribute class also exposes convenience methods for generating {Matcher} objects.

Constructor Summary

Public Constructor
public

constructor(objectPattern: {"modelKey": *, "queryable": *, "jsonKey": *})

Member Summary

Public Members
public

jsonKey: *

public
public

Method Summary

Public Methods
public
public
public

equal(val: *): Matcher

public

fromJSON(val: *): *

public

in(val: Array): Matcher

public

not(val: *): Matcher

public

toJSON(val: *): *

Public Constructors

public constructor(objectPattern: {"modelKey": *, "queryable": *, "jsonKey": *}) source

Params:

NameTypeAttributeDescription
objectPattern {"modelKey": *, "queryable": *, "jsonKey": *}
  • default: {"modelKey":null,"queryable":null,"jsonKey":null}

Public Members

public jsonKey: * source

public modelKey: * source

public queryable: * source

Public Methods

public ascending(): SortOrder source

Return:

SortOrder

Returns an ascending sort order for this attribute

public descending(): SortOrder source

Return:

SortOrder

Returns a descending sort order for this attribute

public equal(val: *): Matcher source

Params:

NameTypeAttributeDescription
val *

The attribute value

Return:

Matcher

Matcher for objects = to the provided value.

public fromJSON(val: *): * source

Params:

NameTypeAttributeDescription
val *

Return:

*

public in(val: Array): Matcher source

Params:

NameTypeAttributeDescription
val Array

An array of values

Return:

Matcher

Matcher for objects in the provided array.

public not(val: *): Matcher source

Params:

NameTypeAttributeDescription
val *

The attribute value

Return:

Matcher

A matcher for objects != to the provided value.

public toJSON(val: *): * source

Params:

NameTypeAttributeDescription
val *

Return:

*