protected OGlobalProperty getGlobalProperty(final ODocument document, final int len) { final int id = (len * -1) - 1; return ODocumentInternal.getGlobalPropertyById(document, id); }
@Override public String[] getFieldNames(ODocument reference, final BytesContainer bytes, boolean deserializeClassName) { // SKIP CLASS NAME final int classNameLen = OVarIntSerializer.readAsInteger(bytes); bytes.skip(classNameLen); final List<String> result = new ArrayList<String>(); String fieldName; while (true) { OGlobalProperty prop = null; final int len = OVarIntSerializer.readAsInteger(bytes); if (len == 0) { // SCAN COMPLETED break; } else if (len > 0) { // PARSE FIELD NAME fieldName = stringFromBytes(bytes.bytes, bytes.offset, len).intern(); result.add(fieldName); // SKIP THE REST bytes.skip(len + OIntegerSerializer.INT_SIZE + 1); } else { // LOAD GLOBAL PROPERTY BY ID final int id = (len * -1) - 1; prop = ODocumentInternal.getGlobalPropertyById(reference, id); result.add(prop.getName()); // SKIP THE REST bytes.skip(OIntegerSerializer.INT_SIZE + (prop.getType() != OType.ANY ? 0 : 1)); } } return result.toArray(new String[result.size()]); }
prop = ODocumentInternal.getGlobalPropertyById(reference, id); if (prop == null) { throw new OSerializationException("Missing property definition for property id '" + id + "'");
prop = ODocumentInternal.getGlobalPropertyById(reference, id); if (prop == null) { throw new OSerializationException("Missing property definition for property id '" + id + "'");