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 - nullErrorExceptionpublic String getPropertyName(ExecutionContext ctx, Property property) throws ErrorException
ctx - property - ErrorExceptionpublic Type getPropertyType(ExecutionContext ctx, Property property) throws ErrorException
ctx - property - ErrorExceptionpublic RecordType getPropertyRecordType(ExecutionContext ctx, Property property) throws ErrorException
ctx - property - ErrorExceptionpublic MapHolder getPropertyMetadata(ExecutionContext ctx, Property property) throws ErrorException
ctx - property - ErrorExceptionpublic Object getPropertyValue(ExecutionContext ctx, RecordHolder record, Property property) throws ErrorException
ctx - record - property - ErrorExceptionpublic Object setPropertyValue(ExecutionContext ctx, RecordHolder record, Property property, Object value) throws ErrorException
null.ctx - record - property - value - nullErrorExceptionpublic ListHolder getProperties(ExecutionContext ctx, Type type) throws ErrorException
ctx - type - ErrorExceptionpublic ReferenceHolder getPropertyReference(ExecutionContext ctx, ReferenceHolder reference, Property... properties) throws ErrorException
ctx - reference - properties - ErrorExceptionpublic ListHolder getPropertyNames(ExecutionContext ctx, PropertyPath propertyPath) throws ErrorException
ctx - propertyPath - ErrorExceptionpublic Type getPropertyPathType(ExecutionContext ctx, PropertyPath propertyPath) throws ErrorException
ctx - propertyPath - ErrorExceptionpublic RecordType getPropertyPathRecordType(ExecutionContext ctx, PropertyPath propertyPath) throws ErrorException
ctx - propertyPath - ErrorExceptionpublic Object getPropertyPathValue(ExecutionContext ctx, RecordHolder record, PropertyPath propertyPath) throws ErrorException
ctx - record - propertyPath - ErrorExceptionpublic void setPropertyPathValue(ExecutionContext ctx, RecordHolder record, PropertyPath propertyPath, Object value) throws ErrorException
ctx - record - propertyPath - value - ErrorExceptionpublic 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-onlyErrorExceptionpublic boolean isPrimaryKey(ExecutionContext ctx, Property property) throws ErrorException
ctx - property - ErrorExceptionpublic boolean isAutogenerated(ExecutionContext ctx, Property property) throws ErrorException
true if the property is autogenerated.ctx - property - true if the property is autogeneratedErrorExceptionpublic 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 fieldErrorExceptionCopyright © 2007-2020 Whitestein Technologies. All Rights Reserved.