public class PropertyFunctions extends Object
Constructor and Description |
---|
PropertyFunctions() |
Modifier and Type | Method and Description |
---|---|
ListHolder |
getProperties(ExecutionContext ctx,
Type type)
Returns the properties of the given record type.
|
Property |
getProperty(ExecutionContext ctx,
Type type,
String name)
Returns a property with a given name or
null
if there is no property with a given name. |
MapHolder |
getPropertyMetadata(ExecutionContext ctx,
Property property)
Returns the property metadata.
|
String |
getPropertyName(ExecutionContext ctx,
Property property)
Returns a property name (a name of the field or association).
|
ListHolder |
getPropertyNames(ExecutionContext ctx,
PropertyPath propertyPath)
Returns the list of property names.
|
RecordType |
getPropertyPathRecordType(ExecutionContext ctx,
PropertyPath propertyPath)
Returns the property path record type.
|
Type |
getPropertyPathType(ExecutionContext ctx,
PropertyPath propertyPath)
Returns the property path type (the type of the last property).
|
Object |
getPropertyPathValue(ExecutionContext ctx,
RecordHolder record,
PropertyPath propertyPath)
Returns the value of the given property path of the given record object.
|
RecordType |
getPropertyRecordType(ExecutionContext ctx,
Property property)
Returns the record type in which this property is declared.
|
ReferenceHolder |
getPropertyReference(ExecutionContext ctx,
ReferenceHolder reference,
Property... properties)
Returns the reference to the object defined by the last property parameter.
|
Type |
getPropertyType(ExecutionContext ctx,
Property property)
Returns a property type.
|
Object |
getPropertyValue(ExecutionContext ctx,
RecordHolder record,
Property property)
Returns the value of the given property of the given record object.
|
boolean |
isAutogenerated(ExecutionContext ctx,
Property property)
Returns
true if the property is autogenerated. |
boolean |
isPrimaryKey(ExecutionContext ctx,
Property property)
Returns true if this property is a part of the primary key.
|
boolean |
isReadOnly(ExecutionContext ctx,
PropertyPath propertyPath)
Returns
true if the property path is read-only. |
boolean |
isVersion(ExecutionContext ctx,
Property property)
Returns
true if the property is a version field. |
void |
setPropertyPathValue(ExecutionContext ctx,
RecordHolder record,
PropertyPath propertyPath,
Object value)
Sets the value of the given property path of the given record object.
|
Object |
setPropertyValue(ExecutionContext ctx,
RecordHolder record,
Property property,
Object value)
Sets the value of the given property of the given record object.
|
public Property getProperty(ExecutionContext ctx, Type type, String name) throws ErrorException
null
if there is no property with a given name.ctx
- type
- name
- null
ErrorException
public String getPropertyName(ExecutionContext ctx, Property property) throws ErrorException
ctx
- property
- ErrorException
public Type getPropertyType(ExecutionContext ctx, Property property) throws ErrorException
ctx
- property
- ErrorException
public RecordType getPropertyRecordType(ExecutionContext ctx, Property property) throws ErrorException
ctx
- property
- ErrorException
public MapHolder getPropertyMetadata(ExecutionContext ctx, Property property) throws ErrorException
ctx
- property
- ErrorException
public Object getPropertyValue(ExecutionContext ctx, RecordHolder record, Property property) throws ErrorException
ctx
- record
- property
- ErrorException
public Object setPropertyValue(ExecutionContext ctx, RecordHolder record, Property property, Object value) throws ErrorException
null
.ctx
- record
- property
- value
- null
ErrorException
public ListHolder getProperties(ExecutionContext ctx, Type type) throws ErrorException
ctx
- type
- ErrorException
public ReferenceHolder getPropertyReference(ExecutionContext ctx, ReferenceHolder reference, Property... properties) throws ErrorException
ctx
- reference
- properties
- ErrorException
public ListHolder getPropertyNames(ExecutionContext ctx, PropertyPath propertyPath) throws ErrorException
ctx
- propertyPath
- ErrorException
public Type getPropertyPathType(ExecutionContext ctx, PropertyPath propertyPath) throws ErrorException
ctx
- propertyPath
- ErrorException
public RecordType getPropertyPathRecordType(ExecutionContext ctx, PropertyPath propertyPath) throws ErrorException
ctx
- propertyPath
- ErrorException
public Object getPropertyPathValue(ExecutionContext ctx, RecordHolder record, PropertyPath propertyPath) throws ErrorException
ctx
- record
- propertyPath
- ErrorException
public void setPropertyPathValue(ExecutionContext ctx, RecordHolder record, PropertyPath propertyPath, Object value) throws ErrorException
ctx
- record
- propertyPath
- value
- ErrorException
public boolean isReadOnly(ExecutionContext ctx, PropertyPath propertyPath) throws ErrorException
true
if the property path is read-only.ctx
- propertyPath
- true
if the property path is read-onlyErrorException
public boolean isPrimaryKey(ExecutionContext ctx, Property property) throws ErrorException
ctx
- property
- ErrorException
public boolean isAutogenerated(ExecutionContext ctx, Property property) throws ErrorException
true
if the property is autogenerated.ctx
- property
- true
if the property is autogeneratedErrorException
public boolean isVersion(ExecutionContext ctx, Property property) throws ErrorException
true
if the property is a version field.ctx
- property
- true
if the property is a version fieldErrorException
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.