public interface ORecordSchemaAware
Modifier and Type | Method and Description |
---|---|
boolean |
containsField(String iFieldName)
Tells if a field is contained in current record.
|
<RET> RET |
field(String iFieldName)
Returns the value of a field.
|
ORecordSchemaAware |
field(String iFieldName,
Object iFieldValue)
Sets the value for a field.
|
ORecordSchemaAware |
field(String iFieldName,
Object iFieldValue,
OType... iType)
Sets the value for a field forcing the type.This is useful when you want avoid automatic
conversions (for example record id to record) or need expressly a conversion between types.
|
<RET> RET |
field(String iFieldName,
OType iType)
Returns the value of a field forcing the return type.
|
String[] |
fieldNames()
Returns the record's field names.
|
int |
fields()
Returns the number of fields present in memory.
|
Object[] |
fieldValues()
Returns the record's field values.
|
String |
getClassName()
Returns the class name associated to the current record.
|
OClass |
getSchemaClass()
Returns the schema class object for the record.
|
Object |
removeField(String iFieldName)
Removes a field.
|
void |
setClassName(String iClassName)
Sets the class for the current record.
|
void |
setClassNameIfExists(String iClassName)
Sets the class for the current record only if already exists in the schema.
|
void |
validate()
Validates the record against the schema constraints if defined.
|
<RET> RET field(String iFieldName)
iFieldName
- Field name<RET> RET field(String iFieldName, OType iType)
iFieldName
- Field nameiType
- Type between the values defined in the OType
enumORecordSchemaAware field(String iFieldName, Object iFieldValue)
iFieldName
- Field nameiFieldValue
- Field value to setORecordSchemaAware field(String iFieldName, Object iFieldValue, OType... iType)
iFieldName
- Field nameiFieldValue
- Field value to setiType
- Type between the values defined in the OType
enumObject removeField(String iFieldName)
iFieldName
- Field nameboolean containsField(String iFieldName)
iFieldName
- Field nameint fields()
String[] fieldNames()
Object[] fieldValues()
String getClassName()
#reset()
to re-associate the class.void setClassName(String iClassName)
iClassName
- Class name to setvoid setClassNameIfExists(String iClassName)
iClassName
- Class name to setOClass getSchemaClass()
OClass
instance or null if the record has no class associatedvoid validate() throws OValidationException
OValidationException
exception is thrown.OValidationException
Copyright © 2009–2020 OrientDB. All rights reserved.