Java API - OProperty

This class provides a standard interface for handling properties on database classes.

Managing Properties

Where database classes allow you to organize records on your database, properties organize the data you store on the records. You can manage this through an enforced schema, allowing you to apply constraints to the property. You can also manage it through an implied schema, where you decide at the application level to use certain properties to store certain information on the record.

Each property you create on a class initializes an OProperty instance on OrientDB. You can then retrieve these instances to retrieve information or operate on them further.

This class is available at com.orientechnologies.orient.core.metadata.schema.

import com.orientechnologies.orient.core.metadata.schema.OProperty;

Methods

MethodReturn TypeDescription
getDefaultValue()StringRetrieves the default value
getLinkedClass()OClassRetrieves the linked class in lazy mode
getLinkedType()OTypeRetrieves the linked type
getMax()StringRetrieves the maximum allowed value
getMin()StringRetrieves the minimum allowed value
getName()StringRetrieves the property name
getType()OTypeRetrieves the property type
isMandatory()BooleanDetermines whether the class requires you to set a value on this property
isNotNull()BooleanDetermines whether the class permits null values
isReadonly()BooleanDetermines whether you can write data to the property
setDefaultValue()OPropertyDefines the default value
setLinkedClass()OPropertyDefines the linked class
setLinkedType()OPropertyDefines the linked type
setMax()OPropertyDefines the maximum allowed value
setMin()OPropertyDefines the minimum allowed value
setName()OPropertyDefines the property name
setType()OPropertyDefines the property type