ModeShape Distribution 3.2.0.Final

org.modeshape.jcr.value
Interface BinaryFactory

All Superinterfaces:
ValueFactory<BinaryValue>
All Known Implementing Classes:
BinaryStoreValueFactory

@ThreadSafe
public interface BinaryFactory
extends ValueFactory<BinaryValue>

A factory for creating BinaryValue instances. This interface extends the ValueFactory generic interface and adds specific methods for creating binary objects.


Field Summary
 
Fields inherited from interface org.modeshape.jcr.value.ValueFactory
DEFAULT_DECODER, DEFAULT_ENCODER
 
Method Summary
 BinaryValue find(BinaryKey secureHash, long size)
          Find an existing binary value given the supplied binary key.
 BinaryFactory with(BinaryStore binaryStore)
          Return a potentially new copy of this factory that uses the supplied BinaryStore object.
 BinaryFactory with(ValueFactories valueFactories)
          Return a potentially new copy of this factory that uses the supplied ValueFactories object.
 
Methods inherited from interface org.modeshape.jcr.value.ValueFactory
create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, getPropertyType
 

Method Detail

with

BinaryFactory with(ValueFactories valueFactories)
Description copied from interface: ValueFactory
Return a potentially new copy of this factory that uses the supplied ValueFactories object.

Specified by:
with in interface ValueFactory<BinaryValue>
Parameters:
valueFactories - the value factories object; may not be null
Returns:
the factory, which may be a new instance or may be this object if the supplied value factories is the same as used by this factory; never null

with

BinaryFactory with(BinaryStore binaryStore)
Return a potentially new copy of this factory that uses the supplied BinaryStore object.

Parameters:
binaryStore - the binary store; may not be null
Returns:
the factory, which may be a new instance or may be this object if the supplied value binary store is the same as used by this factory; never null

find

BinaryValue find(BinaryKey secureHash,
                 long size)
                 throws BinaryStoreException
Find an existing binary value given the supplied binary key. If no such binary value exists, null is returned. This method can be used when the caller knows the secure hash (e.g., from a previously-held Binary object), and would like to reuse an existing binary value (if possible).

Parameters:
secureHash - the secure hash of the binary content, which was probably obtained from a previously-held BinaryValue object; a null or empty value is allowed, but will always result in returning null
size - the size of the binary content
Returns:
the existing Binary value that has the same secure hash; never null
Throws:
BinaryStoreException - if there is a problem accessing the binary store

ModeShape Distribution 3.2.0.Final

Copyright © 2008-2013 JBoss, a division of Red Hat. All Rights Reserved.