@Nonnull public static PropertyValue newBinary(@Nonnull Blob value) { return new PropertyStateValue(BinaryPropertyState.binaryProperty("", value)); }
/** * Create a {@code PropertyState} from a {@link Blob}. * @param name The name of the property state * @param value The value of the property state * @return The new property state of type {@link Type#BINARY} */ public static PropertyState binaryProperty( @NotNull String name, @NotNull Blob value) { return new BinaryPropertyState(name, value); }
/** * Create a {@code PropertyState} from a {@link javax.jcr.Value}. * @param name The name of the property state * @param value The value of the property state * @return The new property state of type {@link Type#BINARY} */ public static PropertyState binaryProperty( @NotNull String name, @NotNull Value value) throws RepositoryException { return new BinaryPropertyState(name, getBlob(value)); }
@NotNull public static PropertyValue newBinary(@NotNull Blob value) { return new PropertyStateValue(BinaryPropertyState.binaryProperty("", value)); }
/** * Create a {@code PropertyState} from a {@link Blob}. * @param name The name of the property state * @param value The value of the property state * @return The new property state of type {@link Type#BINARY} */ public static PropertyState binaryProperty( @Nonnull String name, @Nonnull Blob value) { return new BinaryPropertyState(name, value); }
/** * Create a {@code PropertyState} from a {@link javax.jcr.Value}. * @param name The name of the property state * @param value The value of the property state * @return The new property state of type {@link Type#BINARY} */ public static PropertyState binaryProperty( @Nonnull String name, @Nonnull Value value) throws RepositoryException { return new BinaryPropertyState(name, getBlob(value)); }
@NotNull public static PropertyValue newBinary(@NotNull byte[] value) { return new PropertyStateValue(BinaryPropertyState.binaryProperty("", value)); }
/** * Create a {@code PropertyState} from an array of bytes. * @param name The name of the property state * @param value The value of the property state * @return The new property state of type {@link Type#BINARY} */ public static PropertyState binaryProperty( @NotNull String name, @NotNull byte[] value) { return new BinaryPropertyState( name, new ArrayBasedBlob(checkNotNull(value))); }
@Nonnull public static PropertyValue newBinary(@Nonnull byte[] value) { return new PropertyStateValue(BinaryPropertyState.binaryProperty("", value)); }
/** * Create a {@code PropertyState} from an array of bytes. * @param name The name of the property state * @param value The value of the property state * @return The new property state of type {@link Type#BINARY} */ public static PropertyState binaryProperty( @NotNull String name, @NotNull String value) { return new BinaryPropertyState( name, new StringBasedBlob(checkNotNull(value))); }
private ValueImpl createBinaryValue(Blob blob) throws RepositoryException { return new ValueImpl(BinaryPropertyState.binaryProperty("", blob), namePathMapper); }
/** * Create a {@code PropertyState} from an array of bytes. * @param name The name of the property state * @param value The value of the property state * @return The new property state of type {@link Type#BINARY} */ public static PropertyState binaryProperty( @Nonnull String name, @Nonnull byte[] value) { return new BinaryPropertyState( name, new ArrayBasedBlob(checkNotNull(value))); }
@NotNull private ValueImpl createBinaryValue(@NotNull Blob blob) throws RepositoryException { return new ValueImpl(BinaryPropertyState.binaryProperty("", blob), getNamePathMapper(), getBlobAccessProvider()); }
/** * Create a {@code PropertyState} from an array of bytes. * @param name The name of the property state * @param value The value of the property state * @return The new property state of type {@link Type#BINARY} */ public static PropertyState binaryProperty( @Nonnull String name, @Nonnull String value) { return new BinaryPropertyState( name, new StringBasedBlob(checkNotNull(value))); }
return StringPropertyState.stringProperty(name, (String) value); } else if (value instanceof Blob) { return BinaryPropertyState.binaryProperty(name, (Blob) value); } else if (value instanceof byte[]) { return BinaryPropertyState.binaryProperty(name, (byte[]) value); } else if (value instanceof Long) { return LongPropertyState.createLongProperty(name, (Long) value);
for (int i = 0; i < 10; i++) { InputStream s = new RandomStream(10 * 1024, 42); PropertyState p = new BinaryPropertyState("p", ns.createBlob(s)); builder.child("test").child("node-" + i).setProperty(p); for (int i = 0; i < 10; i++) { InputStream s = new RandomStream(10 * 1024, 17); PropertyState p = new BinaryPropertyState("p", ns.createBlob(s)); builder.child("test").child("node-" + i).setProperty(p);
return StringPropertyState.stringProperty(name, (String) value); } else if (value instanceof Blob) { return BinaryPropertyState.binaryProperty(name, (Blob) value); } else if (value instanceof byte[]) { return BinaryPropertyState.binaryProperty(name, (byte[]) value); } else if (value instanceof Long) { return LongPropertyState.createLongProperty(name, (Long) value);
while (!Iterables.any(store.find(Collection.NODES, id).getPreviousRanges().values(), INTERMEDIATE)) { InputStream s = new RandomStream(10 * 1024, 42); PropertyState p = new BinaryPropertyState("p", ns.createBlob(s)); builder = ns.getRoot().builder(); builder.child("test").setProperty(p);
@NotNull private PropertyState compact(@NotNull PropertyState property) { compactionMonitor.onProperty(); String name = property.getName(); Type<?> type = property.getType(); if (type == BINARY) { compactionMonitor.onBinary(); return binaryProperty(name, property.getValue(Type.BINARY)); } else if (type == BINARIES) { List<Blob> blobs = newArrayList(); for (Blob blob : property.getValue(BINARIES)) { compactionMonitor.onBinary(); blobs.add(blob); } return binaryPropertyFromBlob(name, blobs); } else { return createProperty(name, property.getValue(type), type); } }
if (type == PropertyType.BINARY) { return BinaryPropertyState.binaryProperty(name, store.getBlobFromBlobId(value)); } else { return createProperty(name, StringCache.get(value), type);