psCrumbReference

psEntTitle

psEntIntro

psEntCreateTitle

psEntCreateP

var order = PSEntity("com.domain.commerce.Order");
order.identifier("ORD-2024-001");
PSEntity(typeName)

psEntCtorDesc

entity.identifier(idn)

psEntIdDesc

psEntLoadCreateLabel psEntLoadCreate
var idn = "PROCESS_CATEGORY_BUSINESS";
var model = data$.load(idn);
if (model == null) {
    model = PSEntity("com.paradicshift.platform.automation.process.Category");
    model.identifier(idn);
}
model.text("name", "en", "Business");
data$.persist(model);

psEntFieldsTitle

entity.val(field, value)

psEntValSet

entity.val(field)

psEntValGet

order.val("total", 149.99);
order.val("currency", "USD");
order.val("hidden", false);

context$.log("total = {}", order.val("total"));   // 149.99

psEntTextTitle

psEntTextP

entity.text(field, locale, text)

psEntTextSet

entity.text(field, locale)

psEntTextGet

component.text("name", "en", "Execute access");
component.text("name", "fa", "دسترسی اجرا");

psEntGisTitle

psEntGisP

entity.gis(field, wkt)

psEntGisSet

psEntGisP2

e.gis("location", "POINT(%f %f)".formatted(lon, lat));
e.gis("area_1",   "POLYGON((%f %f, %f %f, %f %f, %f %f, %f %f))"
                  .formatted(lon, lat, lon2, lat, lon2, lat2, lon, lat2, lon, lat));
e.gis("path",     "LINESTRING(%f %f, %f %f, %f %f)"
                  .formatted(lon, lat, lon2, lat2, lon3, lat3));

psEntAccessTitle

entity.grantAll()

psEntGrantAll

entity.openAccess(accessType)

psEntOpenAccess

psEntLifecycleTitle

psEntLifecycleP

data$.persist(entity)  ·  data$.link(child, parent, relation)  ·  entity.delete()
data$.persist(subCat);
data$.link(subCat, model, "IN_PARENT_CATEGORY");

psEntQueryTitle

psEntQueryP

var q = PSEntityQuery("com.domain.commerce.Order")
            .selectId()
            .selectVal("total")
            .filterVal("currency", "equals", "USD")
            .filterVal("total", "greater_than", 100);

var rows = data$.query(q);

psEntSelectTitle

.selectId()psEntSelId
.selectIdentifier()psEntSelIdent
.selectVal(field)psEntSelVal
.selectText(field, locale)psEntSelText
.selectCount(field)psEntSelCount
.selectSumVal(field, alias)psEntSelSum

psEntFilterTitle

.filterId(value)psEntFilId
.filterIdentifier(value, op)psEntFilIdent
.filterVal(field, op, value)psEntFilVal
.filterText(field, locale, op, value)psEntFilText
.filter(name, op, value)psEntFilGeneric
.filterGIS(field, predicate, wkt)psEntFilGis

psEntTraversalTitle

.forward(relation)psEntForward
.backward(relation)psEntBackward

psEntOpTitle

psEntOpP

psEntThOppsLangThMeaning
"equals"psEntOpEquals
"not_equals"psEntOpNotEquals
"greater_than"psEntOpGt
"greater_than_or_equals"psEntOpGte
"less_than"psEntOpLt
"less_than_or_equals"psEntOpLte
psEntFilterValLabel psEntFilterVal