RegisterSign In

API Documentation: Interface ODBClass

Package: com.mckoi.odb
implements com.mckoi.odb.ODBReferenced

A class in the Mckoi Object database data model. The class object describes either a system primitive type, or a used defined class specification. A class specification is a number of named fields and their corresponding type that make up the fields in an object instance.

A class object is immutable and has a corresponding reference to the class object in the storage medium.

Methods Summary

String getName()
String getInstanceName()
int getFieldCount()
String getFieldName(int n)
String getFieldType(int n)
boolean isFieldMutable(int n)
int indexOfField(String field_name)

Method Details

String getName()

Returns the name of this class.

String getInstanceName()

Returns the instance name of this class, which is a globally unique identifier used to resolve the class details against the object database.

int getFieldCount()

Returns the number of fields defined for this class.

String getFieldName(int n)

Returns the name of field n.

String getFieldType(int n)

Returns a string describing the type of field n, which is either; "[S", "$Data", "$String", "$List", "$Class", "[Class Name]#[UID]". All of these identifiers represent references except for "[S" that indicates an inline string. For "[Class Name]#[UID]" types, the "[Class Name]#[UID]" part describes the name of the user class and the reference of the object stored.

boolean isFieldMutable(int n)

Returns true if the field is mutable, false if immutable. A mutable field may be changed in an instance of the class. However a mutable field may not be indexed in an object collection class (only immutable values may be used in an index).

int indexOfField(String field_name)

Returns the index of the field with the given name.

The text on this page is licensed under the Creative Commons Attribution 3.0 License. Java is a registered trademark of Oracle and/or its affiliates.
Mckoi is Copyright © 2000 - 2020 Diehl and Associates, Inc. All rights reserved.