public final Collection<Property> getNonPhantomChildren() { ComplexType type = getType(); if (children.size() < type.getFieldsCount()) { // populate with // unloaded props only // if needed for (Field field : type.getFields()) { getNonPhantomChild(field); // force loading non phantom props } } return Collections.unmodifiableCollection(children.values()); }
@Override public Collection<Property> getChildren() { ComplexType type = getType(); if (children.size() < type.getFieldsCount()) { // populate with // phantoms if needed for (Field field : type.getFields()) { getChild(field); // force loading all props including // phantoms } } return Collections.unmodifiableCollection(children.values()); }
/** * Given a document property, updates its value with the given blob. The property can be a blob list or a blob. If a * blob list the blob is appended to the list, if a blob then it will be set as the property value. Both blob list * formats are supported: the file list (blob holder list) and simple blob list. */ public static void addBlob(Property p, Blob blob) throws PropertyException { if (p.isList()) { // detect if a list of simple blobs or a list of files (blob // holder) Type ft = ((ListProperty) p).getType().getFieldType(); if (ft.isComplexType() && ((ComplexType) ft).getFieldsCount() == 1) { p.addValue(createBlobHolderMap(blob)); } else { p.addValue(blob); } } else { p.setValue(blob); } }