Each property has a method of the same name
DirectProperties
class_name => Text
The name of the class this Property is attached to
property_name => Text
The name of the property. The pair of class_name and property name are the ID properties of
UR::Object::Property
column_name => Text
If the class is backed by a database table, then the column this property's data comes from is stored
here
data_type => Text
The type of data stored in this property. Corresponds to the 'is' part of a class's property
definition.
data_length => Number
The maximum size of data stored in this property
default_value
For is_optional properties, the default value given when an object is created and this property is
not assigned a value.
valid_values => ARRAY
A listref of enumerated values this property may be set to
doc => Text
A place for documentation about this property
is_id => Boolean
Indicates whether this is an ID property of the class
is_optional => Boolean
Indicates whether this is property may have the value undef when the object is created
is_transient => Boolean
Indicates whether this is property is transient?
is_constant => Boolean
Indicates whether this property can be changed after the object is created.
is_mutable => Boolean
Indicates this property can be changed via its accessor. Properties cannot be both constant and
mutable
is_volatile => Boolean
Indicates this property can be changed by a mechanism other than its normal accessor method. Signals
are not emitted even when it does change via its normal accessor method.
is_classwide => Boolean
Indicates this property's storage is shared among all instances of the class. When the value is
changed for one instance, that change is effective for all instances.
is_delegated => Boolean
Indicates that the value for this property is not stored in the object directly, but is delegated to
another object or class.
is_calculated => Boolean
Indicates that the value for this property is not a part of the object'd data directly, but is
calculated in some way.
is_transactional => Boolean
Indicates the changes to the value of this property is tracked by a Context's transaction and can be
rolled back if necessary.
is_abstract => Boolean
Indicates this property exists in a base class, but must be overridden in a derived class.
is_concrete => Boolean
Antonym for is_abstract. Properties cannot be both is_abstract and is_concrete,
is_final => Boolean
Indicates this property cannot be overridden in a derived class.
is_deprecated => Boolean
Indicates this property's use is deprecated. It has no effect in the use of the property in any way,
but is useful in documentation.
implied_by => Text
If this property is created as a result of another property's existence, implied_by is the name of
that other property. This can happen in the case where an object accessor property is defined
has => [
foo => { is => 'Some::Other', id_by => 'foo_id' },
],
Here, the 'foo' property requires another property called 'foo_id', which is not explicitly declared.
In this case, the Property named foo_id will have its implied_by set to 'foo'.
id_by => ARRAY
In the case of an object accessor property, this is the list of properties in this class that link to
the ID properties in the remote class.
reverse_as => Text
Defines the linking property name in the remote class in the case of an is_many relationship
via => Text
For a via-type property, indicates which object accessor to go through.
to => Text
For a via-type property, indicates the property name in the remote class to get its value from. The
default value is the same as property_name
where => ARRAY
Supplies additional filters for indirect properties. For example:
foos => { is => 'Some::Foo', reverse_as => 'some', is_many => 1 },
blue_foos => { via => 'foos', where => [ color => 'blue' ] },
Would create a property 'blue_foos' which returns only the related Some::Foo objects that have 'blue'
color.
calculate_from => ARRAY
For calculated properties, this is a list of other property names the calculation is based on
calculate_perl => Text
For calculated properties, a string containing Perl code. Any properties mentioned in calculate_from
will exist in the code's scope at run time as scalars of the same name.
class_meta => UR::Object::Type
Returns the class metaobject of the class this property belongs to