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

Method Return Type Description
getDefaultValue() String Retrieves the default value
getLinkedClass() OClass Retrieves the linked class in lazy mode
getLinkedType() OType Retrieves the linked type
getMax() String Retrieves the maximum allowed value
getMin() String Retrieves the minimum allowed value
getName() String Retrieves the property name
getType() OType Retrieves the property type
isMandatory() Boolean Determines whether the class requires you to set a value on this property
isNotNull() Boolean Determines whether the class permits null values
isReadonly() Boolean Determines whether you can write data to the property
setDefaultValue() OProperty Defines the default value
setLinkedClass() OProperty Defines the linked class
setLinkedType() OProperty Defines the linked type
setMax() OProperty Defines the maximum allowed value
setMin() OProperty Defines the minimum allowed value
setName() OProperty Defines the property name
setType() OProperty Defines the property type

results matching ""

    No results matching ""