class OPropertyIndexDefinition extends ODocumentWrapperNoClass implements OIndexDefinition {

  public Object getDocumentValueToIndex(final ODocument iDocument) {
    if (OType.LINK.equals(keyType)) {
      final OIdentifiable identifiable = iDocument.field(field, OType.LINK);
      if (identifiable != null)
        return createValue(identifiable.getIdentity());
      else
        return null;
    }
    return createValue(iDocument.field(field));
  }

  public  OPropertyIndexDefinition(final String iClassName, final String iField, final OType iType);
  public  OPropertyIndexDefinition();

}